Reputation: 96484
I've just started using Jasmine.
After installing it we're now getting this in our test suite:
NOTE: Gem.available? is deprecated, use Specification::find_by_name.
It will be removed on or after 2011-11-01.
Gem.available? called from /home/durrantm/.rvm/gems/ruby-1.9.3-p194@dmstaffing/
gems/jasmine-1.0.2.1/lib/jasmine/base.rb:64.
I'm not sure where the message is coming from or what I would change to fix it and remove the warning?
Upvotes: 0
Views: 363
Reputation: 776
It appears that you are using an older version of the Jasmine gem that is calling a now deprecated .available?
method. Jasmine 1.2.1 is the most current stable gem version. It also appears you aren't using Bundler so make sure to switch to the gemset you are currently using for your project (looks like it's dmstaffing) with the command rvm 1.9.3-p194@dmstaffing
, then run gem install jasmine -v '1.2.1'
. I would suggest using Bundler over gemsets because I find it a bit more dynamic and easy to make changes. If you want to use bundler to manage your dependencies instead, make sure it's installed then create a Gemfile in your project directory. If you would like to grab your gems from rubygems.org make sure you have:
source "http://rubygems.org"
at the head of your Gemfile then explicitly specify the most recent gem version of jasmine you wish to use:
gem "jasmine", "~> 1.2.1"
or take the current stable gem from the Jasmine source code:
gem "jasmine", :git => "git://github.com/pivotal/jasmine.git", :branch => "1.2.rc1"
or if you are feeling brave you can always grab the development branch:
gem "jasmine", :git => "git://github.com/pivotal/jasmine.git", :branch => "master"
Then run bundle install
. The current versions of Jasmine no longer has the code that was causing your problem so the warning should no longer be raised. It's a good practice to always specify your gem versions to avoid dependency issues later on.
Upvotes: 1