Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 08-05-2011, 06:19 AM   #1
Registered: Aug 2006
Distribution: Ubuntu, CentOS
Posts: 31

Rep: Reputation: 15
Ruby - gem_original_require': no such file to load -- search (LoadError)


When trying to start a rails application using the command :

 sudo mongrel_rails cluster::start -C /path/to/conf.yml
The app doesn't start, and the log shows :

/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- search (LoadError)
The contents of the file '/usr/lib/ruby/1.8/rubygems/custom_require.rb' is as follows :

# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
# All rights reserved.
# See LICENSE.txt for permissions.

require 'rubygems'

module Kernel

  # The Kernel#require from before RubyGems was loaded.

  alias gem_original_require require

  # When RubyGems is required, Kernel#require is replaced with our own which
  # is capable of loading gems on demand.
  # When you call <tt>require 'x'</tt>, this is what happens:
  # * If the file can be loaded from the existing Ruby loadpath, it
  #   is.
  # * Otherwise, installed gems are searched for a file that matches.
  #   If it's found in gem 'y', that gem is activated (added to the
  #   loadpath).
  # The normal <tt>require</tt> functionality of returning false if
  # that file has already been loaded is preserved.

  def require(path) # :doc:
    gem_original_require path
  rescue LoadError => load_error
    if load_error.message =~ /#{Regexp.escape path}\z/ and
       spec = Gem.searcher.find(path) then
      Gem.activate(, "= #{spec.version}")
      gem_original_require path
      raise load_error

  private :require
  private :gem_original_require

If I run the command
ruby -rubygems -e 'require "search"'
I get :

/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- search (LoadError)
        from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
        from -e:1
Can anybody offer any help on this please?



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Ruby-FFI: `ffi_libraries': no library specified (LoadError) quanta Linux - Server 2 04-30-2011 09:31 PM
Any issues installing Ruby Gems and Ruby on Rails in Slackware? Lufbery Slackware 8 02-09-2011 08:22 PM
LXer: Sunspot: A Solr-Powered Search Engine for Ruby LXer Syndicated Linux News 0 05-27-2009 05:00 PM
[Ruby] File re-naming lmcilwain Programming 1 01-14-2007 05:52 PM
Can you help me with search in Ruby on Rails? viniosity Programming 1 01-05-2007 07:25 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:38 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration