Problem running Rails app with dispatch.lsapi

Discussion in 'Install/Configuration' started by dougconran, Jan 3, 2010.

  1. dougconran

    dougconran New Member

    Hi,

    I've recently installed Litespeed Standard (v 4.0.11) onto a Suse Linux 2.6.27.19-5-pae system and am having problems configuring it to run Rails applications.

    I've followed (to the letter as far as I can see) the instructions described in the Rails Manual Configuration wiki, mounting the application to a URL called /ruby/. I can see the Rails welcome page when I enter <domain name>/ruby/ in the browser but get an error

    Code:
    Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0
    
    Fatal error: Unknown: Failed opening required 'LS' (include_path='.:/usr/local/lsws/lsphp5/lib/php') in Unknown on line 0
    when I try and access the application proper.

    I also have the following error in the server log:-

    Code:
    ERROR	execve() failed with errno=2, when try to start Fast CGI application: /home/dconran/rails/hello/public/dispatch.lsapi!
    As far as I can see everything that needs to has executable permissions. What throws me a bit is that litespeed appears to be trying to run dispatch.lsapi as a Fast CGI app whereas it is definitely configured as a LSAPI one.

    I have managed to get everything running as a separate virtual host by following the RoR Easy Configuration instructions but I need to be able to get it to run alongisde Perl apps in a single host.

    Any help would be much appreciated.

    TIA

    Doug
  2. dougconran

    dougconran New Member

    Oops, I can answer this myself, now. The execve error was denoting that there was a problem with the shebang line in dispatch.lsapi and, lo and behold, it was set up for #!/usr/local/bin/ruby whereas my copy of ruby is in /usr/bin.

    So, problem solved and many thanks for a pretty awesome application (which I am still getting to grips with :))

    Doug

Share This Page