简体   繁体   中英

“Error loading RubyGems plugin” while inside a Rails Engine

In my Rails Engine, I get an "Error Loading RubyGems." However, this error doesn't persist when I'm in the root directory of my app.

From my main Rails folder:

$ 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.

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. Just adding this file ended up fixing the problem.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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