Ruby on Rails 5.0 upgrade not working with rails console or db:migrate

前端 未结 1 2004
感情败类
感情败类 2021-01-14 03:53

After recently upgrading to Ruby on Rails 5.0 from 4.2, I have been unable to run rake db:migrate, or rails console. I think it best to solve the console error first and it

1条回答
  •  时光说笑
    2021-01-14 04:12

    Update from @scott-w (August 2016):

    The correct location is now: gem 'draper', github: 'drapergem/draper'

    the rails-5 branch has been merged into master and no longer exists

    Original: The issue with rails console error is caused by draper gem as seen from the trace. As it stands now, master (main) branch of draper doesn't support Rails 5. It seems to be know for some long time, but before Rails 5 was officially released as stable, it wasn't really put action on.

    Try this fork with few fixes embedded ("old" solution)

    gem 'draper', github: 'audionerd/draper', branch: 'rails5'
    

    Taken from here

    Or better (seems to become current solution)

    gem 'draper', github: 'drapergem/draper', branch: 'rails-5'
    

    The work on this kind of official branch is going as we speak :) https://github.com/drapergem/draper/commits/rails-5

    Or get rid of draper for Rails 5, as it doesn't support it in its master branch yet (seems to change in the coming days)

    Update -> rails-5 branch was merged into master so Rails 5 are now supported

    0 讨论(0)
提交回复
热议问题