LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > External Applications > Ruby/Rails > 500 Errors with older sites after update to 4.0.10 etc.

Reply
 
Thread Tools Display Modes
  #1  
Old 09-10-2009, 12:39 PM
radixhound radixhound is offline
Member
 
Join Date: Feb 2007
Posts: 11
Default 500 Errors with older sites after update to 4.0.10 etc.

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..?

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
Reply With Quote
  #2  
Old 09-10-2009, 12:49 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
Looks like a problem between Gem and older Rails releases, nothing to do with the RailsRunder.rb .
Reply With Quote
  #3  
Old 09-10-2009, 01:19 PM
radixhound radixhound is offline
Member
 
Join Date: Feb 2007
Posts: 11
Quote:
Originally Posted by mistwang View Post
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.
Reply With Quote
  #4  
Old 09-10-2009, 02:09 PM
radixhound radixhound is offline
Member
 
Join Date: Feb 2007
Posts: 11
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.

At least it works!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 10:47 AM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.