0

由于一些复杂的原因,我正在尝试使用bundler我的 Rails 2.3.5 应用程序(由 insoshi 构建)。基本上,我需要部署到具有 Rails 2.3.8 和 Rails 2.3.5 应用程序的服务器,它们不能很好地相互配合,因为 2.3.8 需要机架 1.1.0,而 2.3.5 需要机架 1.0。 1 并且如果机架 1.1.0 甚至安装了就会爆炸。至少,这就是我解释https://rails.lighthouseapp.com/projects/8994/tickets/3685-actionpack-235-gem-declares-incompatibility-with-rack-110的方式

无论如何,我安装了 bundler,但在应用程序随附的一些插件中出现错误。这里:

pdt-eleven:dreamcar glurban$ ruby script/server
=> Booting WEBrick
=> Rails 2.3.5 application starting on http://0.0.0.0:3000
/Users/glurban/code/dreamcar/vendor/rails/activesupport/lib/active_support/dependencies.rb:156:in `require': no such file to load -- openid (MissingSourceFile)
    from /Users/glurban/code/dreamcar/vendor/rails/activesupport/lib/active_support/dependencies.rb:156:in `require'
    from /Users/glurban/code/dreamcar/vendor/rails/activesupport/lib/active_support/dependencies.rb:521:in `new_constants_in'
    from /Users/glurban/code/dreamcar/vendor/rails/activesupport/lib/active_support/dependencies.rb:156:in `require'
    from /Users/glurban/code/dreamcar/vendor/plugins/open_id_authentication/lib/open_id_authentication.rb:2
    from /Users/glurban/code/dreamcar/vendor/rails/activesupport/lib/active_support/dependencies.rb:156:in `require'
    from /Users/glurban/code/dreamcar/vendor/rails/activesupport/lib/active_support/dependencies.rb:156:in `require'
    from /Users/glurban/code/dreamcar/vendor/rails/activesupport/lib/active_support/dependencies.rb:521:in `new_constants_in'
    from /Users/glurban/code/dreamcar/vendor/rails/activesupport/lib/active_support/dependencies.rb:156:in `require'
    from /Users/glurban/code/dreamcar/vendor/plugins/open_id_authentication/init.rb:5:in `evaluate_init_rb'
    from ./script/../config/../vendor/rails/railties/lib/rails/plugin.rb:158:in `evaluate_init_rb'
    from /Users/glurban/code/dreamcar/vendor/rails/activesupport/lib/active_support/core_ext/kernel/reporting.rb:11:in `silence_warnings'
    from ./script/../config/../vendor/rails/railties/lib/rails/plugin.rb:154:in `evaluate_init_rb'
    from ./script/../config/../vendor/rails/railties/lib/rails/plugin.rb:48:in `load'
    from ./script/../config/../vendor/rails/railties/lib/rails/plugin/loader.rb:38:in `load_plugins'
    from ./script/../config/../vendor/rails/railties/lib/rails/plugin/loader.rb:37:in `each'
    from ./script/../config/../vendor/rails/railties/lib/rails/plugin/loader.rb:37:in `load_plugins'
    from ./script/../config/../vendor/rails/railties/lib/initializer.rb:369:in `load_plugins'
    from ./script/../config/../vendor/rails/railties/lib/initializer.rb:165:in `process'
    from ./script/../config/../vendor/rails/railties/lib/initializer.rb:113:in `send'
    from ./script/../config/../vendor/rails/railties/lib/initializer.rb:113:in `run'
    from /Users/glurban/code/dreamcar/config/environment.rb:14
    from /Users/glurban/code/dreamcar/vendor/rails/activesupport/lib/active_support/dependencies.rb:156:in `require'
    from /Users/glurban/code/dreamcar/vendor/rails/activesupport/lib/active_support/dependencies.rb:156:in `require'
    from /Users/glurban/code/dreamcar/vendor/rails/activesupport/lib/active_support/dependencies.rb:521:in `new_constants_in'
    from /Users/glurban/code/dreamcar/vendor/rails/activesupport/lib/active_support/dependencies.rb:156:in `require'
    from /Users/glurban/code/dreamcar/config.ru:4
    from /Users/glurban/.rvm/gems/ruby-1.8.7-p299/gems/rack-1.0.1/lib/rack/builder.rb:29:in `instance_eval'
    from /Users/glurban/.rvm/gems/ruby-1.8.7-p299/gems/rack-1.0.1/lib/rack/builder.rb:29:in `initialize'
    from /Users/glurban/code/dreamcar/config.ru:1:in `new'
    from /Users/glurban/code/dreamcar/config.ru:1
    from script/server:3:in `eval'
    from /Users/glurban/code/dreamcar/vendor/rails/railties/lib/commands/server.rb:78
    from script/server:3:in `require'
    from script/server:3

这是 open_id_authentication.rb 中的违规行:

require 'uri'
require 'openid'
require 'rack/openid'

那么,我应该将所有这些宝石添加到我的 Gemfile 中吗?当我不使用捆绑器时,它们会自动加载,我想,但现在没有?

谢谢。

4

1 回答 1

2

不久前修复了它,但意识到我从未发布过解决方案。正如预期的那样,将其添加到 gemfile 工作:

gem 'rack/openid', '>=1.0.1'
于 2010-10-14T11:49:15.770 回答