Undefined method `session='+?

I bought AWDWR 2nd edition by Dave T… I downgraded to rails 1.2.1
by:
sudo gem install --source http://gems.rubyforge.org rails -v 1.2.1
–include-dependencies

I inserted the following line in environment.rb
#RAILS_GEM_VERSION = ‘2.0.2’ unless defined? RAILS_GEM_VERSION
RAILS_GEM_VERSION = ‘1.2.1’

I followed each and every line of the book until p.67/p.68. I started
the server. I got the following errors.
=> Booting Mongrel (use ‘script/server webrick’ to force WEBrick)

=> Rails application starting on http://0.0.0.0:3000

=> Call with -d to detach

=> Ctrl-C to shutdown server

** Starting Mongrel listening at 0.0.0.0:3000

** Starting Rails with development environment…

Exiting

/usr/lib/ruby/gems/1.8/gems/rails-1.2.1/lib/initializer.rb:328:in
send': undefined method session=’ for ActionController::Base:Class
(NoMethodError)

    from

/usr/lib/ruby/gems/1.8/gems/rails-1.2.1/lib/initializer.rb:328:in
`initialize_framework_settings’

    from

/usr/lib/ruby/gems/1.8/gems/rails-1.2.1/lib/initializer.rb:327:in `each’

    from

/usr/lib/ruby/gems/1.8/gems/rails-1.2.1/lib/initializer.rb:327:in
`initialize_framework_settings’

    from

/usr/lib/ruby/gems/1.8/gems/rails-1.2.1/lib/initializer.rb:324:in `each’

    from

/usr/lib/ruby/gems/1.8/gems/rails-1.2.1/lib/initializer.rb:324:in
`initialize_framework_settings’

    from

/usr/lib/ruby/gems/1.8/gems/rails-1.2.1/lib/initializer.rb:96:in
`process’

    from

/usr/lib/ruby/gems/1.8/gems/rails-1.2.1/lib/initializer.rb:43:in `send’

    from

/usr/lib/ruby/gems/1.8/gems/rails-1.2.1/lib/initializer.rb:43:in `run’

     ... 27 levels...

    from

/usr/lib/ruby/gems/1.8/gems/rails-1.2.1/lib/commands/server.rb:39

    from

/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require’

    from

/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `require’

    from script/server:3

What is wrong with my copying work?
Thanks for your help.

On 27 Apr 2008, at 10:25, Dror C. wrote:

What is wrong with my copying work?
Thanks for your help.

I’m guessing the app itself was generated with rails 2.0.x, which
means that the generated environment.rb and boot.rb will contain 2.0
specific things. You’re probably best off running
rails 1.2.1 my_app_name to generate you a fresh 1.2.1 rails
application.

Fred