LiteSpeed Support Forums

LiteSpeed Support Forums (http://www.litespeedtech.com/support/forum/index.php)
-   Ruby/Rails (http://www.litespeedtech.com/support/forum/forumdisplay.php?f=20)
-   -   Problem with latest RailsRunner.rb and old Rails version (http://www.litespeedtech.com/support/forum/showthread.php?t=3877)

andreas 03-15-2010 02:00 AM

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.

mistwang 03-17-2010 10:16 PM

Can you give complete code around that line? not that familiar with ruby syntax. :-)

andreas 03-18-2010 10:57 AM

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'

mistwang 03-18-2010 05:47 PM

Thanks! We will apply the change.


All times are GMT -7. The time now is 04:21 AM.