|
|

06-05-2012, 10:15 AM
|
|
Member
|
|
Join Date: May 2012
Posts: 10
|
|
Problem installing RoR app in Litespeed (no such file to load -- lsapi)
Hi guys!
I am having some problems installing Redmine (as an example of RoR app) in Litespeed (cPanel 11.32/CloudLinux)
We are installing Redmine from a test cPanel account (logged as a normal user for redmine installation steps), the goal is document the process and make a tutorial to teach our clients about how to use Litespeed + Ruby / RoR.
Its a shared hosting server with cPanel, to complete the installation of Redmine 1.4 I used several resources:
http://www.asyndetic.com/blog/2012/0...g-environment/
http://www.litespeedtech.com/support...iki:ruby_rails
http://www.litespeedtech.com/support...:rails_hosting
http://www.geekstorage.com/blog/inde...at-geekstorage
Finally we achieve the installation of Redmine but does not run properly, get this error:
Code:
503 Service Unavailable
Checking the logs I see:
Code:
2012-06-05 18:22:09.558 [STDERR] /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.14/lib/active_support/dependencies.rb:182:in `require': no such file to load -- lsapi (MissingSourceFile)
from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.14/lib/active_support/dependencies.rb:182:in `require'
from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.14/lib/active_support/dependencies.rb:547:in `new_constants_in'
from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.14/lib/active_support/dependencies.rb:182:in `require'
from /usr/local/lsws/fcgi-bin/RailsRunner.rb:29
We have installed ruby-lsapi, restarted the app, restarted LiteSpeed and nothing... always have the same error.
Other info:
Code:
# gem list --local | grep lsapi
ruby-lsapi (4.0)
# ruby -v
ruby 1.8.7 (2011-02-18 patchlevel 334) [x86_64-linux]
# gem -v
1.8.24
# rails -v
Rails 2.3.14
Litespeed 4.1.12
cPanel 11.32
I would appreciate any help
Thanks
Last edited by tracktor1; 06-06-2012 at 10:58 AM..
|

06-11-2012, 08:03 PM
|
|
LiteSpeed Staff
|
|
Join Date: May 2003
Location: New Jersey
Posts: 7,590
|
|
|
I think you need to update cagefs to include ruby lsapi. it only installed at server level, but not included in cagefs for each user account.
|

06-12-2012, 02:51 AM
|
|
Member
|
|
Join Date: May 2012
Posts: 10
|
|
Hi mistwang,
First, thanks for the reply.
The problem is I do not use cagefs (disabled).
I found other user with (apparently) the same problem:
http://www.question-defense.com/2010...singsourcefile
But this no work for me, ruby-lsapi is installed.
Code:
# gem install ruby-lsapi
Building native extensions. This could take a while...
Successfully installed ruby-lsapi-4.0
1 gem installed
Installing ri documentation for ruby-lsapi-4.0...
Installing RDoc documentation for ruby-lsapi-4.0...
# service lsws restart
# touch /home/user_cpanel/.ls_rails_config
We're a little desperate ... any ideas would be appreciated.
Thanks!
|

06-15-2012, 06:53 PM
|
|
Member
|
|
Join Date: May 2012
Posts: 10
|
|
Problem solved! I reinstalled ruby-lsapi manually and now work fine... but I have other problem.
Redmine appear to work fine if I access for example to:
subdomain.domain.com/admin
subdomain.domain.com/projects
subdomain.domain.com/my/account
etc...
But when I try access to:
subdomain.domain.com
I see the public directory content (listing)
I tried with this rules but dont work:
Code:
RewriteRule ^$ index.html [QSA]
RewriteRule ^([^.]+)$ $1.html [QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ dispatch.lsapi [QSA,L]
Please some help! with this
Thanks!
|

06-16-2012, 11:35 AM
|
|
LiteSpeed Staff
|
|
Join Date: May 2003
Location: New Jersey
Posts: 7,590
|
|
|
is .htaccess enabled?
Do you have "RewriteEngine on" in the .htaccess?
|

06-16-2012, 05:43 PM
|
|
Member
|
|
Join Date: May 2012
Posts: 10
|
|
>is .htaccess enabled?
Yes, is enabled.
>Do you have "RewriteEngine on" in the .htaccess?
Yes.
In this moment the .htaccess appear to work (I think this was a browser cache problem) but the main problem continues 
The problem now is the same comented in the last reply but I see a strange behavior:
When the rules are added in the .htaccess, redmine stop working, all petitions redirect to "dispatch.lsapi" but instead run, it displays the contents of this file (permissions 755 in this file):
Code:
#!/usr/bin/ruby
if GC.respond_to?(:copy_on_write_friendly=)
GC.copy_on_write_friendly = true
end
require File.dirname(__FILE__) + "/../config/environment" unless defined?(RAILS_ROOT)
# If you're using RubyGems and mod_ruby, this require should be changed to an absolute path one, like:
# "/usr/local/lib/ruby/gems/1.8/gems/rails-0.8.0/lib/dispatcher" -- otherwise performance is severely impaired
require "dispatcher"
require "lsapi"
while LSAPI.accept != nil
Dispatcher.dispatch
end
When I remove the .htaccess, Redmine work fine without using rules or dispatch.lsapi (strange?) but the first problem appear again, access to index dont work, appear the directory listing.
|
| 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 05:08 PM.
|
|