I have developed a gem for learning purposes and push it to https://rubygems.org/gems/combination-pairs. Now I want to do some changes in the code of the gem. Means I want to update my same gem but with different version. How can we do the same??
Asked
Active
Viewed 84 times
1 Answers
0
Follow these steps to update your ruby gem with changes:
- Keep testing your code and make the required changes in your gem code (locally)
- Once you are done with Step 1, update the version of your gem in
lib/combination/pairs/ version.rb
file by following the Semantic Versioning Guidelines. Let's say you change the version of your gem to0.0.2
- Next, run
bundle install
command in your gem's working directory to install all the gem dependencies. And finally, run the task
rake release
which will create tagv0.1.2
and build and pushcombination-pairs-0.0.2.gem
to Rubygems. This task is available to you as I see that you have the following line in theRakefile
require "bundler/gem_tasks"
You can double check the list of available
rake tasks
by executing the commandrake -T
NOTE:
Just for your reference, check out this awesome Railscasts by Ryan Bates: New Gem with Bundler

Kirti Thorat
- 52,578
- 9
- 101
- 108