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 :-
- Update the version in your version.rb file
module HashMultiTool VERSION = "0.1.5" end
- Run this command inside your gem directory
gem build your_gem_name.gemspec
In my case it is -
gem build hash_multi_tool.gemspec
- It will generate a .gem file with the specified version. In my case it looks like this -
hash_multi_tool-0.1.5.gem
- Now its time to push our new version to rubygems.org -
gem push hash_multi_tool-0.1.5.gem
- Output will be something like this -
Leave a Comment