#476 √ resolved
Le Huy

[BUG] rubygems does not work because rubinius returns different load error message from what rubygems expects

Reported by Le Huy | April 5th, 2008 @ 08:05 PM | in 1.0 preview

rubygems/custom_require.rb

...
 def require(path) # :nodoc:
    gem_original_require path
  rescue LoadError => load_error
    if load_error.message =~ /\A[Nn]o such file to load -- #{Regexp.escape path}\z/ and
       spec = Gem.searcher.find(path) then
      Gem.activate(spec.name, "= #{spec.version}")
      gem_original_require path
    else
      raise load_error
    end
  end

rubygems expects load error message "no such file to load ..."

while rubinius returns "Did not find file to load ..."

huy@huy-desktop:~$ rbx
irb(main):001:0> require 'foo'
LoadError: Did not find file to load: foo
   from Compile.unified_load at kernel/core/compile.rb:154
   from Kernel(Object)#require at kernel/core/compile.rb:450
   from Object#irb_binding {} at (irb):1
irb(main):002:0> 

Comments and changes to this ticket

Please Login or create a free account to add a new comment.

You can update this ticket by sending an email to from your email client. (help)

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Tags