re: open source help/discussion thread (v0) VIEW POST

re: I'm getting the following error when running bin/setup: == Preparing database == rails aborted! The following environment variables should be set:...

Hm that's strange. Try these two things:

  1. You're probably doing this correctly already, but make sure you're setting the keys in config/application.yml and not sample_application.yml.
  2. You might be running into a spring error, which is a Rails app preloader. If spring is running, it'll run bin commands for you, but sometimes doesn't refresh when you change things like environment variables. Try turning it off with spring stop and then running bin/setup again.

Spring wasn't actually running, but I figured out what the issue was.

When I ran git status, it seemed like I accidentally made some changes to config/application.rb. I undid those changes and now bin/setup works.

Thanks for trying to help though!

code of conduct - report abuse