即使在Gemfile中,Bundler也没有安装Jasmine gem

时间:2014-02-20 20:50:06

标签: ruby-on-rails ruby bundler jasmine

任何想法。

$ 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?

更新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中删除那个需求,但是jasmine应该在加载路径中,对吗?

1 个答案:

答案 0 :(得分:0)

Rails 2没有内置的Bundler支持,因为它太旧了 不过,您可以按these instructions添加它。

此外,除非您正在处理旧项目,否则不应使用旧版Rails版本。