简体   繁体   中英

Bundler not installing Jasmine gem even when it's in Gemfile

Any ideas.

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

I also tried with:

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

My env: Rails 2.3.18, Ruby 1.8.7, Bundler 1.3.5.

Update

I am getting this weird output too:

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

Update 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

But bundler does not detect jasmine:

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

I could remove that require in Rakefile, but jasmine should be in load path, right?

Rails 2 doesn't have builtin Bundler support, because it's too old.
You can follow these instructions to add it, though.

Also, unless you are working on a legacy project, you shouldn't be using a legacy Rails version.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM