500 Errors with older sites after update to 4.0.10 etc.

#1
I just installed a new site onto my server that uses Rails 2.3.4. In order to get it running, I had to upgrade to 4.0.10 with lsapi 3.5 and then manually transfer the RailsRunner.rb files over into /usr/local/lsws/fcgi-bin. That seemed to be the combo that worked,(though I did a lot more tweaking)

Now I have a bunch of older sites using Rails 1.2.3 and Mephisto 0.7x that are not working right. I've tweaked them to use the right rails gem and done a rake rails:update. Now they work partially. For some reason though, I get a 500 error every once in a while. It looks like the first time you hit an uncached page or something.

Here's my error. What's up with that? It almost seems like the new RailsRunner.rb isn't compatible or something..? :confused:

Code:
MissingSourceFile (no such file to load -- application):
    /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
    /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
    /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require'
    /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in'
    /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require'
    /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:104:in `require_or_load'
    /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:60:in `depend_on'
    /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:442:in `require_dependency'
    /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:110:in `prepare_application'
    /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:39:in `dispatch'
    /usr/local/lsws/fcgi-bin/RailsRunner.rb:98


Rendering ./config/../public/500.html (internal_server_error)
Thanks for your help!
-Chris
 
#3
Looks like a problem between Gem and older Rails releases, nothing to do with the RailsRunder.rb .
Can you give me an idea why you think that it's a problem with Gem and Rails? Is there something you know that I don't? I just ask because that would help me in tracking down the issue.
 
#4
Oi, I don't understand why this works but this is what seems to be happening..

I had 503 errors on all my Mephisto sites and the solution to fixing that appears to be to set the RAILS_GEM_VERSION to 1.2.3 and then do
Code:
rake rails:update
I found that just setting the gem version didn't work.

This fixes the 503 errors and gets the site working. Unfortunately there is an intermittent 500 error that then occurs the first time you try to load a dynamic page. The error goes away on refresh.

The solution? Apparently the rails:update command changes application.rb to application_controller.rb. I just renamed it back and now I have no 503 and no 500...

I understand why renaming the file fixes the 500 error. I don't understand why I have to do rake rails:update to fix the 503 error. :confused:

At least it works! :)
 
Top