I\'m having a strange problem executing rake db:migrate
== 20141127213559 CreateMovies: migrating =====================================
-- create_table(:movies)
Maybe you should execute this after create movies table:
generate migration AddFieldsToMovies newfield:type
This generates the correct migration, see this:
http://edgeguides.rubyonrails.org/active_record_migrations.html#changing-tables
If you are using Rails 4.2.0.beta4, ActiveRecord will require arel gem. Add the following to your gem file
gem 'arel', '6.0.0.beta2'
and run
bundle install
You may get below error message
You have requested:arel = 6.0.0.beta2
The bundle currently has arel locked at 6.0.0.
Try running `bundle update arel`
then
bundle update arel
Now you should able to run migration.
Here you may find similar and explanatory answer: Can't migrate database after scaffold. Section 2.2 Ruby on Rails Tutorial Michael Hartl