How to upgrade and publish the next version of your ruby gem?

If you are already built a gem and want to release its next version then follow the bellow mentioned steps :-


  1. Update the version in your version.rb file
    module HashMultiTool
      VERSION = "0.1.5"
    end
    
    
  2. Run this command inside your gem directory
    gem build your_gem_name.gemspec
    

    In my case it is -
    gem build hash_multi_tool.gemspec
    
    
  3. It will generate a .gem file with the specified version. In my case it looks like this -
    hash_multi_tool-0.1.5.gem
    
    
  4. Now its time to push our new version to rubygems.org -
    gem push  hash_multi_tool-0.1.5.gem
    
    
  5. Output will be something like this -





Check it on rubygems.org -


No comments

Powered by Blogger.