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
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