1

我最近更新了我的应用程序以使用 Bundler,但我遇到了一些麻烦。我正在使用一个依赖于的 gem,activesupport 2.3+但我无法让它与 Bundler 一起使用。乘客在尝试加载我的应用程序时崩溃。MissingSourceFile尝试加载时发生activesupport错误。有谁知道如何解决这个问题或我可能做错了什么?不会发生这种情况activesupport 3.0+,但我使用的 gem 依赖于2.x.

no such file to load -- active_support/inflector/inflections (MissingSourceFile)

0   /opt/ruby/1.8.7-ee-2010.02/lib/ruby/gems/1.8/gems/activesupport-2.3.10/lib/active_support/dependencies.rb   182 in `require'
1   /opt/ruby/1.8.7-ee-2010.02/lib/ruby/gems/1.8/gems/activesupport-2.3.10/lib/active_support/dependencies.rb   182 in `require'
2   /opt/ruby/1.8.7-ee-2010.02/lib/ruby/gems/1.8/gems/activesupport-2.3.10/lib/active_support/dependencies.rb   547 in `new_constants_in'
3   /opt/ruby/1.8.7-ee-2010.02/lib/ruby/gems/1.8/gems/activesupport-2.3.10/lib/active_support/dependencies.rb   182 in `require'
4   /opt/ruby/1.8.7-ee-2010.02/lib/ruby/gems/1.8/gems/roxml-3.1.6/lib/roxml.rb  4   
.
.
.
9   config.ru   8   in `require'
4

3 回答 3

0

我正在使用 sudo 运行,它运行良好!

检查文件夹环境的权限:

ENV['X_DEBIAN_SITEID'] ||= 'default'
ENV['RAILS_ETC'] ||= "/etc/redmine/#{ENV['X_DEBIAN_SITEID']}"
ENV['RAILS_LOG'] ||= "/var/log/redmine/#{ENV['X_DEBIAN_SITEID']}"
ENV['RAILS_VAR'] ||= "/var/lib/redmine/#{ENV['X_DEBIAN_SITEID']}"
ENV['RAILS_CACHE'] ||= "/var/cache/redmine/#{ENV['X_DEBIAN_SITEID']}"
ENV['SCHEMA'] ||= "#{ENV['RAILS_CACHE']}/schema.db"
于 2014-07-17T16:59:03.067 回答
0

如果您使用的是 roxml gem,请切换到 3.1.3 版本。

于 2011-05-28T06:39:16.963 回答
0

需要这样的变形是 ActiveSupport 3 风格。如你看到的,

activesupport-2.3.9 $ find . -name "inflections.rb"
./lib/active_support/core_ext/integer/inflections.rb
./lib/active_support/core_ext/string/inflections.rb
./lib/active_support/inflections.rb

如果可能,有问题的 gem 应该执行以下操作:

require 'active_support'
require 'active_support/version'
if ActiveSupport::VERSION::MAJOR == 3
  require 'active_support/inflector/inflections'
end

这就是remote_table gem所做的。

于 2011-01-27T15:06:03.143 回答