|
|

11-19-2012, 07:43 AM
|
|
Member
|
|
Join Date: Nov 2012
Posts: 11
|
|
LSAPI and Shared Hosting not working
The wiki regarding RoR in a shared environment is pretty short:
http://www.litespeedtech.com/support...:rails_hosting
It says to enable the 'Rails shared hosting', it doesn't even go into detail about installing Rails or the LSAPI, one presumes that comes from the other two guides.
However, having done the install, enabled the shared hosting for rails, the error_log show:
Code:
2012-11-19 15:36:51.291 [INFO] [127.0.0.1:51156-0#APVH_exmaple.com:lsapi] connection to [/tmp/lshttpd/APVH_example.com:testApp.sock] on request #0, confirmed, 0, associated process: -1, running: 0, error: Connection reset by peer!
the stderr log shows:
Code:
2012-11-19 15:36:51.622 [STDERR] /usr/local/lsws/fcgi-bin/RailsRunner.rb:131:in `require': cannot load such file -- config/environment (LoadError)
2012-11-19 15:36:51.622 [STDERR] from /usr/local/lsws/fcgi-bin/RailsRunner.rb:131:in `<main>'
2012-11-19 15:36:51.974 [STDERR] /usr/local/lsws/fcgi-bin/RailsRunner.rb:131:in `require': cannot load such file -- config/environment (LoadError2012-11-19 15:36:51.974 [STDERR] )
from /usr/local/lsws/fcgi-bin/RailsRunner.rb:131:in `<main>'
This file does exist, and actually if you strace the lsws process it shows the file being accessed at the RoR application location within the user account.
Code:
926369 open("config/environment.rb", O_RDONLY <unfinished ...>
926369 <... read resumed> "# Load the rails application\nrequire File.expand_path('../application', __FILE__)\n\n# Initialize the rails application\nRor::Application.initialize!\n", 147) = 147
Anyone have any suggestions here?
|

11-20-2012, 08:13 AM
|
|
LiteSpeed Staff
|
|
Join Date: May 2003
Location: New Jersey
Posts: 7,590
|
|
change that line to
Quote:
|
require './config/environment'
|
|

11-21-2012, 01:50 AM
|
|
Member
|
|
Join Date: Nov 2012
Posts: 11
|
|
Thanks, that worked, but now there's another error:
Code:
#
2012-11-21 10:02:53.833 [STDERR] /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.2.9/lib/active_support/dependencies.rb:251:in `require': cannot load such file -- initializer (LoadError)
from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.2.9/lib/active_support/dependencies.rb:251:in `block in require'
from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.2.9/lib/active_support/dependencies.rb:236:in `load_dependency'
from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.2.9/lib/active_support/dependencies.rb:251:in `require'
from /usr/local/lsws/fcgi-bin/RailsRunner.rb:133:in `<main>'
Looking at line 133, it's another 'require':
Code:
require 'initializer'
Last edited by andyf; 11-21-2012 at 02:06 AM..
|

11-21-2012, 01:47 PM
|
|
LiteSpeed Staff
|
|
Join Date: May 2003
Location: New Jersey
Posts: 7,590
|
|
|
Looks like there is no enough information for litespeed to detect the version of Rails being used, and it defaults to Rails 2.3 branch of code.
If the Rails app involved is >2.3 release, you should set "RAILS_GEM_VERSION" variable in "config/environment.rb" explicitly for that application.
|

11-22-2012, 01:10 AM
|
|
Member
|
|
Join Date: Nov 2012
Posts: 11
|
|
Thanks, again another error:
Code:
2012-11-22 09:08:33.770 [STDERR] /usr/local/lsws/fcgi-bin/RailsRunner.rb:29:in `require')
from /usr/local/lsws/fcgi-bin/RailsRunner.rb:29:in `<main>'
2012-11-22 09:08:33.771 [STDERR] cannot load such file -- lsapi (LoadError2012-11-22 09:08:33.770 [STDERR] : 2012-11-22 09:08:34.346 [STDERR] /usr/local/lsws/fcgi-bin/RailsRunner.rb:29:in `require': cannot load such file -- lsapi (LoadError)
2012-11-22 09:08:34.346 [STDERR] from /usr/local/lsws/fcgi-bin/RailsRunner.rb:29:in `<main>'
2012-11-22 09:08:34.920 [STDERR] /usr/local/lsws/fcgi-bin/RailsRunner.rb:29:in `require': cannot load such file -- lsapi (LoadError)
2012-11-22 09:08:34.921 [STDERR] from /usr/local/lsws/fcgi-bin/RailsRunner.rb:29:in `<main>'
I'm surprised by the amount of problems getting this working. Would you consider the ruby LSAPI to be production ready?
|

11-23-2012, 08:29 AM
|
|
LiteSpeed Staff
|
|
Join Date: May 2003
Location: New Jersey
Posts: 7,590
|
|
|
Those errors are due to Ruby/Gem/Rails update. It was working well in production for many years.
For the "require lsapi" error, you need to locate the gem folder, like
/usr/lib64/ruby/gems/1.9.1/gems/ruby-lsapi-4.0/
Just follow the instruction in README to manually install it into ruby system folder, it can be always located by ruby.
|
| Thread Tools |
|
|
| Display Modes |
Hybrid Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 02:38 AM.
|
|