Reputation: 10912
I am pretty new at using the Thin server on my simple rails application. It's working nicely except, that 1 out of 4 times more or less when I go to any page in the app I get this on the browser:
Status: 500 Internal Server Error Content-Type: text/html
Application error
Change this error message for exceptions thrown outside of an action (like in Dispatcher setups or broken Ruby code) in public/500.html
and this in the log:
Processing PlansController#index (for 24.61.84.158 at 2012-03-02 17:53:48) [GET]
Session ID: 3105294042126eab3c6292d3ba224847
Parameters: {"controller"=>"plans", "action"=>"index"}
Rendering layoutfalseactionlist within layouts/standard
Rendering plans/list
Completed in 0.18974 (5 reqs/sec) | Rendering: 0.10813 (56%) | DB: 0.03900 (20%) | 200 OK [http://admin.blogbridge.com/]
file /tmp/ruby_sess.5684ebd33a502d9d not readable
/usr/local/rvm/rubies/ruby-1.8.7-p357/lib/ruby/1.8/pstore.rb:100:in `initialize'
/usr/local/rvm/rubies/ruby-1.8.7-p357/lib/ruby/1.8/cgi/session/pstore.rb:61:in `new'
/usr/local/rvm/rubies/ruby-1.8.7-p357/lib/ruby/1.8/cgi/session/pstore.rb:61:in `initialize'
/usr/local/rvm/rubies/ruby-1.8.7-p357/lib/ruby/1.8/cgi/session.rb:280:in `new'
/usr/local/rvm/rubies/ruby-1.8.7-p357/lib/ruby/1.8/cgi/session.rb:280:in `initialize'
/usr/local/rvm/gems/ruby-1.8.7-p357/gems/actionpack-1.13.3/lib/action_controller/cgi_process.rb:123:in `new'
/usr/local/rvm/gems/ruby-1.8.7-p357/gems/actionpack-1.13.3/lib/action_controller/cgi_process.rb:123:in `session'
/usr/local/rvm/gems/ruby-1.8.7-p357/gems/actionpack-1.13.3/lib/action_controller/cgi_process.rb:155:in `stale_session_check!'
/usr/local/rvm/gems/ruby-1.8.7-p357/gems/actionpack-1.13.3/lib/action_controller/cgi_process.rb:110:in `session'
/usr/local/rvm/gems/ruby-1.8.7-p357/gems/actionpack-1.13.3/lib/action_controller/base.rb:1052:in `assign_shortcuts_without_flash'
/usr/local/rvm/gems/ruby-1.8.7-p357/gems/actionpack-1.13.3/lib/action_controller/flash.rb:140:in `assign_shortcuts'
/usr/local/rvm/gems/ruby-1.8.7-p357/gems/actionpack-1.13.3/lib/action_controller/base.rb:424:in `process_without_filters'
/usr/local/rvm/gems/ruby-1.8.7-p357/gems/actionpack-1.13.3/lib/action_controller/filters.rb:624:in `process_without_session_management_support'
/usr/local/rvm/gems/ruby-1.8.7-p357/gems/actionpack-1.13.3/lib/action_controller/session_management.rb:114:in `process'
/usr/local/rvm/gems/ruby-1.8.7-p357/gems/actionpack-1.13.3/lib/action_controller/base.rb:330:in `process'
/usr/local/rvm/gems/ruby-1.8.7-p357/gems/rails-1.2.3/lib/dispatcher.rb:41:in `dispatch'
/usr/local/rvm/gems/ruby-1.8.7-p357/gems/thin-1.3.1/lib/rack/adapter/rails.rb:89:in `call'
/usr/local/rvm/gems/ruby-1.8.7-p357/gems/thin-1.3.1/lib/rack/adapter/rails.rb:69:in `call'
/usr/local/rvm/gems/ruby-1.8.7-p357/gems/thin-1.3.1/lib/thin/connection.rb:80:in `pre_process'
/usr/local/rvm/gems/ruby-1.8.7-p357/gems/thin-1.3.1/lib/thin/connection.rb:78:in `catch'
/usr/local/rvm/gems/ruby-1.8.7-p357/gems/thin-1.3.1/lib/thin/connection.rb:78:in `pre_process'
/usr/local/rvm/gems/ruby-1.8.7-p357/gems/thin-1.3.1/lib/thin/connection.rb:53:in `process'
/usr/local/rvm/gems/ruby-1.8.7-p357/gems/thin-1.3.1/lib/thin/connection.rb:38:in `receive_data'
/usr/local/rvm/gems/ruby-1.8.7-p357/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run_machine'
/usr/local/rvm/gems/ruby-1.8.7-p357/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run'
/usr/local/rvm/gems/ruby-1.8.7-p357/gems/thin-1.3.1/lib/thin/backends/base.rb:61:in `start'
/usr/local/rvm/gems/ruby-1.8.7-p357/gems/thin-1.3.1/lib/thin/server.rb:159:in `start'
/usr/local/rvm/gems/ruby-1.8.7-p357/gems/thin-1.3.1/lib/thin/controllers/controller.rb:86:in `start'
/usr/local/rvm/gems/ruby-1.8.7-p357/gems/thin-1.3.1/lib/thin/runner.rb:185:in `send'
/usr/local/rvm/gems/ruby-1.8.7-p357/gems/thin-1.3.1/lib/thin/runner.rb:185:in `run_command'
/usr/local/rvm/gems/ruby-1.8.7-p357/gems/thin-1.3.1/lib/thin/runner.rb:151:in `run!'
/usr/local/rvm/gems/ruby-1.8.7-p357/gems/thin-1.3.1/bin/thin:6
/usr/local/rvm/gems/ruby-1.8.7-p357/bin/thin:19:in `load'
/usr/local/rvm/gems/ruby-1.8.7-p357/bin/thin:19
Has anyone has seen this before?
Upvotes: 0
Views: 617
Reputation: 7403
What sticks out to me is that rails-1.2.3 is in your stack. I believe if you bundle exec thin
you'll get the correct version of rails, but you can also force this by removing all gems that aren't dependencies of your app.
While rvm is great for development, I'm not convinced it brings much value when installed at a system level, and I've heard lots of people struggling with it on production systems (especially CentOS) in terms of getting the environment correct for whatever user thin is running as. If you're new to rails deployments, consider using something like passenger, and just sudo gem install
the dependencies.
Upvotes: 1