Can't migrate database after scaffold. Section 2.2 Ruby on Rails Tutorial Michael Hartl

不羁岁月 提交于 2019-11-26 14:35:39

I just ran into this as well. This is due to ActiveRecord 4.2.0.beta4 passing a parameter to Arel::Nodes::BindParam.new. Arel 6.0.0 was just released today. In this version, BindParam does not accept any parameters in it's initalizer.

ActiveRecord has already fixed this on the master branch. Until beta5 is released you'll need to lock your Gemfile to gem 'arel', '6.0.0.beta2'.

with above solution of changing gemfile.

 gem 'arel', '6.0.0.beta2'

I got 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`

After

bundle update arel    

it worked

I've solved this with

rake db:reset

After that

rake db:migrate

worked.

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