I finally got mine to work by using
RAILS_ENV=production sudo -E -u discourse rake import:facebook_group with root user, instead of just the
rake import:facebook_group per instructions. Not sure why that is?
Some tips for beginners…
Just did this successfully with a pretty small Facebook group. I’m new to Discourse and ruby - but I can Google So some tips below if any other newbies come along and need some help. I’m using the Docker for my Discourse install.
- The instructions refer to “config” and “lib” folders. Those are only accessible to you through ssh and doing cd to
./launcher ssh appthen the “config” and “lib” folders are in
- To get files (namely import_facebook.yml and import_facebook.rake) into those folders, you’ll have to do this by placing the files via SFTP into
/var/discourse/shared/standalone. Then those files are available on the ./launcher ssh app side (for lack of a better term) in
/var/www/discourseand you can use a command like
mvto move them into the appropriate lib and config folders.
- Regarding installing the koala gem before you get started, that’s also by first accessing the ./launcher ssh app area and doing cd to
/var/www/discourse. An easy way to add koala to the gemfile is to run
gem install gemratthen
gemrat koala. Then after that you can run
bundle installbut it will probably warn you about the Gemfile.lock. I just followed per the error instructions and ran
bundle install --no-deploymentwith success.
- When it was all done, it crashed my Discourse I have 2GB of RAM and the import went great, but once it started processing the new users, I got the white screen on my site and it stopped working. So I waited a little bit, then rebuilt my Discourse using
./launcher- now it’s working great. That had the added benefit of cleaning out the koala gem and Gemfile settings (I was a bit wary of how I had done the bundle install as root).
- Be warned! Even with the fake email addresses set, it will still attempt a lot of emails! So you may want to change your SMTP settings (Mandrill for instance has a “test” API you can use that doesn’t actually email out), so you don’t get a lot of bounceback notifications.
That’s all. I know this probably isn’t the cleanest way to do it - but if there are any other beginners out there that need the gaps filled in, hope this helps.