[英]Nokogiri not installing as a gem even though it's listed in Gemfile
[英]Bundler not installing Jasmine gem even when it's in 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'
我的環境:Rails 2.3.18,Ruby 1.8.7,Bundler 1.3.5。
我也得到這個奇怪的輸出:
$ bundle show jasmine
Could not find gem 'jasmine'.
Did you mean jasmine?
$ 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中刪除該需求,但是茉莉花應該在加載路徑中,對嗎?
Rails 2沒有內置的Bundler支持,因為它太舊了。
不過,您可以按照以下說明進行添加。
另外,除非您正在使用舊版項目,否則不應使用舊版Rails版本。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.