简体   繁体   中英

Gem is not available after bundle install

I have a Gemfile where I add a new gem

gem 'activerecord-oracle_enhanced-adapter', git: "https://github.com/rsim/oracle-enhanced.git", branch: "rails4"

When I run bundle install I get

> bundle install
Updating https://github.com/rsim/oracle-enhanced.git
Fetching gem metadata from https://rubygems.org/.......
Fetching gem metadata from https://rubygems.org/..
Resolving dependencies...
...
Using activerecord (4.0.0)
Using activerecord-oracle_enhanced-adapter (1.4.2) from https://github.com/rsim/oracle-enhanced.git (at rails4) 
Using bundler (1.3.5)
...

But when I call gem list , the gem is missing. If I try to load this gem in the irb, I get

irb
require 'rubygems'
=> false
gem 'activerecord'
=> true
gem 'activerecord-oracle_enhanced-adapter'
Gem::LoadError: Could not find 'activerecord-oracle_enhanced-adapter' (>= 0) among 49 total gem(s)

I do not understand this behavior. I have several gems added to my Gemfile this way and all of them are working.

My system for the test:

  • RVM
  • ruby 2.0.0p195
  • new gemset
  • new rails 4 project without any modification except this gem in the Gemfile
  • I tried it with two different users
  • Ubuntu 12.04

If I call gem install activerecord-oracle_enhanced-adapter , this gem is installed, but not from the 'rails4' branch and I would like to use the Gemfile

尝试调用bundle exec irb这样您将在特定的Gemset范围而不是系统之一中加载irb。

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