Re: Question about fresh GEM install

Trevor
2005-01-05T23:34:02Z

Jim Weirich wrote:

>Is is possible that you have a /really/ old non-gem version of rake
>installed?  The gempackagetask has been part of the rake distribution ever
>since rubygems has been available.  If it is missing, I am guessing that
>the rake version is old.
>
>Try:   rake --version
>to get the version of rake you are using.  If it is not in the 0.4.xx
>series, I recommend updating
>
>

I through together this script (test1.rb) for testing:
###
require ''rubygems''
require ''rake''
require ''rake/gempackagetask''
puts "hi"
###

machine > ruby test1.rb
hi

If, however, I use this script (test2.rb):
###
require ''rake''
require ''rake/gempackagetask''
puts "hi"
###

machine > ruby test2.rb
test.2rb:2:in `require'': No such file to load -- rake (LoadError)
        from test2.rb:2

So it would appear that it needs rubygems to be loaded before it can
find the appropriate rake files.  I would suspect that on the
sparc-solaris2.7 machine, if I added "require
''rubygems''" to the first
line of the Rails Rakefile that the problem would be solved.  Does
anyone know why I would have to do this on a sparc-solaris2.7
installation but not a i386-linux-gnu installation?

Thanks for all the help,
Trevor