The action index could not found from admincontroller

Hi, i am reading agile web development using rails.

i have used below process and tried to create new app ( my rails version
is 3.2.6 , looks book version is diff so not exactly same output as
below but i have added everthing in same file )…

after creating when i access web page i get error

Unknown Action
The action index could not found from admincontroller

class CreateProducts < ActiveRecord::Migration
def self.up
create_table :products do |t|

t.column :name, :string

end
end
def self.down
drop_table :products
end
end

class CreateProducts < ActiveRecord::Migration
def self.up
create_table :products do |t|
t.column :title, :string
t.column :description, :text
t.column :image_url, :string
end
end
def self.down
drop_table :products
end
end

depot> rake db:migrate
(in /Users/dave/work/depot)
== CreateProducts: migrating ===================================
– create_table(:products)
-> 0.0625s
== CreateProducts: migrated (0.0656s) ==========================

depot> ruby script/generate controller admin
exists app/controllers/
exists app/helpers/
create app/views/admin
exists test/functional/
create app/controllers/admin_controller.rb
create test/functional/admin_controller_test.rb
create app/helpers/admin_helper.rb

class AdminController < ApplicationController
scaffold :product
end

On Wed, Jul 25, 2012 at 8:55 AM, Dha J. [email protected] wrote:

Hi, i am reading agile web development using rails.

i have used below process and tried to create new app ( my rails version
is 3.2.6 , looks book version is diff so not exactly same output as
below

Stop there. Either download the version of Rails corresponding to the
edition of the book you have, or toss the book.

Save yourself a lot of pointless frustration. :slight_smile: