简体   繁体   中英

Update ruby gem version with new changings

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

Follow these steps to update your ruby gem with changes:

  1. Keep testing your code and make the required changes in your gem code (locally)
  2. 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 to 0.0.2
  3. Next, run bundle install command in your gem's working directory to install all the gem dependencies.
  4. And finally, run the task rake release which will create tag v0.1.2 and build and push combination-pairs-0.0.2.gem to Rubygems. This task is available to you as I see that you have the following line in the Rakefile

     require "bundler/gem_tasks" 

    You can double check the list of available rake tasks by executing the command

     rake -T 

NOTE:

Just for your reference, check out this awesome Railscasts by Ryan Bates: New Gem with Bundler

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