缺少一个恒定的负载..我怎么能绕过这个?

时间:2010-11-29 16:02:41

标签: ruby-on-rails constants bundle requirements bundler

我刚刚为rails 2.3.5 Spree项目安装了bundler。

这样做之后,我意识到当我去script/console时出现了这个错误:

Loading development environment (Rails 2.3.5)
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:105:in `const_missing':NameError: uninitialized constant Rails::Plugin::OpenID

我的Gemfile:

gem 'ruby-openid', '2.1.8'

我没有错误地运行bundle install

>>宝石列表-d ruby​​-openid

*** LOCAL GEMS ***

ruby-openid (2.1.8, 2.1.2)
Author: JanRain, Inc
Homepage: http://github.com/openid/ruby-openid
Installed at (2.1.8): /Library/Ruby/Gems/1.8
             (2.1.2): /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8

完整的Backtrace

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:105:in `const_missing': uninitialized constant Rails::Plugin::OpenID (NameError)
    from /Users/macuser/Sites/test/spree/vendor/plugins/open_id_authentication/init.rb:16:in `evaluate_init_rb'
    from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:182:in `call'
    from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:182:in `evaluate_method'
    from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:166:in `call'
    from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:90:in `run'
    from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:90:in `each'
    from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:90:in `send'
    from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:90:in `run'
    from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:276:in `run_callbacks'
    from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/dispatcher.rb:51:in `send'
    from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/dispatcher.rb:51:in `run_prepare_callbacks'
    from /Library/Ruby/Gems/1.8/gems/rails-2.3.5/lib/initializer.rb:631:in `prepare_dispatcher'
    from /Library/Ruby/Gems/1.8/gems/rails-2.3.5/lib/initializer.rb:185:in `process'
    from /Library/Ruby/Gems/1.8/gems/rails-2.3.5/lib/initializer.rb:113:in `send'
    from /Library/Ruby/Gems/1.8/gems/rails-2.3.5/lib/initializer.rb:113:in `run'
    from ./script/../config/../lib/spree/initializer.rb:90:in `run'
    from /Users/macuser/Sites/test/spree/config/environment.rb:26
    from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require'
    from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require'
    from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:in `new_constants_in'
    from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require'
    from /Library/Ruby/Gems/1.8/gems/rails-2.3.5/lib/commands/server.rb:84
    from script/server:3:in `require'
    from script/server:3

现在要检查什么的线索?谢谢你!

1 个答案:

答案 0 :(得分:1)

之前我见过这个提到过 - 我认为它可能与Gemfile中的require语法有关...

我刚刚一起攻击了一个Gemfile并投入了......

gem "ruby-openid", :require => 'openid'

能够在公认的缩小测试环境中启动控制台...