[Rails] NoMethodError in Weblog#list
Eric Ocean
subscriber at ampede.com
Sun Nov 7 23:28:00 GMT 2004
I'm following along the 10 minute intro video (and it's taken _way_
more than 10 minutes to get halfway through the video :-). I just ran
the script/new_model Post command, and everything seems to be in order.
I modified weblog_controller.rb to be:
require 'abstract_application'
require 'weblog_helper'
require 'post'
class WeblogController < AbstractApplicationController
include WeblogHelper
scaffold :post
end
When I point my browser to http://blog.ampede.com/weblog/list, I get
the following error:
NoMethodError in Weblog#list
undefined method `has_active_layout?' for WeblogController:Class
/usr/local/lib/ruby/gems/1.8/gems/actionpack-0.9.0/lib/
action_controller/scaffolding.rb:161:in `render_scaffold'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-0.9.0/lib/
action_controller/scaffolding.rb:104:in `list'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-0.9.0/lib/
action_controller/base.rb:556:in `send'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-0.9.0/lib/
action_controller/base.rb:556:in `perform_action_without_filters'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-0.9.0/lib/
action_controller/filters.rb:236:in `perform_action_without_benchmark'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-0.9.0/lib/
action_controller/benchmarking.rb:30:in `perform_action_without_rescue'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-0.9.0/lib/
action_controller/benchmarking.rb:30:in `measure'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-0.9.0/lib/
action_controller/benchmarking.rb:30:in `perform_action_without_rescue'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-0.9.0/lib/
action_controller/rescue.rb:68:in `perform_action'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-0.9.0/lib/
action_controller/base.rb:253:in `process'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-0.9.0/lib/
action_controller/base.rb:234:in `process'
/usr/local/lib/ruby/gems/1.8/gems/rails-0.8.0/lib/dispatcher.rb:35:in
`dispatch'
Show framework trace
Request
Parameters: None
Show session dump
Response
Headers: {"cookie"=>[], "Cache-Control"=>"no-cache"}
Show template parameters
Any ideas on where to go from here? I also updated the database as in
the video, and my database.yml file is set to
production:
adapter: mysql
database: ampede_blog_production
host: localhost
username: username
password: password
test:
adapter: mysql
database: ampede_blog_test
host: localhost
username: username
password: password
Regards,
Eric Ocean
More information about the Rails
mailing list