Abhi On Rails

Ruby On Rails - What I learned recently

Create ruby gem using Jeweler

Recently I created a ruby gem time_diff using the help of jeweler. Jeweler is a gem using that you can create and manage ruby gems.
First install jeweler:

sudo gem install jeweler

Then create the scaffold for your gem using the command:

jeweler your-gem

This will create two directory test and lib. In lib folder you can create the files for your gem. In test folder you can create the files for tests. The above command will create some other files also like Rakefile, README.rdoc, Gemfile. You can add your dependencies to the Gemfile.

You can create the version using:

rake version:write

Then you can install the gem in your local machine using:

rake install

Then to release the gem to RubyGem:

rake release

You need a RubyGem account to push gem to your account.
For more information visit GitHub

blog comments powered by Disqus
Updated time_diff gem →
← time_diff - a gem for calcu...