helmutburri
2004-Oct-27 04:03 UTC
sqlite_adapter.rb:105:in `require'': No such file to load -- rubygems (LoadError)
I am setting up another test example using rails working my way through the tutorials. now when I run: Helmut-Kurt-Burris-Computer:~/Developer/serverside/scuttlebug/ scuttlebug helmutburri$ ./script/new_controller I get this: ./script/../config/environments/../../vendor/activerecord/lib/ active_record/connection_adapters/sqlite_adapter.rb:105:in `require'': No such file to load -- rubygems (LoadError) from ./script/../config/environments/../../vendor/activerecord/lib/ active_record/connection_adapters/sqlite_adapter.rb:105 from ./script/../config/environments/../../vendor/activerecord/lib/ active_record.rb:48:in `require'' from ./script/../config/environments/../../vendor/activerecord/lib/ active_record.rb:48 from ./script/../config/environments/shared.rb:17:in `require'' from ./script/../config/environments/shared.rb:17 from ./script/../config/environments/production.rb:1:in `require'' from ./script/../config/environments/production.rb:1 from ./script/new_controller:3:in `require'' from ./script/new_controller:3 I am using mysql and not sqlite and rails 0.8. any suggestions? Kurt
Bruno Mattarollo
2004-Oct-27 05:50 UTC
Re: sqlite_adapter.rb:105:in `require'': No such file to load -- rubygems (LoadError)
Hello Kurt, From the error you are getting (and looking at line #105 of sqlite_adapter.rb): retry if require(''rubygems'') rescue LoadError I can just guess that you don''t have "RubyGems" installed and for some reason it needs it ... Don''t ask me why, I am also a newbie here ;) Try installing it [ http://rubyforge.org/frs/?group_id=126 ]. Good luck. /B On 27/10/2004, at 2:03 PM, helmutburri wrote:> ./script/../config/environments/../../vendor/activerecord/lib/ > active_record/connection_adapters/sqlite_adapter.rb:105:in `require'': > No such file to load -- rubygems (LoadError) > from > ./script/../config/environments/../../vendor/activerecord/lib/ > active_record/connection_adapters/sqlite_adapter.rb:105 > from > ./script/../config/environments/../../vendor/activerecord/lib/ > active_record.rb:48:in `require'' > from > ./script/../config/environments/../../vendor/activerecord/lib/ > active_record.rb:48 > from ./script/../config/environments/shared.rb:17:in `require'' > from ./script/../config/environments/shared.rb:17 > from ./script/../config/environments/production.rb:1:in > `require'' > from ./script/../config/environments/production.rb:1 > from ./script/new_controller:3:in `require'' > from ./script/new_controller:3 >-- Bruno Mattarollo <bmatt-ee4meeAH724@public.gmane.org> Currently in: Sydney, Australia [ http://pokies.typepad.com/virtual_possum/ ] _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
helmutburri
2004-Oct-27 06:46 UTC
Re: sqlite_adapter.rb:105:in `require'': No such file to load -- rubygems (LoadError)
Hi As far as I can understand rubygems is a package manager, now if i was upgrading my rails I could use rubygems however, I am using the full and supposedly complete rails 0.8 from rubyonrails. The question is why is rails running the sqlite adapter if I am using mysql and why is it asking for rubygems. Questions??? This was so much easier the first time I did it with 0.7, I seem to be having a world of problems this time around. I tried installing rubygems only to have it also freak out on me, as well, maybe their is something wrong with my ruby install? So I reinstalled it but to no avail. This is what I get from rubygems. Helmut-Kurt-Burris-Computer:~/Desktop/rubygems-0.8.1 helmutburri$ ./install.rb ./install.rb: line 1: require: command not found ./install.rb: line 2: require: command not found ./install.rb: line 3: require: command not found ./install.rb: line 4: require: command not found ./install.rb: line 6: include: command not found ./install.rb: line 8: =: command not found ./install.rb: line 9: =: command not found ./install.rb: line 10: syntax error near unexpected token `('' ./install.rb: line 10: `$libdir = File.join(CONFIG["libdir"], "ruby", $version)'' Helmut-Kurt-Burris-Computer:~/Desktop/rubygems-0.8.1 helmutburri$ Felling lost. Kurt On 27/10/2004, at 3:50 PM, Bruno Mattarollo wrote:> Hello Kurt, > > From the error you are getting (and looking at line #105 of > sqlite_adapter.rb): > > retry if require(''rubygems'') rescue LoadError > > I can just guess that you don''t have "RubyGems" installed and for some > reason it needs it ... Don''t ask me why, I am also a newbie here ;) > > Try installing it [ http://rubyforge.org/frs/?group_id=126 ]. > > Good luck. > > /B > > On 27/10/2004, at 2:03 PM, helmutburri wrote: > >> ./script/../config/environments/../../vendor/activerecord/lib/ >> active_record/connection_adapters/sqlite_adapter.rb:105:in `require'': >> No such file to load -- rubygems (LoadError) >> from >> ./script/../config/environments/../../vendor/activerecord/lib/ >> active_record/connection_adapters/sqlite_adapter.rb:105 >> from >> ./script/../config/environments/../../vendor/activerecord/lib/ >> active_record.rb:48:in `require'' >> from >> ./script/../config/environments/../../vendor/activerecord/lib/ >> active_record.rb:48 >> from ./script/../config/environments/shared.rb:17:in `require'' >> from ./script/../config/environments/shared.rb:17 >> from ./script/../config/environments/production.rb:1:in >> `require'' >> from ./script/../config/environments/production.rb:1 >> from ./script/new_controller:3:in `require'' >> from ./script/new_controller:3 >> > -- > Bruno Mattarollo <bmatt-ee4meeAH724@public.gmane.org> > Currently in: Sydney, Australia > [ http://pokies.typepad.com/virtual_possum/ ] > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails
Bruno Mattarollo
2004-Oct-27 06:51 UTC
Re: sqlite_adapter.rb:105:in `require'': No such file to load -- rubygems (LoadError)
On 27/10/2004, at 4:46 PM, helmutburri wrote:> Helmut-Kurt-Burris-Computer:~/Desktop/rubygems-0.8.1 helmutburri$ > ./install.rb > ./install.rb: line 1: require: command not foundHave you tried with $ ruby install.rb ... also, what does "ruby --version" output? Which version are you using? 1.8.1? 1.8.2preview? In my case: ruby 1.8.2 (2004-07-29) [powerpc-darwin7.5.0] Cheers /B -- Bruno Mattarollo <bmatt-ee4meeAH724@public.gmane.org> Currently in: Sydney, Australia [ http://pokies.typepad.com/virtual_possum/ ] _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
helmutburri
2004-Oct-27 07:01 UTC
Re: sqlite_adapter.rb:105:in `require'': No such file to load -- rubygems (LoadError)
Hi again - intersting I installed Ruby 1.8 from the dmg but ruby -version tells me that I am running ruby 1.6.8 (2002-12-24) [powerpc-darwin7.0] Also it tells me this: -e:1: undefined local variable or method `rsion'' for #<Object:0xd2cd8> (NameError) Maybe we are getting closer?? Kurt On 27/10/2004, at 4:51 PM, Bruno Mattarollo wrote:> > On 27/10/2004, at 4:46 PM, helmutburri wrote: > >> Helmut-Kurt-Burris-Computer:~/Desktop/rubygems-0.8.1 helmutburri$ >> ./install.rb >> ./install.rb: line 1: require: command not found > > Have you tried with $ ruby install.rb ... also, what does "ruby > --version" output? Which version are you using? 1.8.1? 1.8.2preview? > > In my case: > > ruby 1.8.2 (2004-07-29) [powerpc-darwin7.5.0] > > Cheers > > /B > > -- > Bruno Mattarollo <bmatt-ee4meeAH724@public.gmane.org> > Currently in: Sydney, Australia > [ http://pokies.typepad.com/virtual_possum/ ] > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails
Bruno Mattarollo
2004-Oct-27 07:02 UTC
Re: sqlite_adapter.rb:105:in `require'': No such file to load -- rubygems (LoadError)
Yeah, you need to remove the Ruby that comes with the mac ... /usr/bin/ruby ... it''s a very old version ... or move it to something else. Cheers /B On 27/10/2004, at 5:01 PM, helmutburri wrote:> > I installed Ruby 1.8 from the dmg but ruby -version tells me that I am > running > > ruby 1.6.8 (2002-12-24) [powerpc-darwin7.0] > > > Also it tells me this: > > -e:1: undefined local variable or method `rsion'' for #<Object:0xd2cd8> > (NameError) > > Maybe we are getting closer??-- Bruno Mattarollo <bmatt-ee4meeAH724@public.gmane.org> Currently in: Sydney, Australia [ http://pokies.typepad.com/virtual_possum/ ] _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
Jason Hoffman
2004-Oct-27 07:07 UTC
Re: sqlite_adapter.rb:105:in `require'': No such file to load -- rubygems (LoadError)
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Oct 27, 2004, at 12:01 AM, helmutburri wrote:> Hi again - intersting > I installed Ruby 1.8 from the dmg but ruby -version tells me that I am > running > ruby 1.6.8 (2002-12-24) [powerpc-darwin7.0] > Also it tells me this: > -e:1: undefined local variable or method `rsion'' for #<Object:0xd2cd8> > (NameError) > Maybe we are getting closer?? > KurtYes, that''s the default ruby that ships with apple. Jason-Hoffmans-Computer:~ jah$ whereis ruby /usr/bin/ruby Just mv /usr/bin/ruby /usr/bin/ruby-apple ln -s /usr/local/bin/ruby /usr/bin/ruby And you''ll get Jason-Hoffmans-Computer:~ jah$ /usr/local/bin/ruby -v ruby 1.8.1 (2004-03-15) [powerpc-darwin] Jason-Hoffmans-Computer:~ jah$ /usr/bin/ruby -v ruby 1.8.1 (2004-03-15) [powerpc-darwin] Jason-Hoffmans-Computer:~ jah$ ruby -v ruby 1.8.1 (2004-03-15) [powerpc-darwin] - - Jason -----BEGIN PGP SIGNATURE----- Version: PGP 8.1 iQA/AwUBQX9JQFUyB+ajXkCLEQIvHQCcCdhON/f8mE7sdqVG2wbb3oYla/oAn0ZH SUUruBZzM+k95WOMWHSdWdqA =D6uU -----END PGP SIGNATURE-----
Christian Metts
2004-Oct-27 07:08 UTC
Re: sqlite_adapter.rb:105:in `require'': No such file to load -- rubygems (LoadError)
On Wed, 27 Oct 2004 17:02:51 +1000, Bruno Mattarollo <bmatt-ee4meeAH724@public.gmane.org> wrote:> Yeah, you need to remove the Ruby that comes with the mac ... > /usr/bin/ruby ... it''s a very old version ... or move it to something > else.A better idea is to symlink /usr/bin/ruby to ruby1.8. Or you could edit your $PATH to make sure the location of the new ruby has precedence. Which is what I did because I didn''t think about the symlink solution at the time.
helmutburri
2004-Oct-27 07:26 UTC
Re: sqlite_adapter.rb:105:in `require'': No such file to load -- rubygems (LoadError)
Ok - thanks to Jason I am now using ruby 1.8 However the basic problem still remains. Any path to explore next Kurt On 27/10/2004, at 5:02 PM, Bruno Mattarollo wrote:> Yeah, you need to remove the Ruby that comes with the mac ... > /usr/bin/ruby ... it''s a very old version ... or move it to something > else. > > Cheers > > /B > > On 27/10/2004, at 5:01 PM, helmutburri wrote: > >> >> I installed Ruby 1.8 from the dmg but ruby -version tells me that I >> am running >> >> ruby 1.6.8 (2002-12-24) [powerpc-darwin7.0] >> >> >> Also it tells me this: >> >> -e:1: undefined local variable or method `rsion'' for >> #<Object:0xd2cd8> (NameError) >> >> Maybe we are getting closer?? > -- > Bruno Mattarollo <bmatt-ee4meeAH724@public.gmane.org> > Currently in: Sydney, Australia > [ http://pokies.typepad.com/virtual_possum/ ] > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails
Samuel Kvarnbrink
2004-Oct-27 10:17 UTC
Re: sqlite_adapter.rb:105:in `require'': No such file to load -- rubygems (LoadError)
> Also it tells me this: > > -e:1: undefined local variable or method `rsion'' for #<Object:0xd2cd8> > (NameError) > > Maybe we are getting closer?? > > KurtThat''s because you''ve forgotten a dash in the command line parameters. "ruby -version" is equivalent to running "ruby -v -e ''rsion''" - i.e. evaluating the string ''rsion'' in verbose mode. Since there is no variable or method with that name, ruby chokes. However, "ruby --version" (or "ruby -v") produces the results you want. //samuel> On 27/10/2004, at 4:51 PM, Bruno Mattarollo wrote: > >> >> On 27/10/2004, at 4:46 PM, helmutburri wrote: >> >>> Helmut-Kurt-Burris-Computer:~/Desktop/rubygems-0.8.1 helmutburri$ >>> ./install.rb >>> ./install.rb: line 1: require: command not found >> >> Have you tried with $ ruby install.rb ... also, what does "ruby >> --version" output? Which version are you using? 1.8.1? 1.8.2preview? >> >> In my case: >> >> ruby 1.8.2 (2004-07-29) [powerpc-darwin7.5.0] >> >> Cheers >> >> /B >> >> -- >> Bruno Mattarollo <bmatt-ee4meeAH724@public.gmane.org> >> Currently in: Sydney, Australia >> [ http://pokies.typepad.com/virtual_possum/ ] >> _______________________________________________ >> Rails mailing list >> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >> http://lists.rubyonrails.org/mailman/listinfo/rails > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails > >________________________ Samuel Kvarnbrink samuel.kvarnbrink-SiIintg/mUyhy6ZWzZ/+Cw@public.gmane.org http://blog.humlab.umu.se/samuel/ "On two occasions I have been asked [by members of Parliament!], Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?'' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question." -- Charles Babbage
Hi - As a few of you will know I have been having problems getting ruby 0.8 up. As my system seems a little funny. Now before I was able to just type # script/new_controller and all was fine, now after an upgrade to ruby 1.8 and rails 0.8 I seem to have to add # Ruby script/new_controller - What would account for this change? Is ruby 1.8 no longer in my path? or this new to rails 0.8 ? Its working now but just wondering. Kurt
David Heinemeier Hansson
2004-Oct-27 14:00 UTC
Re: correct way to execute rails commands from the shell?
> Is ruby 1.8 no longer in my path? or this new to rails 0.8 ?The scripts look for Ruby in /usr/local/bin/ruby, so that one has to be Ruby 1.8 or you''ll need to change the shebang line with the proper path (the first line). Also, verify that the scripts are still executable now that you have been playing around with permissions. -- David Heinemeier Hansson, http://www.basecamphq.com/ -- Web-based Project Management http://www.rubyonrails.org/ -- Web-application framework for Ruby http://macromates.com/ -- TextMate: Code and markup editor (OS X) http://www.loudthinking.com/ -- Broadcasting Brain