RailsRunner error

Discussion in 'Install/Configuration' started by fugu99, Feb 16, 2007.

  1. fugu99

    fugu99 New Member

    Hi there,

    I'm new to Litespeed and RoR. I'm trying to configure RoR with Litespeed and I followed the wiki instructions from this link:
    http://www.litespeedtech.com/support/wiki/doku.php?id=litespeed_wiki:ruby_rails_easy

    It is not working and I checked the stderr.log and I noticed the following:

    /usr/local/lsws/fcgi-bin/RailsRunner.rb:3:in `require': no such file to load -- /home/fugu99/reporting/beta2.1/config/environment (LoadError)
    from /usr/local/lsws/fcgi-bin/RailsRunner.rb:3

    Does anyone know what this means?

    Thanks for the help in advance.

    Regards,
    Tom
  2. mistwang

    mistwang LiteSpeed Staff

    Does /home/fugu99/reporting/beta2.1/config/environment.rb exit?
    Is /home/fugu99/reporting/beta2.1/ your rails application root directory?
  3. fugu99

    fugu99 New Member

    Yes the environment.rb file exists, and ../beta2.1/ is my rails application root directory. I was wondering if this had anything to do with the permissions on the directory and the fact that I'm running the web server as nobody.
  4. mistwang

    mistwang LiteSpeed Staff

    Yes, it should be a permission problem. You need to either use suEXEC or give nobody proper permission.
    For suEXEC, please check our wiki.
  5. fugu99

    fugu99 New Member

    Thanks for the help. It was a permissions issue. I'm making some progress, but now I'm getting an Oracle error when the rails app initializes:

    /usr/lib/ruby/site_ruby/1.8/oci8.rb:49:in `create': ERROR (OCIError)
    from /usr/lib/ruby/site_ruby/1.8/oci8.rb:49
    from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
    from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
    from /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/dependencies.rb:496:in `require'
    from /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/dependencies.rb:343:in `new_constants_in'
    from /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/dependencies.rb:496:in `require'
    from /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/core_ext/kernel/requires.rb:7:in `require_library_or_gem'
    from /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/core_ext/kernel/reporting.rb:11:in `silence_warnings'
    ... 21 levels...
    from /home/fugu99/reporting/beta2.1/public/../config/environment.rb:11:in `require'


    The application works fine with mongrel.

    Thanks for the help in advance,
    Tom
  6. mistwang

    mistwang LiteSpeed Staff

    You need to set two environment variable in "Environment" under "Ruby" tab.
    Something like:

    LD_LIBRARY_PATH=/export/home/rawlog/oracle/lib
    ORACLE_HOME=/oracle/g01/software/rdbms/9.2.0.6

  7. fugu99

    fugu99 New Member

    I've tried this:

    ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0
    LD_LIBRARY_PATH=/usr/lib/oracle/xe/app/oracle/product/10.2.0/client/lib

    and:

    ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/client
    LD_LIBRARY_PATH=/usr/lib/oracle/xe/app/oracle/product/10.2.0/client/lib

    I've restarted the server and I still get the Oracle error:
    /usr/lib/ruby/site_ruby/1.8/oci8.rb:49:in `create': ERROR (OCIError)


    -Tom
  8. mistwang

    mistwang LiteSpeed Staff

    Check your shell environment variables, if there is anyone related to ORACLE, add it in ruby environment as well.

Share This Page