Reputation: 162
I'm trying to add the Devise gem to a Rails app, and I'm getting a weird "no method error" when I try to run rails g devise:install
. I scanned through all the other Stack posts on it, but none matched my error.
I added the following to my Gemfile:
gem 'devise'
gem 'omniauth'
gem 'omniauth-twitter'
gem 'omniauth-facebook'
gem 'omniauth-linkedin'
And ran bundle install. Everything was fine.
Then I tried to install Devise authentication:
rails g devise:install
/Users/jake/Documents/Aptana Studio Workspace/
App/config/initializers/assets.rb:5:in `<top (requir
ed)>': undefined method `+' for nil:NilClass (NoMethodError)
...
Assets.rb
Rails.application.config.assets.version = '1.0'
Rails.application.config.assets.precompilerails += %w( new_user.css )
Does anyone know why this could be happening? Thanks so much.
Upvotes: 0
Views: 70
Reputation: 1398
Might be a typo. Your code should read:
Rails.application.config.assets.precompile
instead of:
Rails.application.config.assets.precompilerails
Upvotes: 2