Publishing gems on Gemcutter

0 views
Skip to first unread message

Adam McCrea

unread,
Oct 22, 2009, 8:16:46 AM10/22/09
to Columbus Ruby Brigade
So it seems that Gemcutter is the future of gem hosting and distribution.  I've never felt comfortable with publishing gems myself, but I'd like to change that.  Here are the two scenarios I want a better handle on:

1. I create a new Ruby library and it's up on Github.  How do I make it into a gem and put it on Gemcutter?  How do I handle new versions?
2. I fork an existing gem on Github and make some changes.  How do I put my forked gem on Gemcutter?

I'm sure both of these are going to be pretty effortless, I just haven't taken the time to try it.  I imagine there are others are in a similar boat.  Does anyone understand this well enough to do a lightning talk at the next meeting?  If not, sign me up, and I'll PDI.

- Adam

Joe Fiorini

unread,
Oct 22, 2009, 8:22:16 AM10/22/09
to colum...@googlegroups.com, Columbus Ruby Brigade
You want Jeweler, http://github.com/technicalpickles/jeweler. It does
for gems what Rails does for web apps. The readme covers it very well.
Using Jeweler when you're ready to push your gem to gemcutter you type
rake gemcutter:release. It's almost too easy :)

- Joe

Sent from my mobile device

Ryan Carmelo Briones

unread,
Oct 22, 2009, 8:55:39 AM10/22/09
to Columbus Ruby Brigade
On Oct 22, 8:16 am, Adam McCrea <adam.mcc...@gmail.com> wrote:
> So it seems that Gemcutter is the future of gem hosting and distribution.
>  I've never felt comfortable with publishing gems myself, but I'd like to
> change that.  Here are the two scenarios I want a better handle on:
>
> 1. I create a new Ruby library and it's up on Github.  How do I make it into
> a gem and put it on Gemcutter?

This is very easy. See gemcutter.com's front page.

Joe F. mentioned Jeweler, which a lot of people like. I personally
like doing my own Gem::Specification and using Rake::GemPackageTask. I
just like the simplicity of it, but I've been burned by gems that
require the hoe gem to install. YMMV.

> How do I handle new versions?

I assume this is handled by updating the gemspec and gem push. I
normally tie the version specified in the Gem Specification to a
constant like MyGem::VERSION.

> 2. I fork an existing gem on Github and make some changes.  How do I put my
> forked gem on Gemcutter?

Gemcutter doesn't support namespacing yet. Here's the latest:

http://wiki.github.com/qrush/gemcutter/fork-support

You could probably still manually munge the gem name in the spec
yourself, but I don't think it's recommended.

Bryce Thornton

unread,
Oct 22, 2009, 10:53:43 AM10/22/09
to colum...@googlegroups.com
Ryan Bates made a Railscast about this issue:

http://railscasts.com/episodes/183-gemcutter-jeweler
Reply all
Reply to author
Forward
0 new messages