Beginner Problem

Hello,

I am having trouble getting the scaffold :product command. Any ideas?

The web page reads,

NoMethodError in AdminController#index

undefined method `scaffold’ for AdminController:Class

RAILS_ROOT: C:/InstantRails/rails_apps/depot
Application Trace | Framework Trace | Full Trace

app/controllers/admin_controller.rb:2

c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/
dependencies.rb:203:in load_without_new_constant_marking' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/ dependencies.rb:203:inload_file’
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/
dependencies.rb:342:in new_constants_in' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/ dependencies.rb:202:inload_file’
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/
dependencies.rb:94:in require_or_load' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/ dependencies.rb:248:inload_missing_constant’
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/
dependencies.rb:453:in const_missing' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/ dependencies.rb:465:inconst_missing’
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/
inflector.rb:257:in constantize' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/ core_ext/string/inflections.rb:148:inconstantize’
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/
routing.rb:1426:in recognize' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ dispatcher.rb:170:inhandle_request’
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/
dispatcher.rb:115:in dispatch' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ dispatcher.rb:126:indispatch_cgi’
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/
dispatcher.rb:9:in dispatch' c:/ruby/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/webrick_server.rb: 112:inhandle_dispatch’
c:/ruby/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/webrick_server.rb:78:in
service' c:/ruby/lib/ruby/1.8/webrick/httpserver.rb:104:inservice’
c:/ruby/lib/ruby/1.8/webrick/httpserver.rb:65:in run' c:/ruby/lib/ruby/1.8/webrick/server.rb:173:instart_thread’
c:/ruby/lib/ruby/1.8/webrick/server.rb:162:in start' c:/ruby/lib/ruby/1.8/webrick/server.rb:162:instart_thread’
c:/ruby/lib/ruby/1.8/webrick/server.rb:95:in start' c:/ruby/lib/ruby/1.8/webrick/server.rb:92:ineach’
c:/ruby/lib/ruby/1.8/webrick/server.rb:92:in start' c:/ruby/lib/ruby/1.8/webrick/server.rb:23:instart’
c:/ruby/lib/ruby/1.8/webrick/server.rb:82:in start' c:/ruby/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/webrick_server.rb:62:indispatch’
c:/ruby/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/commands/servers/
webrick.rb:66
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
gem_original_require' c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:inrequire’
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/
dependencies.rb:496:in require' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/ dependencies.rb:342:innew_constants_in’
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/
dependencies.rb:496:in require' c:/ruby/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/commands/server.rb:39 c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:ingem_original_require’
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require’
script/server:3

app/controllers/admin_controller.rb:2
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/
dependencies.rb:203:in load_without_new_constant_marking' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/ dependencies.rb:203:inload_file’
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/
dependencies.rb:342:in new_constants_in' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/ dependencies.rb:202:inload_file’
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/
dependencies.rb:94:in require_or_load' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/ dependencies.rb:248:inload_missing_constant’
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/
dependencies.rb:453:in const_missing' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/ dependencies.rb:465:inconst_missing’
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/
inflector.rb:257:in constantize' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/ core_ext/string/inflections.rb:148:inconstantize’
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/
routing.rb:1426:in recognize' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ dispatcher.rb:170:inhandle_request’
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/
dispatcher.rb:115:in dispatch' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ dispatcher.rb:126:indispatch_cgi’
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/
dispatcher.rb:9:in dispatch' c:/ruby/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/webrick_server.rb: 112:inhandle_dispatch’
c:/ruby/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/webrick_server.rb:78:in
service' c:/ruby/lib/ruby/1.8/webrick/httpserver.rb:104:inservice’
c:/ruby/lib/ruby/1.8/webrick/httpserver.rb:65:in run' c:/ruby/lib/ruby/1.8/webrick/server.rb:173:instart_thread’
c:/ruby/lib/ruby/1.8/webrick/server.rb:162:in start' c:/ruby/lib/ruby/1.8/webrick/server.rb:162:instart_thread’
c:/ruby/lib/ruby/1.8/webrick/server.rb:95:in start' c:/ruby/lib/ruby/1.8/webrick/server.rb:92:ineach’
c:/ruby/lib/ruby/1.8/webrick/server.rb:92:in start' c:/ruby/lib/ruby/1.8/webrick/server.rb:23:instart’
c:/ruby/lib/ruby/1.8/webrick/server.rb:82:in start' c:/ruby/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/webrick_server.rb:62:indispatch’
c:/ruby/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/commands/servers/
webrick.rb:66
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
gem_original_require' c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:inrequire’
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/
dependencies.rb:496:in require' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/ dependencies.rb:342:innew_constants_in’
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/
dependencies.rb:496:in require' c:/ruby/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/commands/server.rb:39 c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:ingem_original_require’
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require’
script/server:3

Request

Parameters:

None

Show session dump


flash: !map:ActionController::Flash::FlashHash {}

Response

Headers:

{“cookie”=>[],
“Cache-Control”=>“no-cache”}

On the controller, the code is as follows:

class AdminController < ApplicationController
scaffold :product
end

On 23 Mar 2008, at 02:10, Mr. Watson wrote:

On the controller, the code is as follows:

class AdminController < ApplicationController
scaffold :product
end

On Mar 22, 9:04 pm, “Mr. Watson” [email protected] wrote:

Hello,

I am having trouble getting the scaffold :product command. Any ideas?

Rails has changed: that doesn’t exist any more (except as an optional
plugin). There have been a few posts here with helpful writeups of how
to get going again, but I can’t seem to locate them right now.

Fred

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs