Rails Executing migration ArgumentError

ε祈祈猫儿з 提交于 2019-12-02 05:06:43
Yamzalal

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

Juancu

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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!