Maciej Bliziński
2009-Aug-18 14:03 UTC
[rspec-users] "undefined method `gem'' for main:Object" when installing rspec from the sources
Hello rspec, I''m working on a Solaris rspec package (for OpenCSW). I pulled the current git sources as described at http://wiki.github.com/dchelimsky/rspec in the "Build and install the rspec gem from source" section. After ''rake gem'' I''m getting: /export/home/maciej/src/rspec/Rakefile:92: warning: ambiguous first argument; put parentheses or even spaces rake aborted! undefined method `gem'' for main:Object /export/home/maciej/src/rspec/Rakefile:2 (See full trace by running task with --trace) (in /export/home/maciej/src/rspec) Does it mean that the gem target is missing from the Rakefile, or am I doing something wrong? More information: $ rake --version rake, version 0.8.7 Last git commit: 3cb2913a43c172b629d19bd32ba54e8cbb25e754 Maciej
David Chelimsky
2009-Aug-18 15:06 UTC
[rspec-users] "undefined method `gem'' for main:Object" when installing rspec from the sources
2009/8/18 Maciej Blizi?ski <maciej.blizinski at gmail.com>:> Hello rspec, > > I''m working on a Solaris rspec package (for OpenCSW). I pulled the > current git sources as described at http://wiki.github.com/dchelimsky/rspec > in the "Build and install the rspec gem from source" section. After > ''rake gem'' I''m getting: > > /export/home/maciej/src/rspec/Rakefile:92: warning: ambiguous first > argument; put parentheses or even spaces > rake aborted! > undefined method `gem'' for main:Object > /export/home/maciej/src/rspec/Rakefile:2 > (See full trace by running task with --trace) > (in /export/home/maciej/src/rspec) > > Does it mean that the gem target is missing from the Rakefile, or am I > doing something wrong? > > More information: > > $ rake --version > rake, version 0.8.7What Ruby and Rubygems versions:? $ ruby --version $ gem --version> > Last git commit: > 3cb2913a43c172b629d19bd32ba54e8cbb25e754 > > Maciej > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >
Maciej Bliziński
2009-Aug-18 15:16 UTC
[rspec-users] "undefined method `gem'' for main:Object" when installing rspec from the sources
On Tue, Aug 18, 2009 at 4:06 PM, David Chelimsky<dchelimsky at gmail.com> wrote:>> More information: >> >> $ rake --version >> rake, version 0.8.7 > > What Ruby and Rubygems versions:? > > $ ruby --version > $ gem --version$ ruby --version ruby 1.8.7 (2009-06-12 patchlevel 174) [i386-solaris2.8] $ gem --version 0.9.2
David Chelimsky
2009-Aug-18 15:20 UTC
[rspec-users] "undefined method `gem'' for main:Object" when installing rspec from the sources
2009/8/18 Maciej Blizi?ski <maciej.blizinski at gmail.com>:> On Tue, Aug 18, 2009 at 4:06 PM, David Chelimsky<dchelimsky at gmail.com> wrote: >>> More information: >>> >>> $ rake --version >>> rake, version 0.8.7 >> >> What Ruby and Rubygems versions:? >> >> $ ruby --version >> $ gem --version > > $ ruby --version > ruby 1.8.7 (2009-06-12 patchlevel 174) [i386-solaris2.8] > $ gem --version > 0.9.2That is a very old version of rubygems (2007-02-05) which probably doesn''t support the gem method yet (just guessing). I''m using 1.3.4 (though it looks like there is a 1.3.5 version I missed). I''d recommend upgrading. Cheers, David
Maciej Bliziński
2009-Aug-18 17:34 UTC
[rspec-users] "undefined method `gem'' for main:Object" when installing rspec from the sources
On Tue, Aug 18, 2009 at 4:20 PM, David Chelimsky<dchelimsky at gmail.com> wrote:> That is a very old version of rubygems (2007-02-05) which probably > doesn''t support the gem method yet (just guessing). I''m using 1.3.4 > (though it looks like there is a 1.3.5 version I missed). I''d > recommend upgrading.I''ve upgraded rubygems: maciej at solaris /export/home/maciej/src/rspec $ rake --version rake, version 0.8.7 maciej at solaris /export/home/maciej/src/rspec $ gem --version 1.3.5 maciej at solaris /export/home/maciej/src/rspec $ rake gem (in /export/home/maciej/src/rspec) /export/home/maciej/src/rspec/Rakefile:92: warning: ambiguous first argument; put parentheses or even spaces rake aborted! undefined method `gem'' for main:Object /export/home/maciej/src/rspec/Rakefile:2 (See full trace by running task with --trace) I''ve re-run it with --trace: maciej at solaris /export/home/maciej/src/rspec $ rake --trace gem (in /export/home/maciej/src/rspec) /export/home/maciej/src/rspec/Rakefile:92: warning: ambiguous first argument; put parentheses or even spaces rake aborted! undefined method `gem'' for main:Object /export/home/maciej/src/rspec/Rakefile:2 /opt/csw/lib/ruby/site_ruby/1.8/rake.rb:2383:in `load'' /opt/csw/lib/ruby/site_ruby/1.8/rake.rb:2383:in `raw_load_rakefile'' /opt/csw/lib/ruby/site_ruby/1.8/rake.rb:2017:in `load_rakefile'' /opt/csw/lib/ruby/site_ruby/1.8/rake.rb:2068:in `standard_exception_handling'' /opt/csw/lib/ruby/site_ruby/1.8/rake.rb:2016:in `load_rakefile'' /opt/csw/lib/ruby/site_ruby/1.8/rake.rb:2000:in `run'' /opt/csw/lib/ruby/site_ruby/1.8/rake.rb:2068:in `standard_exception_handling'' /opt/csw/lib/ruby/site_ruby/1.8/rake.rb:1998:in `run'' /opt/csw/bin/rake:32 Any ideas? Maciej
David Chelimsky
2009-Aug-18 17:54 UTC
[rspec-users] "undefined method `gem'' for main:Object" when installing rspec from the sources
2009/8/18 Maciej Blizi?ski <maciej.blizinski at gmail.com>:> On Tue, Aug 18, 2009 at 4:20 PM, David Chelimsky<dchelimsky at gmail.com> wrote: >> That is a very old version of rubygems (2007-02-05) which probably >> doesn''t support the gem method yet (just guessing). I''m using 1.3.4 >> (though it looks like there is a 1.3.5 version I missed). I''d >> recommend upgrading. > > I''ve upgraded rubygems: > > maciej at solaris /export/home/maciej/src/rspec $ rake --version > rake, version 0.8.7 > maciej at solaris /export/home/maciej/src/rspec $ gem --version > 1.3.5 > maciej at solaris /export/home/maciej/src/rspec $ rake gem > (in /export/home/maciej/src/rspec) > /export/home/maciej/src/rspec/Rakefile:92: warning: ambiguous first > argument; put parentheses or even spaces > rake aborted! > undefined method `gem'' for main:Object > /export/home/maciej/src/rspec/Rakefile:2 > (See full trace by running task with --trace) > > I''ve re-run it with --trace: > > maciej at solaris /export/home/maciej/src/rspec $ rake ?--trace gem > (in /export/home/maciej/src/rspec) > /export/home/maciej/src/rspec/Rakefile:92: warning: ambiguous first > argument; put parentheses or even spaces > rake aborted! > undefined method `gem'' for main:Object > /export/home/maciej/src/rspec/Rakefile:2 > /opt/csw/lib/ruby/site_ruby/1.8/rake.rb:2383:in `load'' > /opt/csw/lib/ruby/site_ruby/1.8/rake.rb:2383:in `raw_load_rakefile'' > /opt/csw/lib/ruby/site_ruby/1.8/rake.rb:2017:in `load_rakefile'' > /opt/csw/lib/ruby/site_ruby/1.8/rake.rb:2068:in `standard_exception_handling'' > /opt/csw/lib/ruby/site_ruby/1.8/rake.rb:2016:in `load_rakefile'' > /opt/csw/lib/ruby/site_ruby/1.8/rake.rb:2000:in `run'' > /opt/csw/lib/ruby/site_ruby/1.8/rake.rb:2068:in `standard_exception_handling'' > /opt/csw/lib/ruby/site_ruby/1.8/rake.rb:1998:in `run'' > /opt/csw/bin/rake:32 > > Any ideas?Ugy - sorry to put you through that to land in the same spot. I really don''t have any ideas. I did run into an unrelated problem (manifest was out of date) and just pushed the fix for that. I''m able to build the gem using Ruby 1.8.7 with no warnings or errors. Anybody else here familiar w/ Solaris/Ruby idiosyncrasies?> > Maciej > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >
Maciej Bliziński
2009-Aug-19 12:15 UTC
[rspec-users] "undefined method `gem'' for main:Object" when installing rspec from the sources
On Tue, Aug 18, 2009 at 6:54 PM, David Chelimsky<dchelimsky at gmail.com> wrote:> I really don''t have any ideas. I did run into an unrelated problem > (manifest was out of date) and just pushed the fix for that. I''m able > to build the gem using Ruby 1.8.7 with no warnings or errors. > > Anybody else here familiar w/ Solaris/Ruby idiosyncrasies?I checked it under Ubuntu Hardy: $ rake --version rake, version 0.8.1 $ gem --version 1.1.1 $ git clone git://github.com/dchelimsky/rspec.git $ cd rspec $ rake gem (in /home/maciej/src/rspec) rake aborted! undefined method `gem'' for main:Object /home/maciej/src/rspec/Rakefile:2 (See full trace by running task with --trace) The same symptoms... it could due to gem version 1.1.1, though. Okay, testing with a newer version, on a different Linux box: maciej at fennel ~/src $ git clone git://github.com/dchelimsky/rspec.git Initialized empty Git repository in /home/maciej/src/rspec/.git/ remote: Counting objects: 56169, done. remote: Compressing objects: 100% (12694/12694), done. remote: Total 56169 (delta 41074), reused 55651 (delta 40664) Receiving objects: 100% (56169/56169), 7.05 MiB | 1360 KiB/s, done. Resolving deltas: 100% (41074/41074), done. maciej at fennel ~/src $ cd rspec maciej at fennel ~/src/rspec $ rake gem (in /home/maciej/src/rspec) rake aborted! Could not find RubyGem hoe (>= 2.0.0) /home/maciej/src/rspec/Rakefile:2 (See full trace by running task with --trace) maciej at fennel ~/src/rspec $ rake --version rake, version 0.8.7 maciej at fennel ~/src/rspec $ gem --version 1.3.1 So, the same symptoms, tested on Ubuntu Hardy, Gentoo and Solaris 10. It''s weird that you can''t reproduce the issue. Perhaps try with a fresh system? I install: ruby, rubygems, rake, git. Then the above sequence. Maciej
David Chelimsky
2009-Aug-19 12:24 UTC
[rspec-users] "undefined method `gem'' for main:Object" when installing rspec from the sources
2009/8/19 Maciej Blizi?ski <maciej.blizinski at gmail.com>:> On Tue, Aug 18, 2009 at 6:54 PM, David Chelimsky<dchelimsky at gmail.com> wrote: >> I really don''t have any ideas. I did run into an unrelated problem >> (manifest was out of date) and just pushed the fix for that. I''m able >> to build the gem using Ruby 1.8.7 with no warnings or errors. >> >> Anybody else here familiar w/ Solaris/Ruby idiosyncrasies? > > I checked it under Ubuntu Hardy: > > $ rake --version > rake, version 0.8.1 > $ gem --version > 1.1.1 > > $ git clone git://github.com/dchelimsky/rspec.git > $ cd rspec > $ rake gem > (in /home/maciej/src/rspec) > rake aborted! > undefined method `gem'' for main:Object > /home/maciej/src/rspec/Rakefile:2 > (See full trace by running task with --trace) > > The same symptoms... it could due to gem version 1.1.1, though. Okay, > testing with a newer version, on a different Linux box: > > maciej at fennel ~/src $ git clone git://github.com/dchelimsky/rspec.git > Initialized empty Git repository in /home/maciej/src/rspec/.git/ > remote: Counting objects: 56169, done. > remote: Compressing objects: 100% (12694/12694), done. > remote: Total 56169 (delta 41074), reused 55651 (delta 40664) > Receiving objects: 100% (56169/56169), 7.05 MiB | 1360 KiB/s, done. > Resolving deltas: 100% (41074/41074), done. > maciej at fennel ~/src $ cd rspec > maciej at fennel ~/src/rspec $ rake gem > (in /home/maciej/src/rspec) > rake aborted! > Could not find RubyGem hoe (>= 2.0.0) > /home/maciej/src/rspec/Rakefile:2 > (See full trace by running task with --trace) > maciej at fennel ~/src/rspec $ rake --version > rake, version 0.8.7 > maciej at fennel ~/src/rspec $ gem --version > 1.3.1 > > So, the same symptoms, tested on Ubuntu Hardy, Gentoo and Solaris 10.Not really the same symptoms. "Could not find RubyGem hoe" is not the same issue as "undefined method `gem''" The gem problem is related to outdated versions of rubygems. The hoe problem is solved with "gem install hoe" HTH, David> It''s weird that you can''t reproduce the issue. Perhaps try with a > fresh system? I install: ruby, rubygems, rake, git. Then the above > sequence. > > Maciej > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >
David Chelimsky
2009-Aug-19 12:36 UTC
[rspec-users] "undefined method `gem'' for main:Object" when installing rspec from the sources
On Wed, Aug 19, 2009 at 7:24 AM, David Chelimsky<dchelimsky at gmail.com> wrote:> 2009/8/19 Maciej Blizi?ski <maciej.blizinski at gmail.com>: >> On Tue, Aug 18, 2009 at 6:54 PM, David Chelimsky<dchelimsky at gmail.com> wrote: >>> I really don''t have any ideas. I did run into an unrelated problem >>> (manifest was out of date) and just pushed the fix for that. I''m able >>> to build the gem using Ruby 1.8.7 with no warnings or errors. >>> >>> Anybody else here familiar w/ Solaris/Ruby idiosyncrasies? >> >> I checked it under Ubuntu Hardy: >> >> $ rake --version >> rake, version 0.8.1 >> $ gem --version >> 1.1.1 >> >> $ git clone git://github.com/dchelimsky/rspec.git >> $ cd rspec >> $ rake gem >> (in /home/maciej/src/rspec) >> rake aborted! >> undefined method `gem'' for main:Object >> /home/maciej/src/rspec/Rakefile:2 >> (See full trace by running task with --trace) >> >> The same symptoms... it could due to gem version 1.1.1, though. Okay, >> testing with a newer version, on a different Linux box: >> >> maciej at fennel ~/src $ git clone git://github.com/dchelimsky/rspec.git >> Initialized empty Git repository in /home/maciej/src/rspec/.git/ >> remote: Counting objects: 56169, done. >> remote: Compressing objects: 100% (12694/12694), done. >> remote: Total 56169 (delta 41074), reused 55651 (delta 40664) >> Receiving objects: 100% (56169/56169), 7.05 MiB | 1360 KiB/s, done. >> Resolving deltas: 100% (41074/41074), done. >> maciej at fennel ~/src $ cd rspec >> maciej at fennel ~/src/rspec $ rake gem >> (in /home/maciej/src/rspec) >> rake aborted! >> Could not find RubyGem hoe (>= 2.0.0) >> /home/maciej/src/rspec/Rakefile:2 >> (See full trace by running task with --trace) >> maciej at fennel ~/src/rspec $ rake --version >> rake, version 0.8.7 >> maciej at fennel ~/src/rspec $ gem --version >> 1.3.1 >> >> So, the same symptoms, tested on Ubuntu Hardy, Gentoo and Solaris 10. > > Not really the same symptoms. "Could not find RubyGem hoe" is not the > same issue as "undefined method `gem''" The gem problem is related to > outdated versions of rubygems. The hoe problem is solved with "gem > install hoe"To clarify - try, on the last linux box you described: $ gem install hoe $ rake gem You may need other gems at this point, but if you do you''ll get error messages like "Could not find RubyGem foo," in which case you would then say: $ gem install foo You''re very close. Let us know when you get it working. Cheers, David> > HTH, > David > >> It''s weird that you can''t reproduce the issue. Perhaps try with a >> fresh system? I install: ruby, rubygems, rake, git. Then the above >> sequence. >> >> Maciej >> _______________________________________________ >> rspec-users mailing list >> rspec-users at rubyforge.org >> http://rubyforge.org/mailman/listinfo/rspec-users >> >