Reputation: 127
I am working on a project which uses rails 5.0.0.rc2. Here is what I have done till now -
$ rails g model User name:string
Used devise gem.
gem 'devise'
$ rails generate devise:install
$ rails generate devise User
Now, if I run rake:db migrate , I am receiving an error-
/home/swapnil/.rvm/gems/[email protected]/gems/devise-3.5.10/lib/devise/failure_app.rb:9:in `': uninitialized constant ActionController::RackDelegation (NameError)
What is the reason behind it ? How to fix this ?
Upvotes: 0
Views: 1465
Reputation: 21
You shouldn't be using this gem with Rails 5. Rails 5 already has rails-api merged in. So rails-api (this gem) and Rails 5 are not compatible you should just remove rails-api from the Gemfile.
Upvotes: 0
Reputation: 127
Devise 4.0 works with Rails 4.1 onwards.
So it was a problem with version of devise.
I upgraded it so that it is now compatible with rails 5.0.0.rc2.
gem 'devise', '~> 4.1', '>= 4.1.1'
and run bundle install.
Upvotes: 0
Reputation: 901
By the looks of it, you're using Devise 3.5.10
which is not compatible with Rails 5.0.0.rc2
. If using the latest Devise from RubyGems doesn't work for you, do this in your Gemfile . gem 'devise', github: plataformatec/devise
Checked my Rails 5.0.0.rc1 and my Devise version is 4.1.1 .
Upvotes: 0