2014-02-20 44 views
0

任何想法。Bundler不安裝茉莉花寶石,即使它在Gemfile中

$ bundle install | grep -i jasmine 
# no output 
$ grep -i jasmine Gemfile*  
Gemfile: gem 'jasmine', '1.0.1.1' 
Gemfile.lock: jasmine (= 1.0.1.1) 

我也試圖與:

Gemfile: gem 'jasmine', '1.0.1.1', :require => 'jasmine' 

我ENV:Rails的2.3.18和Ruby 1.8.7,1.3.5捆紮機。

更新

我得到這個奇怪的輸出過:

$ bundle show jasmine 
Could not find gem 'jasmine'. 
Did you mean jasmine? 

更新2

$ sudo gem i jasmine -v 1.0.1.1 
Fetching: selenium-client-1.2.18.gem (100%) 
Fetching: selenium-rc-2.20.0.gem (100%) 
Fetching: json_pure-1.8.1.gem (100%) 
Fetching: jasmine-1.0.1.1.gem (100%) 
Fetching: rspec-core-2.14.7.gem (100%) 
Fetching: rspec-expectations-2.14.5.gem (100%) 
Fetching: rspec-mocks-2.14.6.gem (100%) 
Successfully installed selenium-client-1.2.18 
Successfully installed selenium-rc-2.20.0 
Successfully installed json_pure-1.8.1 
Successfully installed jasmine-1.0.1.1 
Successfully installed rspec-core-2.14.7 
Successfully installed rspec-expectations-2.14.5 
Successfully installed rspec-mocks-2.14.6 
7 gems installed 

但捆綁不檢測茉莉:

$ rake db:migrate 
(in /vagrant) 
rake aborted! 
no such file to load -- jasmine 
/vagrant/Rakefile:10:in `require' 
(See full trace by running task with --trace) 

我可以刪除那個要求在Rakefile中,但茉莉花應該在加載路徑,對不對?

+0

實際上,你想'gem install jasmine -v 1.0.1.1'有時在Rails項目上運行「bundle install」可以安裝一個衝突版本的gem – HackerKarma

+0

你可以粘貼'bundle env'的輸出嗎? –

+0

我認爲我的問題是用'bundle exec'解決的,我會試一試,然後發佈。 – juanpastas

回答

0

Rails 2沒有內置的Bundler支持,因爲它太舊了。
雖然,您可以按照these instructions來添加它。

此外,除非您正在使用舊項目,否則不應使用舊版Rails版本。

+0

它安裝了所有其他的寶石,這是一個遺留項目 – juanpastas