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
Are you maybe running on one of the older beta gems ? I thought it was a temporarily cvs problem... On Sun, 7 Nov 2004 15:28:00 -0800, Eric Ocean <subscriber-npdh1YFn4ZDQT0dZR+AlfA@public.gmane.org> wrote:> 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 > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- Tobi
Eric Ocean wrote:> 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: > [snip]I think this might be related to the bug detailed here: http://dev.rubyonrails.org/trac.cgi/ticket/164 Could you try editing /usr/local/lib/ruby/gems/1.8/gems/actionpack-0.9.0/lib/ action_controller/scaffolding.rb as detailed in the bugreport, and see if the problem persists? -- Marten Veldthuis
I''m using TextDrive''s installation, which I believe is 0.8. Supposedly, they only install "stable" releases there, so I doubt it''s from CVS or a beta. Regards, Eric Ocean On Nov 7, 2004, at 3:35 PM, Tobias Luetke wrote:> Are you maybe running on one of the older beta gems ? > > I thought it was a temporarily cvs problem... > > > > On Sun, 7 Nov 2004 15:28:00 -0800, Eric Ocean <subscriber-npdh1YFn4ZDQT0dZR+AlfA@public.gmane.org> > wrote: >> 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 >> >> _______________________________________________ >> Rails mailing list >> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >> http://lists.rubyonrails.org/mailman/listinfo/rails >> > > > -- > Tobi > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
It sure looks like it. I don''t think I can change that file though, since it''s managed by TextDrive. Any chance that can be updated, Jason? In the meantime, I''ll get Ruby on Rails running on my local machine (and apply the change myself). Regards, Eric Ocean On Nov 7, 2004, at 3:39 PM, Marten Veldthuis wrote:> Eric Ocean wrote: >> 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: >> [snip] > > I think this might be related to the bug detailed here: > http://dev.rubyonrails.org/trac.cgi/ticket/164 > > Could you try editing > /usr/local/lib/ruby/gems/1.8/gems/actionpack-0.9.0/lib/ > action_controller/scaffolding.rb as detailed in the bugreport, and see > if the problem persists? > > -- > Marten Veldthuis > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
Marten Veldthuis wrote:> Eric Ocean wrote: > >> [...] > > I think this might be related to the bug detailed here: > http://dev.rubyonrails.org/trac.cgi/ticket/164 > > Could you try editing > /usr/local/lib/ruby/gems/1.8/gems/actionpack-0.9.0/lib/ > action_controller/scaffolding.rb as detailed in the bugreport, and see > if the problem persists?Hmm, you''re on TextDrive I read now. Well, I did some checking, and my local gem installation (ActionPack 0.9 Final) uses self.active_layout? while the TextDrive scaffolding.rb file shows self.class.has_active_layout? Bad David. :) Anyway, the gems need to be updated, and since apparently the beta gems were installed I think Jason or David will need to do a $ gem uninstall actionpack --> select only v0.9 here $ gem install actionpack (since RubyGems thinks 0.9 beta == 0.9 final) -- Marten Veldthuis
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Nov 7, 2004, at 3:49 PM, Marten Veldthuis wrote:> Anyway, the gems need to be updated, and since apparently the beta > gems were installed I think Jason or David will need to do a > > $ gem uninstall actionpack > --> select only v0.9 here > $ gem install actionpack > > (since RubyGems thinks 0.9 beta == 0.9 final) >OK, done. Seems to be replaced: # grep self.active_layout /usr/local/lib/ruby/gems/1.8/gems/actionpack-0.9.0/lib/ action_controller/scaffolding.rb self.active_layout ? render_file(self.active_layout, "200 OK", true) : render_file(scaffold_path("layout")) # grep self.class.has_active_layout /usr/local/lib/ruby/gems/1.8/gems/actionpack-0.9.0/lib/ action_controller/scaffolding.rb # - - Jason -----BEGIN PGP SIGNATURE----- Version: PGP 8.1 iQA/AwUBQY64ClUyB+ajXkCLEQKhegCeO4rKLXvBcUxEOGMkgUTNnxdwT3kAoIgc 4pV0inV/fR/jh0oEXA0xEaN8 =MglC -----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1>> On Nov 7, 2004, at 3:49 PM, Marten Veldthuis wrote: >>> Anyway, the gems need to be updated, and since apparently the beta >>> gems were installed I think Jason or David will need to do a >>> >>> $ gem uninstall actionpack >>> --> select only v0.9 here >>> $ gem install actionpack> Hmm. The error I get now at http://blog.ampede.com/weblog/list is: > -------------------------- > Application error (Apache) > Change this error message for exceptions thrown outside of an action > (like in Dispatcher setups or broken Ruby code) in public/500.html > -------------------------- > Regards, Eric OceanYes, I''m afraid that Marten''s advice was a bit simplistic. It''s partially because we had versions going quite far back (in RoR terms) and a mix of patched/unpatched/beta .... I took a look and all have been smoothed out. http://www.standardbehaviour.com/log/index http://blog.ampede.com/weblog/list Look to be loading up fine now, and the Tobias original diagnosis was about right. - - Jason -----BEGIN PGP SIGNATURE----- Version: PGP 8.1 iQA/AwUBQY7B2lUyB+ajXkCLEQI6QQCfSQ7qC1xrgQn6bAYzz2j9JiktAYQAn1OQ J2goT/0dlRN+1eOISsuN23Ex =JEAR -----END PGP SIGNATURE-----