需要“active_support/inflector/inflections”时缺少SourceFile
我最近更新了我的应用程序以使用 Bundler,但遇到了一些麻烦。我使用的 gem 依赖于 activesupport 2.3+
,但我无法让它与 Bundler 一起使用。 Passenger 在尝试加载我的应用程序时崩溃。尝试加载 activesupport
时发生 MissingSourceFile
错误。有谁知道如何解决这个问题或者我可能做错了什么? 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'
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/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'
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
ActiveSupport 3 风格需要这样的变化。正如你所看到的,
如果可能的话,有问题的 gem 应该做类似的事情:
这就是 remote_table gem 可以。
Requiring inflections like that is the ActiveSupport 3 style. As you can see,
If possible, the offending gem should do something like:
That's what the remote_table gem does.
如果您使用的是 roxml gem,请切换到 3.1.3 版本。
If you are using roxml gem, switch to 3.1.3 version.
我用 sudo 运行,效果很好!
检查文件夹环境的权限:
I was running with sudo and it works fine!
Check the permissions of the folders enviroment: