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

Go Back   LiteSpeed Support Forums > External Applications > Ruby/Rails > Problem with latest RailsRunner.rb and old Rails version

Reply
 
Thread Tools Display Modes
  #1  
Old 03-15-2010, 02:00 AM
andreas andreas is offline
Senior Member
 
Join Date: Aug 2006
Posts: 91
Default Problem with latest RailsRunner.rb and old Rails version

Since updating to LSWS 4.0.13 I get the following error from an old Rails app:
/opt/lsws/fcgi-bin/RailsRunner.rb:11: uninitialized constant Rails::VERSION (NameError)
I worked around the problem by adding "rescue '2.0.0'" after the offending line.
Reply With Quote
  #2  
Old 03-17-2010, 10:16 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,583
Can you give complete code around that line? not that familiar with ruby syntax. :-)
Reply With Quote
  #3  
Old 03-18-2010, 10:57 AM
andreas andreas is offline
Senior Member
 
Join Date: Aug 2006
Posts: 91
The line is:
rails_ver = Rails::VERSION::STRING

it just means that this constant is not defined in older Rails versions. A simple (but dirty) workaround is to replace the line with

rails_ver = Rails::VERSION::STRING rescue '2.0.0'
Reply With Quote
  #4  
Old 03-18-2010, 05:47 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,583
Thanks! We will apply the change.
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 09:06 PM.



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