Hello, I have a fresh install of RubyGems (0.8.4) and installed Rails via the Gems install (0.9.3) answering yes to all the dependencies. Trying to set it up for the first time: machine > rails /home/mydir/Todo (in /opt/local/lib/ruby/gems/1.8/gems/rails-0.9.3) rake aborted! No such file to load -- rake/gempackagetask ./Rakefile:4 Does anybody have any ideas how I could fix this? --- Second question: Also, I noticed in /opt/local/lib/ruby/gems/1.8/gems/rails-0.9.3 there is no "script" directory, so I can''t try "ruby script/server" as suggested in the README. I can do: machine > ruby bin/server bin/server:45:in `require'': No such file to load -- bin/../config/environment (LoadError) from bin/server:45 Is this just an error in README? Thanks for any help, Trevor
On 5.1.2005, at 23:29, Trevor wrote:> Hello, > > I have a fresh install of RubyGems (0.8.4) and installed Rails via the > Gems install (0.9.3) answering yes to all the dependencies. Trying to > set it up for the first time: > > machine > rails /home/mydir/Todo > (in /opt/local/lib/ruby/gems/1.8/gems/rails-0.9.3) > rake aborted! > No such file to load -- rake/gempackagetask > ./Rakefile:4 > > Does anybody have any ideas how I could fix this?Try ''cd /home/mydir; rails todo;''> > --- > > Second question: > > Also, I noticed in /opt/local/lib/ruby/gems/1.8/gems/rails-0.9.3 there > is no "script" directory, so I can''t try "ruby script/server" as > suggested in the README. I can do: > > machine > ruby bin/server > bin/server:45:in `require'': No such file to load -- > bin/../config/environment (LoadError) > from bin/server:45 > > Is this just an error in README?No, it''s not. The script folder will be in your rails app folder, which get generated when you run the rails command above successfully. HTH, Jarkko> > Thanks for any help, > Trevor > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- Jarkko Laine http://jlaine.net http://odesign.fi _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
Jarkko Laine wrote:> > On 5.1.2005, at 23:29, Trevor wrote: > >> machine > rails /home/mydir/Todo >> (in /opt/local/lib/ruby/gems/1.8/gems/rails-0.9.3) >> rake aborted! >> No such file to load -- rake/gempackagetask >> ./Rakefile:4 >> >> Does anybody have any ideas how I could fix this? > > > Try ''cd /home/mydir; rails todo;''Identical output I''m afraid.
Trevor said:> Hello, > > I have a fresh install of RubyGems (0.8.4) and installed Rails via the > Gems install (0.9.3) answering yes to all the dependencies. Trying to > set it up for the first time: > > machine > rails /home/mydir/Todo > (in /opt/local/lib/ruby/gems/1.8/gems/rails-0.9.3) > rake aborted! > No such file to load -- rake/gempackagetask > ./Rakefile:4 > > Does anybody have any ideas how I could fix this?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. -- -- Jim Weirich jim-Fxty1mrVU9GlFc2d6oM/ew@public.gmane.org http://onestepback.org ----------------------------------------------------------------- "Beware of bugs in the above code; I have only proved it correct, not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas)
Jim Weirich wrote:>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. > >machine > rake --version rake, version 0.4.15 One thing that may be important is that I don''t have write access to the directory that the Rails gem is installed in (/opt/local/lib/ruby/gems/1.8/gems/rails-0.9.3) since I''m not an admin of this machine, would this be a possible cause of the problem?
Trevor wrote:> One thing that may be important is that I don''t have write access to > the directory that the Rails gem is installed in > (/opt/local/lib/ruby/gems/1.8/gems/rails-0.9.3) since I''m not an admin > of this machine, would this be a possible cause of the problem?I just tried a fresh install on a x86-Linux box and it worked perfect. Are there any known problem with RubyGems, Rails, or Rake on a SGI Solaris machine (the one that I''m having problems with)?
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
On Wednesday 05 January 2005 06:34 pm, Trevor wrote:> 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?Shooting in the dark here ... Perhaps you have a partial non-gem installation of rake. The rake executable begins with : begin require ''rake'' rescue LoadError require ''rubygems'' require_gem ''rake'' end If it finds a non-gem rake.rb file, then it never loads up rubygems. But if the non-gem installation is partial (e.g. someone blew away the rake directory but not the rake.rb file), then it won''t find the gempagetask later. -- -- Jim Weirich jim-Fxty1mrVU9GlFc2d6oM/ew@public.gmane.org http://onestepback.org ----------------------------------------------------------------- "Beware of bugs in the above code; I have only proved it correct, not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas)
>One thing that may be important is that I don''t have write access to the >directory that the Rails gem is installed in >(/opt/local/lib/ruby/gems/1.8/gems/rails-0.9.3) since I''m not an admin >of this machine, would this be a possible cause of the problem?I''m guessing by the "opt" directory that you are on OSX. My one gripe with darwinports is that it wants to use that directory rather than usr/local, although, you can chage the default. Anyway, I was having all sorts of issues getting rails installed, and they were all due to permissions. You will need write access. All of the directories that rails installs are chmodded with 775 or 755 (don''t remember right now), but the point is, that once you get rails installed you won''t have the same issues. Try to get admin access just to get rails installed, and after that you should be fine. Berndt
I''m running darwinports pointed to /usr/local works great. On Wed, 5 Jan 2005 21:09:15 -0800, Berndt Jung <berndtj-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> >One thing that may be important is that I don''t have write access to the > >directory that the Rails gem is installed in > >(/opt/local/lib/ruby/gems/1.8/gems/rails-0.9.3) since I''m not an admin > >of this machine, would this be a possible cause of the problem? > > I''m guessing by the "opt" directory that you are on OSX. My one gripe > with darwinports is that it wants to use that directory rather than > usr/local, although, you can chage the default. Anyway, I was having > all sorts of issues getting rails installed, and they were all due to > permissions. You will need write access. All of the directories that > rails installs are chmodded with 775 or 755 (don''t remember right > now), but the point is, that once you get rails installed you won''t > have the same issues. Try to get admin access just to get rails > installed, and after that you should be fine. > > Berndt > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- Tobi http://www.hieraki.org - Open source book authoring http://blog.leetsoft.com - Technical weblog