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 <li...@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@rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core >
_______________________________________________ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core