bio4054059:depot rmorourk$ rake db:migrate
(in /Users/rmorourk/Sites/depot)
== CreateProducts: migrating
==================================================
-- create_table(:products)
rake aborted!
wrong number of arguments (1 for 2)
(See full trace by running task with --trace)
bio4054059:depot rmorourk$
I copied the code exactly for the 001_create_products.rb not really sure
what it means by wrong number of arguments... any advise would be
welcomed happily!
--
Posted via http://www.ruby-forum.com/.
It looks like this - is there something wrong with it?
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
What does 001_create_products.rb look like?It looks like this - is there something wrong with it? 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