[英]Gem is not available after bundle install
我有一個Gemfile,在其中添加了新的gem
gem 'activerecord-oracle_enhanced-adapter', git: "https://github.com/rsim/oracle-enhanced.git", branch: "rails4"
當我運行bundle install
我得到
> 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)
...
但是當我調用gem list
,gem丟失了。 如果我嘗試在irb中加載此gem,我會得到
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)
我不了解這種行為。 我以這種方式將幾個寶石添加到我的Gemfile中,並且所有寶石都在工作。
我的系統進行測試:
如果我調用gem install activerecord-oracle_enhanced-adapter
,則會安裝該gem,但不是從'rails4'分支安裝的,我想使用Gemfile
嘗試調用bundle exec irb
這樣您將在特定的Gemset范圍而不是系統之一中加載irb。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.