Reputation: 12596
I am very new to Ruby. I want to use one gem, a pre-released gem, instead of the original gem, in order to test it. I have a Gemfile. How do I do this?
I've been searching through the Bundler site, but I've only found more complicated things to do instead of more simple things.
Upvotes: 1
Views: 75
Reputation: 17631
gem 'gem_name'
Will use the latest version of the gem.
gem 'gem_name', '1.2.3'
Will force to use 1.2.3
version of the gem.
gem 'gem_name', '~> 1.2.3'
Will tell Bundler to use version of the gem >= 1.2.3
but < 1.3.0
gem 'gem_name', '>= 1.2.3'
Speak to itself. The following signs are also available < <= > =
See Bundler's doc
Upvotes: 3
Reputation: 515
You can specify which version of a gem to use in your gem file.
gem 'gem_name', '~> 1.0.1' # <--- version
Then just run bundle
to install and use that gem.
Upvotes: 2
Reputation: 9394
Here is a way to find and use pre-release versions.
http://blog.agirorn.com/posts/1
Upvotes: 1