500 Error in Rails Using Apache and mod_rails Passenger
Wednesday, July 16th, 2008So I just spent the good part of 4 hours trying to figure out why my fresh Ruby on Rails 2.1 apps was giving me a 500 error on my slice with mod_rails.
Permissions? No. Configurations? No. Etc etc.
I’ll just get straight to the point: apparently it was my database. Sure I ran:
rake db:migrate
..and it migrated fine, but yet still a 500 error like I tested many times. The fix?
rake db:migrate RAILS_ENV=”production”
Seems rake was stuck in the development environment. I’m not above saying it was just my ignorance of mod_rails environments, but why on earth would passenger default to development when it’s clearly made for production?