0

I have a Uninitialized constant Devise error when running rake db:migrate.

In Gemfile: gem 'devise' with a successful bundle install.

I tried adding 'require "devise"' to config/application.rb but no success. In config/application.rb:

if defined?(Bundler)  
  Bundler.require(*Rails.groups(:assets => %w(development test)))  
end

Stack trace:

uninitialized constant Devise
/Users/cs/.Trash/qa/config/initializers/devise.rb:3:in `<top (required)>'
/Users/cs/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.2.9/lib/rails/engine.rb:588:in `block (2 levels) in <class:Engine>'
/Users/cs/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.2.9/lib/rails/engine.rb:587:in `each'
/Users/cs/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.2.9/lib/rails/engine.rb:587:in `block in <class:Engine>'
/Users/cs/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.2.9/lib/rails/initializable.rb:30:in `instance_exec'
/Users/cs/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.2.9/lib/rails/initializable.rb:30:in `run'
/Users/cs/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.2.9/lib/rails/initializable.rb:55:in `block in run_initializers'
/Users/cs/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.2.9/lib/rails/initializable.rb:54:in `each'
/Users/cs/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.2.9/lib/rails/initializable.rb:54:in `run_initializers'
/Users/cs/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.2.9/lib/rails/application.rb:136:in `initialize!'
/Users/cs/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.2.9/lib/rails/railtie/configurable.rb:30:in `method_missing'
/Users/cs/.Trash/qa/config/environment.rb:5:in `<top (required)>'
/Users/cs/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.2.9/lib/rails/application.rb:103:in `require_environment!'
/Users/cs/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.2.9/lib/rails/application.rb:297:in `block (2 levels) in initialize_tasks'
Tasks: TOP => routes => environment
(See full trace by running task with --trace)

Gemfile:

source 'https://rubygems.org'

gem 'rails', '3.2.9'

## JRUBY GEMS
gem 'activerecord-jdbc-adapter'
gem 'activerecord-jdbcpostgresql-adapter'
gem 'jdbc-postgres'
gem 'jruby-openssl'

## FRONT END/DESIGN GEMS
gem 'jquery-rails'
gem 'bootstrap-sass'
gem 'haml'
gem 'font-awesome-sass-rails'

## ADMINISTRATION
gem 'activeadmin'
gem 'rufus-scheduler'

## AUTHENTICATION
gem 'bcrypt-ruby'
gem 'devise'

## FILE UPLOADS
gem 'paperclip'
gem 'aws-sdk'

## PERFORMANCE
gem 'dalli'
gem "trinidad"

## TESTING
gem "seedbank"

# Gems used only for assets and not required
# in production environments by default.
group :assets do
  gem 'sass-rails',   '~> 3.2.3'
  gem 'coffee-rails', '~> 3.2.1'
  gem 'therubyrhino'
  gem 'uglifier', '>= 1.0.3'
  gem 'closure-compiler'
end
4

1 に答える 1