(in /Users/sayedgamal/apps/test)
/Users/sayedgamal/apps/test/config/boot.rb:20:Warning: Gem::SourceIndex#search support for String patterns is deprecated
== CreatePeople: migrating ====================================================
-- create_table(:people)
rake aborted!
undefined method `string for #<ActiveRecord::ConnectionAdapters::TableDefinition:0x238e97c>
(See full trace by running task with --trace)
I get that error when I m issuing the
rake db:migrate
command .. in the root folder of my rails project ..
migrate/001_create_people.rb contents :
class CreatePeople < ActiveRecord::Migration
def self.up
create_table :people do |t|
t.string :first_name
t.string :second_name
t.string :company
t.string :email
t.string :phone
end
end
def self.down
drop_table :people
end
end
Note: that I also used the integer and text fields and it didn t work .. Error always changes to undefined datatype {string, integer, text ,...} based on the typed in the migration file .. ! Note: I m using the rake db:migrate in the root folder of the app.