Best tools, materials & practices to onboard a hoarde of new users?

I think that’s because you’re trying to run the file directly, whereas the Rails app lives inside a Docker container. You need to run the file from the Docker container, otherwise the Rails application is not loaded and thus the Rake task will not work.

As you can see in Regis answer here https://meta.discourse.org/t/how-to-run-uploads-migrate-to-new-pattern-rake-task/29083/2, you enter the Docker container by doing the following:

  1. ssh into your server on DigitalOcean
  2. cd /var/discourse
  3. ./launcher enter app
  4. rake user_importer:check[tmp/users.csv]

Now it should work (haven’t tested it, and it’s a while that I’ve used Discourse, but I think it does).

The next issue will probably be getting your CSV file inside the Docker container. As far as I know and remember, you can used the shared folder for this, as this will be automatically mounted by the Docker container. To do so, do the following:

  1. On your server, save / move your CSV file in the /var/discourse/shared/standalone folder
  2. Start the Docker container with ./launcher enter app from the /var/discourse folder, as in the previous steps above
  3. Execute the command cp /shared/users.csv tmp/users.csv, this will copy the CSV file to the right directory for my script (change users.csv to whatever the name of your file is)

You can read a little more on this here /shared folder not mounted in Docker container

3 Likes