1. gem install jeweler
2. jeweler gem-name
3. bundle install
4. rake version:write MAJOR=0 MINOR=1 PATCH=0
5. git remote rm origin
Jeweler automatically creates a git repo
6. Open the Rakefile and customize the gem details.
I changed the default github repo URL to bitbucket repo URL
7. git remote add origin bitbucket-url
8. Delete the line Jeweler::RubygemsDotOrgTasks.new to prevent accidental release to Gemcutter.
9. rake gemspec
10. rake build to create the .gem file that can be used with any project.