I am reading “Agile Web D. with Rails, 2nd Edition”, which is
based on 1.2.6. However, on my Leopard based iMac, I was running Rails
When I got to the part with associating a scaffold to my :products
(located on the bottom of page 67), it outputted a No Scaffold method
error (because scaffolds are not included in 2.2.2).
After searching some web sites, particularly <http://www.ruby-
forum.com/topic/137274>, I tried to install 1.2.6 by issuing: gem
install rails—version 1.2.6—include-dependencies.
This worked correctly, but when I still type check the current version
from bash it states:
I then went into my app’s config/environment.rb file and set
RAILS_GEM_VERSION to 1.2.6.
When I tried to re-start the WEBrick server, I got the following
=> Booting WEBrick…
./script/…/config/…/config/environment.rb:46: undefined method
time_zone=’ for #<rails::configuration:0x11600c0> (NoMethodError) from /Users/untz/.gem/ruby/1.8/gems/rails-1.2.6/lib/initializer.rb: 45:inrun’ from ./script/…/config/…/config/environment.rb:13
On line 46, on my WEBrick server, this is what is set:
config.time_zone = ‘UTC’
(1) Should I stick with learning Rails 2.2.2 and upgrade to Ruby 1.9?
(2) Is the 2nd Edition of this book now deprecated or is there a
workaround to my problem?
(3) Any good resources on learning the new version of Rails?