From: Jason Roelofs Date: 2007-07-03T21:57:47+09:00 Subject: Re: why 1.hour doesn't work? ------=_Part_121401_7756383.1183467469200 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline This is why I always stress that people should learn Ruby first before moving on to Rails. Rails does so much to the Ruby stdlib that it's very difficult to get a grasp on things if you're new to both. Please read through this book to get you started on Ruby: http://www.rubycentral.com/book/ Jason On 7/2/07, Tim Hunter wrote: > > Kenneth Ll wrote: > >> % irb > >> irb(main):001:0> require 'rubygems' > >> => false > >> irb(main):002:0> require 'active_support' > >> => true > >> irb(main):003:0> 1.hour > >> => 3600 > >> > > > > both are needed huh? is there a way just to include one module? (such > > as when including 1 and it detects it lacks the other one, then it will > > include the other one too). > > > > so i think the other way > > > > ruby script/console > > > > will work too huh? (my ruby was set up with rails last time but right > > now it doesn't have the PATH to do things any more...) > > > > > Typically you do something external to Ruby to ensure that rubygems is > always loaded. Then you can stop worrying about it. The easiest thing to > do is set the RUBYOPTS environment variable to the value "rubygems". How > you set the variable depends on the shell you're using. If you're using > bash, for example, do this: > > export RUBYOPTS=rubygems > > If you're using another shell there will be a slightly different command. > > -- > RMagick OS X Installer [http://rubyforge.org/projects/rmagick/] > RMagick Hints & Tips [http://rubyforge.org/forum/forum.php?forum_id=1618] > RMagick Installation FAQ [http://rmagick.rubyforge.org/install-faq.html] > > > ------=_Part_121401_7756383.1183467469200--