I'm hosting on modest hardware and chose Nginx and Thin to hopefully get the most performance out of my app.
My problem was that my app wouldn't run in production. It worked fine in development, but not in production.
There were a couple of problems:
- I was using a legacy database, and like non-pluralised table names, development picked up 'ActiveRecord::Base.pluralize_table_names = false' in my config/environment.rb, but I didn't seem to propagate to production. I added in 'ActiveRecord::Base.pluralize_table_names = false' into ./config/environments/production.rb
- Thin wouldn't start. Starting thin with -D allowed me to start it not daemonized, and then I could see the problem: 'Missing the Rails gem. Please `gem install -v= rails`, update your RAILS_GEM_VERSION'.
This is Thin reacting against rack version 1.1.0 apparently.
gem uninstall --version '> 1.0.1' rack fixed that.
No comments:
Post a Comment