devise: undefined method `alias_method_chain (Rails 5.1, ruby 2.4)
gem ‘devise’
error:
/Users/kota/.rvm/rubies/ruby-2.4.0/bin/ruby -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) /Users/kota/Projects/Freya/bin/rails server -b 0.0.0.0 -p 3000 -e development
/Users/kota/.rvm/gems/ruby-2.4.0@Freya/gems/bundler-1.14.6/lib/bundler/runtime.rb:94:in `rescue in block (2 levels) in require': There was an error while trying to load the gem 'devise'. (Bundler::GemRequireError)
Gem Load Error is: undefined method `alias_method_chain' for ActionDispatch::Routing::RouteSet:Class
Did you mean?  alias_method
Backtrace for gem load error is:
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 6
- Comments: 16
fixed
add:
working for me.
Confirmed master branch working well!
gem 'devise', git: 'https://github.com/plataformatec/devise.git', branch: 'master'@rafaelfranca is there any plan in which version will this be added - i.e. not just on the master branch, but bundled up to rubygems.org?
@repocho007 Hola bro la solucion la dio imKota, igual es solo editar el archivo Gemfile dentro del proyecto y colocas:
gem ‘devise’, git: ‘https://github.com/gogovan/devise.git’, branch: ‘rails-5.1’ gem ‘erubis’
Luego en la consola ejecutas bundle install
Y ya podras: rails g device:install
Could you try the master branch? It should be fixed there.
Yup, confirmed. Thanks!!
The master branch has the fix already.
@imKota Thank you for taking the time to post your solution to the problem. I had the same issue, and i have implemented your fix.
But. Would you be able to explain what is actually happening here? What is special about ‘gogovan/devise.git’ and the ‘erubis’ gem?
Thank you in advance! 😄