-
Creating a new Ruby Package (and putting it up on Rubygems) with newgem
So, in the sprit of the previous article on this blog, I’m going to document how to make a Ruby package and put it up on RubyGems.
- Create your project. You can use Jeweler for this, or newgem. I like newgem, because I’m familiar with it. The instructions in this article assume newgem infrastructure
- * hack hack hack*
- * hack hack hack *
$ rake check_manifest. Your manifest declares what files are in your package. If you have confidence there is no cruft, you could generate this via$ rake manifestI think will generate this for you.Test your gem. With newgem try
rake install_gem.It’s possible (if you’re using RVM) that this isn’t going to work, and if so just redo the sudo command that failed, but without sudo. Then try to use the gem somewhere (shove it into a test Rails app, for example).
* does the package work now? Yes? Awesome *
back in your development directory…
$ gem install gemcutter$ rake release_sanity VERSION=1.0.0(or whatever version number you expect… knowing that the computer might have other ideas)$ rake release_to_gemcutter VERSION=1.0.0(or whatever version you want to push
And we’re done.