MissingSourceFile while requiring 'active_support/inflector/inflections'
I recently updated my application to use Bundler, but I'm having some troubles. I'm using a gem that depends on activesupport 2.3+
and I can't get it to work with Bundler. Passenger crashes while trying to load my application. A MissingSourceFile
error occurs while it tries to load activesupport
. Does anybody know how to solve this issue or what I might do wrong? It doesn't happen with activesupport 3.0+
, but the gem I'm using relies on 2.x
.
no such file to load -- active_support/inflector/inflections (MissingSourceFile)
0 /opt/ruby/1.8.7-ee-2010.02/lib/r开发者_如何学编程uby/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'
Requiring inflections like that is the ActiveSupport 3 style. As you can see,
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
If possible, the offending gem should do something like:
require 'active_support'
require 'active_support/version'
if ActiveSupport::VERSION::MAJOR == 3
require 'active_support/inflector/inflections'
end
That's what the remote_table gem does.
If you are using roxml gem, switch to 3.1.3 version.
I was running with sudo and it works fine!
Check the permissions of the folders enviroment:
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"
精彩评论