0

DB:Rake を実行しようとすると、次のエラーが発生します。

** Invoke db:migrate (first_time)
** Invoke environment (first_time) 
** Execute environment
Resolved collector.newrelic.com to 204.93.223.153
 rake aborted!
 undefined method `confirm_within=' for Devise:Module
 /Users/jasonvdm/development/rails/config/initializers/devise.rb:66:in `block in <top   (required)>'
 /Users/jasonvdm/.rvm/gems/ruby-1.9.3-p194@wheelz/gems/devise-2.1.2/lib/devise.rb:247:in    `setup'
 /Users/jasonvdm/development/rails/config/initializers/devise.rb:3:in `<top (required)>'
 /Users/jasonvdm/.rvm/gems/ruby-1.9.3-p194@wheelz/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:234:in `load'
 /Users/jasonvdm/.rvm/gems/ruby-1.9.3-p194@wheelz/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:234:in `block in load'
 /Users/jasonvdm/.rvm/gems/ruby-1.9.3-p194@wheelz/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:223:in `block in load_dependency'
 /Users/jasonvdm/.rvm/gems/ruby-1.9.3-p194@wheelz/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:640:in `new_constants_in'
 /Users/jasonvdm/.rvm/gems/ruby-1.9.3-p194@wheelz/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:223:in `load_dependency'
 /Users/jasonvdm/.rvm/gems/ruby-1.9.3-p194@wheelz/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:234:in `load'
 /Users/jasonvdm/.rvm/gems/ruby-1.9.3-p194@wheelz/gems/railties-3.1.3/lib/rails/engine.rb:556:in `block (2 levels) in <class:Engine>'
 /Users/jasonvdm/.rvm/gems/ruby-1.9.3-p194@wheelz/gems/railties-3.1.3/lib/rails/engine.rb:555:in `each'
 /Users/jasonvdm/.rvm/gems/ruby-1.9.3-p194@wheelz/gems/railties-3.1.3/lib/rails/engine.rb:555:in `block in <class:Engine>'
 /Users/jasonvdm/.rvm/gems/ruby-1.9.3-p194@wheelz/gems/railties-3.1.3/lib/rails/initializable.rb:30:in `instance_exec'
 /Users/jasonvdm/.rvm/gems/ruby-1.9.3-p194@wheelz/gems/railties-3.1.3/lib/rails/initializable.rb:30:in `run'
 /Users/jasonvdm/.rvm/gems/ruby-1.9.3-p194@wheelz/gems/railties-3.1.3/lib/rails/initializable.rb:55:in `block in run_initializers'
 /Users/jasonvdm/.rvm/gems/ruby-1.9.3-p194@wheelz/gems/railties-3.1.3/lib/rails/initializable.rb:54:in `each'
 /Users/jasonvdm/.rvm/gems/ruby-1.9.3-p194@wheelz/gems/railties-3.1.3/lib/rails/initializable.rb:54:in `run_initializers'
 /Users/jasonvdm/.rvm/gems/ruby-1.9.3-p194@wheelz/gems/railties-3.1.3/lib/rails/application.rb:96:in `initialize!'
 /Users/jasonvdm/.rvm/gems/ruby-1.9.3-p194@wheelz/gems/railties-3.1.3/lib/rails/railtie/configurable.rb:30:in `method_missing'
 /Users/jasonvdm/development/rails/config/environment.rb:5:in `<top (required)>'
 /Users/jasonvdm/.rvm/gems/ruby-1.9.3-p194@wheelz/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:240:in `require'
 /Users/jasonvdm/.rvm/gems/ruby-1.9.3-p194@wheelz/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:240:in `block in require'
 /Users/jasonvdm/.rvm/gems/ruby-1.9.3-p194@wheelz/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:223:in `block in load_dependency'
 /Users/jasonvdm/.rvm/gems/ruby-1.9.3-p194@wheelz/gems/activesupport- 3.1.3/lib/active_support/dependencies.rb:640:in `new_constants_in'

これらのエラーが発生する理由がまったくわかりません。

これが私の gemfile であり、プライベートな最後の部分をいくつか除外しています。

source 'http://rubygems.org'

gem 'rails', '3.1.3'

# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'

gem 'mysql2', '~> 0.3.11'
# gem 'sqlite3'

group :production do
  gem 'thin'
  gem 'pg'
end

# Use unicorn as the web server
# gem 'unicorn'

# Deploy with Capistrano
# gem 'capistrano'

# To use debugger (ruby-debug for Ruby 1.8.7+, ruby-debug19 for Ruby 1.9.2+)
# gem 'ruby-debug'
# gem 'ruby-debug19', :require => 'ruby-debug'

# Bundle the extra gems:
 gem 'typus', '~> 3.1.8'
 gem "ckeditor-rails", :git => "https://github.com/fesplugas/rails-ckeditor.git" # for     typus _text_with_ckeditor.html.erb
gem 'nokogiri'
gem 'aws-s3', :require => 'aws/s3'
gem 'aws-sdk'
gem 'paperclip', '~> 2.5.0'
gem 'devise'
gem 'omniauth-facebook'
gem 'cancan'
gem 'koala'
gem 'rc_rails'
gem 'dynamic_form' # to get back old 'error_messages_on' behavior
gem 'role_model'
gem 'renum'
gem 'geokit', "1.6.0"
gem 'rails3-settings', '~> 1.0.0', :require => 'settings', :git =>  'git://github.com/jlaxson/rails-settings'
gem 'acts_as_api'
gem 'twilio-ruby'
gem 'xml-simple', :require => 'xmlsimple'
gem 'braintree', '>= 2.15.0'
gem 'carmen'
gem 'state_machine', :git => 'git://github.com/pluginaweek/state_machine.git'

残りはプライバシーのために隠されています

ヘルプ?

4

1 に答える 1

2

config/initializers/devise.rb(66行目)にエラーがあるようです。confirm_withinそのコードが表示されない場合は、Devise2.0で名前が変更されたDeviseのメソッドを呼び出しているようallow_unconfirmed_access_forに見えます。

https://github.com/plataformatec/devise/wiki/How-To:-Upgrade-to-Devise-2.0

于 2012-06-21T17:56:08.710 に答える