NoMethodError in AdminController#index

I am newb in ror. I've googled and found no concrete answer to my
problem below:

NoMethodError in AdminController#index

undefined method `scaffold' for AdminController:Class

RAILS_ROOT: /home/darwin/Sites/music_library
Application Trace | Framework Trace | Full Trace

/home/darwin/Sites/music_library/app/controllers/admin_controller.rb:3

/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/
dependencies.rb:380:in `load_without_new_constant_marking'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/
dependencies.rb:380:in `load_file'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/
dependencies.rb:521:in `new_constants_in'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/
dependencies.rb:379:in `load_file'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/
dependencies.rb:259:in `require_or_load'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/
dependencies.rb:425:in `load_missing_constant'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/
dependencies.rb:80:in `const_missing'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/
dependencies.rb:92:in `const_missing'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/
inflector.rb:361:in `constantize'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/
inflector.rb:360:in `each'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/
inflector.rb:360:in `constantize'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/
core_ext/string/inflections.rb:162:in `constantize'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/
routing/route_set.rb:443:in `recognize'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/
routing/route_set.rb:436:in `call'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/
dispatcher.rb:87:in `dispatch'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/
dispatcher.rb:121:in `_call'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/
dispatcher.rb:130:in `build_middleware_stack'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/
query_cache.rb:29:in `call'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/
query_cache.rb:29:in `call'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/
connection_adapters/abstract/query_cache.rb:34:in `cache'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/
query_cache.rb:9:in `cache'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/
query_cache.rb:28:in `call'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/
connection_adapters/abstract/connection_pool.rb:361:in `call'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/
string_coercion.rb:25:in `call'
/usr/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/head.rb:9:in `call'
/usr/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/methodoverride.rb:
24:in `call'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/
params_parser.rb:15:in `call'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/
session/cookie_store.rb:93:in `call'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/
failsafe.rb:26:in `call'
/usr/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/lock.rb:11:in `call'
/usr/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/lock.rb:11:in
`synchronize'
/usr/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/lock.rb:11:in `call'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/
dispatcher.rb:114:in `call'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/
reloader.rb:34:in `run'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/
dispatcher.rb:108:in `call'
/usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/rack/static.rb:31:in
`call'
/usr/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/urlmap.rb:46:in `call'
/usr/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/urlmap.rb:40:in `each'
/usr/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/urlmap.rb:40:in `call'
/usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/rack/log_tailer.rb:
17:in `call'
/usr/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/content_length.rb:
13:in `call'
/usr/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/handler/webrick.rb:
50:in `service'
/usr/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
/usr/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
/usr/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
/usr/lib/ruby/1.8/webrick/server.rb:162:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
/usr/lib/ruby/1.8/webrick/server.rb:95:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:92:in `each'
/usr/lib/ruby/1.8/webrick/server.rb:92:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:23:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:82:in `start'
/usr/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/handler/webrick.rb:
14:in `run'
/usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/commands/server.rb:111
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require'
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in
`require'
script/server:3

/home/darwin/Sites/music_library/app/controllers/admin_controller.rb:3
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/
dependencies.rb:380:in `load_without_new_constant_marking'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/
dependencies.rb:380:in `load_file'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/
dependencies.rb:521:in `new_constants_in'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/
dependencies.rb:379:in `load_file'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/
dependencies.rb:259:in `require_or_load'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/
dependencies.rb:425:in `load_missing_constant'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/
dependencies.rb:80:in `const_missing'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/
dependencies.rb:92:in `const_missing'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/
inflector.rb:361:in `constantize'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/
inflector.rb:360:in `each'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/
inflector.rb:360:in `constantize'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/
core_ext/string/inflections.rb:162:in `constantize'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/
routing/route_set.rb:443:in `recognize'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/
routing/route_set.rb:436:in `call'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/
dispatcher.rb:87:in `dispatch'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/
dispatcher.rb:121:in `_call'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/
dispatcher.rb:130:in `build_middleware_stack'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/
query_cache.rb:29:in `call'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/
query_cache.rb:29:in `call'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/
connection_adapters/abstract/query_cache.rb:34:in `cache'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/
query_cache.rb:9:in `cache'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/
query_cache.rb:28:in `call'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/
connection_adapters/abstract/connection_pool.rb:361:in `call'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/
string_coercion.rb:25:in `call'
/usr/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/head.rb:9:in `call'
/usr/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/methodoverride.rb:
24:in `call'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/
params_parser.rb:15:in `call'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/
session/cookie_store.rb:93:in `call'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/
failsafe.rb:26:in `call'
/usr/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/lock.rb:11:in `call'
/usr/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/lock.rb:11:in
`synchronize'
/usr/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/lock.rb:11:in `call'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/
dispatcher.rb:114:in `call'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/
reloader.rb:34:in `run'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/
dispatcher.rb:108:in `call'
/usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/rack/static.rb:31:in
`call'
/usr/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/urlmap.rb:46:in `call'
/usr/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/urlmap.rb:40:in `each'
/usr/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/urlmap.rb:40:in `call'
/usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/rack/log_tailer.rb:
17:in `call'
/usr/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/content_length.rb:
13:in `call'
/usr/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/handler/webrick.rb:
50:in `service'
/usr/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
/usr/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
/usr/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
/usr/lib/ruby/1.8/webrick/server.rb:162:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
/usr/lib/ruby/1.8/webrick/server.rb:95:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:92:in `each'
/usr/lib/ruby/1.8/webrick/server.rb:92:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:23:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:82:in `start'
/usr/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/handler/webrick.rb:
14:in `run'
/usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/commands/server.rb:111
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require'
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in
`require'
script/server:3

Request

Parameters:

None

Show session dump

Top link in google:

http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/39739e012b09f97a/7364aa0c8bf5050f

Read the replies about scaffolding basically you'll need to install the
scaffolding gem:

From a command prompt in your app root:

ruby script/plugin install scaffolding

or install a previous version of rails (if you are working through a
book it's probably a good idea to use the same version it uses)

gem install rails -v="1.2.3"

For simplicities sake probably just uninstall your current rails version
(gem uninstall rails) first then install the older version; that way
you'll know the rails commands are running the correct version.

Cheers
Luke

I still get the same errors when I did option 1

/home/darwin/Sites/music_library/vendor/plugins/scaffolding/lib/
scaffolding.rb:107:in `list'
/home/darwin/Sites/music_library/vendor/plugins/scaffolding/lib/
scaffolding.rb:95:in `index'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/
base.rb:1331:in `send'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/
base.rb:1331:in `perform_action_without_filters'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/
filters.rb:617:in `call_filters'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/
filters.rb:610:in `perform_action_without_benchmark'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/
benchmarking.rb:68:in `perform_action_without_rescue'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/
core_ext/benchmark.rb:17:in `ms'
/usr/lib/ruby/1.8/benchmark.rb:308:in `realtime'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/
core_ext/benchmark.rb:17:in `ms'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/
benchmarking.rb:68:in `perform_action_without_rescue'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/
rescue.rb:160:in `perform_action_without_flash'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/
flash.rb:146:in `perform_action'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/
base.rb:532:in `send'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/
base.rb:532:in `process_without_filters'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/
filters.rb:606:in `process'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/
base.rb:391:in `process'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/
base.rb:386:in `call'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/
routing/route_set.rb:437:in `call'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/
dispatcher.rb:87:in `dispatch'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/
dispatcher.rb:121:in `_call'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/
dispatcher.rb:130:in `build_middleware_stack'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/
query_cache.rb:29:in `call'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/
query_cache.rb:29:in `call'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/
connection_adapters/abstract/query_cache.rb:34:in `cache'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/
query_cache.rb:9:in `cache'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/
query_cache.rb:28:in `call'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/
connection_adapters/abstract/connection_pool.rb:361:in `call'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/
string_coercion.rb:25:in `call'
/usr/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/head.rb:9:in `call'
/usr/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/methodoverride.rb:
24:in `call'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/
params_parser.rb:15:in `call'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/
session/cookie_store.rb:93:in `call'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/
failsafe.rb:26:in `call'
/usr/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/lock.rb:11:in `call'
/usr/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/lock.rb:11:in
`synchronize'
/usr/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/lock.rb:11:in `call'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/
dispatcher.rb:114:in `call'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/
reloader.rb:34:in `run'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/
dispatcher.rb:108:in `call'
/usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/rack/static.rb:31:in
`call'
/usr/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/urlmap.rb:46:in `call'
/usr/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/urlmap.rb:40:in `each'
/usr/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/urlmap.rb:40:in `call'
/usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/rack/log_tailer.rb:
17:in `call'
/usr/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/content_length.rb:
13:in `call'
/usr/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/handler/webrick.rb:
50:in `service'
/usr/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
/usr/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
/usr/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
/usr/lib/ruby/1.8/webrick/server.rb:162:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
/usr/lib/ruby/1.8/webrick/server.rb:95:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:92:in `each'
/usr/lib/ruby/1.8/webrick/server.rb:92:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:23:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:82:in `start'
/usr/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/handler/webrick.rb:
14:in `run'
/usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/commands/server.rb:111
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require'
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in
`require'
script/server:3

I still get the same errors when I did option 1

The error you had before was, from your first post,
NoMethodError in AdminController#index

undefined method `scaffold' for AdminController:Class

Are you saying you still get that error, and with the trace below?

Colin