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 module `Bundler::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:in `module_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:in `cripple_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:in `gem_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:in `signal_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:in `eval_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:in `catch'' 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 class `Object'' ::Kernel.class_eval do undef gem end Any ideas? -- Posted via http://www.ruby-forum.com/.
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 Carrero 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 On Fri, Jun 18, 2010 at 1:21 PM, Derek Ekins <lists at ruby-forum.com> wrote:> 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 module `Bundler::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:in > `module_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:in > `cripple_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:in > `gem_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:in `signal_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:in `eval_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:in `catch'' > 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 class `Object'' > > ::Kernel.class_eval do > undef gem > end > > Any ideas? > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20100618/478cd1d4/attachment.html>
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 -- Posted via http://www.ruby-forum.com/.
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 -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Derek Ekins Sent: Friday, June 18, 2010 5:40 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Bundler 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 -- Posted via http://www.ruby-forum.com/. _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
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 -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Tomas Matousek Sent: Friday, June 18, 2010 9:32 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Bundler 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 -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Derek Ekins Sent: Friday, June 18, 2010 5:40 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Bundler 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 -- Posted via http://www.ruby-forum.com/. _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
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 Matousek 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/.
This will be pushed out by end of the day. JD ________________________________________ From: ironruby-core-bounces at rubyforge.org [ironruby-core-bounces at rubyforge.org] on behalf of Derek Ekins [lists at ruby-forum.com] Sent: Monday, June 21, 2010 12:36 AM To: ironruby-core at rubyforge.org 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 Matousek 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 Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core