简体   繁体   English

在Rails引擎中“加载RubyGems插件时出错”

[英]“Error loading RubyGems plugin” while inside a Rails Engine

In my Rails Engine, I get an "Error Loading RubyGems." 在我的Rails Engine中,出现“加载RubyGems时出错”。 However, this error doesn't persist when I'm in the root directory of my app. 但是,当我位于应用程序的根目录中时,此错误不会持续存在。

From my main Rails folder: 在我的主要Rails文件夹中:

$ gem -v
2.0.5

From inside the engine: 从引擎内部:

$ gem -v
Error loading RubyGems plugin "/Users/me/.rvm/gems/ruby-2.0.0-p247@global/gems/rubygems-bundler-1.2.2/lib/rubygems_plugin.rb": dlopen(/Users/me/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/x86_64-darwin12.4.1/openssl.bundle, 9): Library not loaded: /opt/local/lib/libssl.1.0.0.dylib
  Referenced from: /Users/me/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/x86_64-darwin12.4.1/openssl.bundle
  Reason: image not found - /Users/me/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/x86_64-darwin12.4.1/openssl.bundle (LoadError)
2.0.5

This is preventing me from running bundle install, rails server, etc. 这使我无法运行捆绑软件安装,Rails服务器等。

I'm stumped. 我很沮丧 I haven't been able to find anyone with the same issue, and have run out of leads on what I think it could be for the night. 我一直找不到任何遇到相同问题的人,并且在我认为可能是当晚的活动中没有线索。 Thanks... 谢谢...

It turns out that the problem was a lack of .ruby-version file in my engine directory. 事实证明,问题出在我的引擎目录中缺少.ruby-version文件。 Just adding this file ended up fixing the problem. 只需添加此文件即可解决问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM