Bundler

I have IronRuby 1.0 with RubyGems 1.3.6 and Bundler 0.9.25.

When I run Bundler.setup I get this error:

NameError: undefined method gem' for moduleBundler::SharedHelpers’
from
C:/IronRuby-1.0/lib/ironruby/gems/1.8/gems/bundler-0.9.25/lib/bundler/shared_helpers.rb:90:in
reverse_rubygems_kernel_mixin' from C:/IronRuby-1.0/lib/ironruby/gems/1.8/gems/bundler-0.9.25/lib/bundler/shared_helpers.rb:84:inmodule_eval’
from
C:/IronRuby-1.0/lib/ironruby/gems/1.8/gems/bundler-0.9.25/lib/bundler/shared_helpers.rb:84:in
reverse_rubygems_kernel_mixin' from C:/IronRuby-1.0/lib/ironruby/gems/1.8/gems/bundler-0.9.25/lib/bundler/shared_helpers.rb:95:incripple_rubygems’
from
C:/IronRuby-1.0/lib/ironruby/gems/1.8/gems/bundler-0.9.25/lib/bundler/runtime.rb:18:in
setup' from C:/IronRuby-1.0/lib/ironruby/gems/1.8/gems/bundler-0.9.25/lib/bundler.rb:76:ingem_setup’
from (irb):3
from C:/IronRuby-1.0/lib/ruby/1.8/irb.rb:150:in eval_input' from C:/IronRuby-1.0/lib/ruby/1.8/irb.rb:263:insignal_status’
from C:/IronRuby-1.0/lib/ruby/1.8/irb.rb:147:in eval_input' from C:/IronRuby-1.0/lib/ruby/1.8/irb.rb:146:ineval_input’
from C:/IronRuby-1.0/lib/ruby/1.8/irb.rb:70:in start' from C:/IronRuby-1.0/lib/ruby/1.8/irb.rb:69:incatch’
from C:/IronRuby-1.0/lib/ruby/1.8/irb.rb:69:in `start’
from C:/IronRuby-1.0/bin/irb:13

reverse_rubygems_kernel_mixin looks like this:
def reverse_rubygems_kernel_mixin
# Disable rubygems’ gem activation system
::Kernel.class_eval do
if private_method_defined?(:gem_original_require)
alias rubygems_require require
alias require gem_original_require
end

    undef gem
  end
end

If I run this in irb I get this error:
NameError: undefined method gem' for classObject’

  ::Kernel.class_eval do
    undef gem
  end

Any ideas?

try doing a require ‘rubygems’ as first line in your file. That should
make
the gem method available

Met vriendelijke groeten - Best regards - Salutations
Ivan Porto C.
Web: http://whiterabbitconsulting.eu - http://flanders.co.nz
Twitter: http://twitter.com/casualjim
Author of IronRuby in Action (http://manning.com/carrero)
Microsoft IronRuby/C# MVP

Looks like IronRuby bug. This works in MRI but doesn’t in IronRuby:

module Kernel
def gem
end
end

module M
Kernel.class_eval do
p method(:gem)
undef gem
end
end

Will look at it. Thanks for reporting the issue.

Tomas

Should be fixed now in our internal repo. You can apply the attached
patch if you want to try it before we push the sources out.

Tomas

Tomas where do I find your internal repo?
I had a look on github but there do not seem to be any recent commits.

Tomas M. wrote:

Should be fixed now in our internal repo. You can apply the attached
patch if you want to try it before we push the sources out.

Tomas

I already am:

require ‘rubygems’
require ‘bundler’
Bundler.setup

I have also applied this fix (if it makes a difference)
http://marcinobel.com/index.php/bug-invalid-exec_format-ir/

Other than that it is a fresh IronRuby 1.0 install

This will be pushed out by end of the day.

JD


From: [email protected]
[[email protected]] on behalf of Derek Ekins
[[email protected]]
Sent: Monday, June 21, 2010 12:36 AM
To: [email protected]
Subject: Re: [Ironruby-core] Bundler

Tomas where do I find your internal repo?
I had a look on github but there do not seem to be any recent commits.

Tomas M. wrote:

Should be fixed now in our internal repo. You can apply the attached
patch if you want to try it before we push the sources out.

Tomas


Posted via http://www.ruby-forum.com/.


Ironruby-core mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ironruby-core