簡體   English   中英

捆綁包安裝后,寶石不可用

[英]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中,並且所有寶石都在工作。

我的系統進行測試:

  • RVM
  • 紅寶石2.0.0p195
  • 新寶石
  • 除了Gemfile中的這個gem外,沒有任何修改的新Rails 4項目
  • 我嘗試了兩個不同的用戶
  • Ubuntu 12.04

如果我調用gem install activerecord-oracle_enhanced-adapter ,則會安裝該gem,但不是從'rails4'分支安裝的,我想使用Gemfile

嘗試調用bundle exec irb這樣您將在特定的Gemset范圍而不是系統之一中加載irb。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM