• Home »
  • Errors »
  • LiteSpeed: [STDERR] /usr/lib/ruby/site_ruby/1.8/ rubygems/custom_require.rb:31:in `gem_original_require’: no such file to load — lsapi (MissingSourceFile)

LiteSpeed: [STDERR] /usr/lib/ruby/site_ruby/1.8/ rubygems/custom_require.rb:31:in `gem_original_require’: no such file to load — lsapi (MissingSourceFile)

After restarting LiteSpeed on a server used to develop various Ruby applications there was an error in the LSWS logs. It should be pointed out that the below error was received after straightening out a Ruby installation problem that the server had. The issue was two versions of Ruby were installed with one being installed via source and the other being installed via the Yum Package Manager on this CentOS server. Once the Ruby installation issue was resolved I thought that Rubygems and all of the proper gems had been installed though that was not the case as explained in the below resolution.

LiteSpeed Web Server Eror In stderr.log:

2010-12-10 18:04:40.318 [STDERR] /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- lsapi (MissingSourceFile)
        from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
        from /home/web/redmine/vendor/rails/activesupport/lib/active_support/dependencies.rb:156:in `require'
2010-12-10 18:04:40.318 [STDERR]        from /home/web/redmine/vendor/rails/activesupport/lib/active_support/dependencies.rb:521:in `new_constants_in'
        from /home/web/redmine/vendor/rails/activesupport/lib/active_support/dependencies.rb:156:in `require'
        from /var/lsws/fcgi-bin/RailsRunner.rb:29
2010-12-10 18:04:40.910 [STDERR] /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- lsapi (MissingSourceFile)
        from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
        from /home/web/redmine/vendor/rails/activesupport/lib/active_support/dependencies.rb:156:in `require'
        from /home/web/redmine/vendor/rails/activesupport/lib/active_support/dependencies.rb:521:in `new_constants_in'
        from /home/web/redmine/vendor/rails/activesupport/lib/active_support/dependencies.rb:156:in `require'
        from /var/lsws/fcgi-bin/RailsRunner.rb:29
2010-12-10 18:04:41.457 [STDERR] /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- lsapi (MissingSourceFile)
        from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
2010-12-10 18:04:41.457 [STDERR]        from /home/web/redmine/vendor/rails/activesupport/lib/active_support/dependencies.rb:156:in `require'
        from /home/web/redmine/vendor/rails/activesupport/lib/active_support/dependencies.rb:521:in `new_constants_in'
        from /home/web/redmine/vendor/rails/activesupport/lib/active_support/dependencies.rb:156:in `require'
        from /var/lsws/fcgi-bin/RailsRunner.rb:29

As you can see in the above stderr.log file output LiteSpeed is complaining about a required gem that is not installed called lsapi. LSAPI is LiteSpeed’s open-source API between external applications and the LiteSpeed web server. Resolving this was easy since I am familiar with the necessary gem required to run a Ruby application via LiteSpeed.

Resolve LiteSpeed LSAPI No Such File To Load Error:

To resolve this issue simply install the ruby-lsapi Ruby gem using the “gem install” command as shown below.

Install ruby-lsapi On Linux Server:

[root@dev ~]# 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...
[root@dev ~]#

Once the ruby-lsapi gem has been installed I restarted LiteSpeed and the Ruby application, which in this case happened to be Redmine project management software, worked without issue. In this scenario it was a silly mistake forgetting to reinstall ruby-lsapi since it had already been installed however I figured it would be possible to someone not familiar with LiteSpeed/Ruby/Gems to run into this issue and need to be pointed in the right direction by installing the ruby-lsapi gem.

The Ruby Programming Language (Paperback)

By (author): David Flanagan, Yukihiro Matsumoto


List Price: $39.99 USD
New From: $21.49 USD In Stock
Used from: $11.30 USD In Stock


New From: $35.43 USD In Stock
Used from: $30.02 USD In Stock

Share