How to build a gem?
Ruby gems are awesome :)
Finally, I tried to and built a gem.. Here’s how..
Firstly, install bundler by:
gem install bundler
After its successful installation, generate a new gem, using the following:
bundle gem gem_name
It will create some subdirectories and config files..
Then, you can add some code in /lib/gem_name.rb file. Later, build it:
gem build gem_name.gemspec
After, you may install your gem in local by running the command below:
gem install gem_name-0.1.0.gem
Then, check it:
irb(main):001:0> require 'abuzer_gem'
=> true
That’s all for today :)
stay tuned..