2011-01-27 25 views
1

我最近更新了我的應用程序以使用Bundler,但我遇到了一些麻煩。我使用的是一款取決於activesupport 2.3+的寶石,我無法使用它與Bundler一起使用。嘗試加載我的應用程序時乘客崩潰。當它嘗試加載activesupport時發生一個MissingSourceFile錯誤。有人知道如何解決這個問題,或者我可能會做錯什麼?這不會發生在activesupport 3.0+,但我使用的寶石依賴於2.xMissingSourceFile需要'active_support /變形器/變形'

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' 

回答

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 

如果可能的話,有問題的寶石應該這樣做:

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

這就是the remote_table gem一樣。

+0

我的意思與文件列表下顯示的是active_support /偏轉/語調甚至沒有在2.3的ActiveSupport存在。 – 2011-01-27 15:07:16

0

如果您使用的是roxml gem,請切換到3.1.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"