# Help with Scaffolding deprecation on Rails 2.2.2

**URL:** <https://www.ruby-forum.com/t/help-with-scaffolding-deprecation-on-rails-2-2-2/159913>\
**Category:** Rails\
**Created:** [February 10, 2009, 12:53am UTC](https://www.ruby-forum.com/t/help-with-scaffolding-deprecation-on-rails-2-2-2/159913 "2009-02-10T00:53:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![untz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/ad7895/32.png) [@untz](https://www.ruby-forum.com/u/untz)\
**Post date:** [February 10, 2009, 12:53am UTC](https://www.ruby-forum.com/t/help-with-scaffolding-deprecation-on-rails-2-2-2/159913/1 "2009-02-10T00:53:43Z")

</div>

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  
2.2.2.

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](http://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:

Rails 2.2.2

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  
error:

=\> 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:in `run’ from ./script/…/config/…/config/environment.rb:13

On line 46, on my WEBrick server, this is what is set:

config.time\_zone = ‘UTC’

Question(s):

(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?

Happy programming!

---

<div class="post-metadata">

**Author:** ![untz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/ad7895/32.png) [@untz](https://www.ruby-forum.com/u/untz)\
**Post date:** [February 10, 2009, 1:00am UTC](https://www.ruby-forum.com/t/help-with-scaffolding-deprecation-on-rails-2-2-2/159913/2 "2009-02-10T01:00:44Z")

</div>

On Feb 9, 11:28 pm, untz [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> On line 46, on my WEBrick server, this is what is set:
> 
> config.time\_zone = ‘UTC’

just remove that - it’s an option only available with rails \>= 2.1  
(which was the case when you generated the app, but now you’re trying  
to run with an older version)

> Question(s):
> 
> (1) Should I stick with learning Rails 2.2.2 and upgrade to Ruby 1.9?

certainly don’t skip to ruby 1.9 unless you are using a version of  
rails ready for it (which right now means rails 2.3rc1). I would  
stick to 2.2.2 if you’re still learning

Fred

---

<div class="post-metadata">

**Author:** ![untz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/ad7895/32.png) [@untz](https://www.ruby-forum.com/u/untz)\
**Post date:** [February 10, 2009, 5:06am UTC](https://www.ruby-forum.com/t/help-with-scaffolding-deprecation-on-rails-2-2-2/159913/3 "2009-02-10T05:06:05Z")

</div>

Fred,

perhaps creating the app with the version you need will help avoid  
this and other issues. You can do it by specifying the version  
enclosed in underscores before passing the name of the new app:

rails _1.2.3_ mynewapp

Al

On Feb 9, 3:56 pm, Frederick C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
