Take the 2-minute tour ×

To create a new Ruby gem for use with Rails 3, should I use Jeweler or should I use Bundler's built-in gem skeleton to create a base gem? What are the differences that matter?

share|improve this question
possible duplicate of Ruby : How to write a gem? –  Andrew Marshall Mar 14 '12 at 20:17
add comment

4 Answers

up vote 18 down vote accepted

Use Bundler

From the command line:

bundle gem your_new_gem

This will create a directory called your_new_gem with just a basic set of files and directory structure that are now considered best-practice. It's quick, easy, and a great place to start.

share|improve this answer
add comment

Creating a Gem isn't that difficult and I would advise to try building a gem from scratch, without any tools. After you know what's involved (creating a gemspec, building and pushing it to rubygems.org), you can use tools to speed up the process. My guess is you won't because making a gem is hardly the trouble at all.

share|improve this answer
Good point. It is better to understand how to do it from scratch before you use a generator. This will make it alot easier to debug any problems that arise if you decide to use Jeweler. I do think that Jeweler makes it alot easier to create a gem and it forces you to do things like creating a description, versioning, etc.. why would you create it from scratch (after you do it once to learn it), when you can use a Jeweler and speed the process? Waste of time in my opinion, and less prone to errors. –  cowboycoded Dec 5 '10 at 19:35
I appreciate the discussion. –  Daniel Kehoe Dec 6 '10 at 3:02
sorry I'm late: What jeweler creates isn't easier, it just moves the stuff to the Rakefile. A gemspec is only about 10 lines. I like the stuff bundler generates though. Sensible and minimal. –  iain Dec 9 '10 at 21:57
Learning to write a gem from scratch instead of using a generator is like writing a web framework from scratch without using rails new. I see your point about creating one from scratch, but for someone new to creating gems (or anything for that matter), sometimes it's easier to learn by example. When you see what the generator builds, you can learn what each piece does and why it is important to the structure. Once you understand how it works, then you can write one from scratch. –  Andrew Jul 16 '11 at 5:54
In that case, I would go for the generator provided by bundler gem. –  iain Jul 17 '11 at 11:34
add comment

I would go with Jeweler. The Bundler skeleton is only going to give you the basics. Jeweler has alot more options to work with and many helpful rake tasks for versioning, pushing to github, creating the gemspec, building and installing.

If you are working with Rails 3 engines, I have a Jeweler fork (definitely a work-in-progress) that will generate the app skelaton and include the engine file. You just have to run the jeweler command with --rails3-engine as an option. Here is the fork if you are interested:

share|improve this answer
Jeweler is no longer kept up-to-date as much as Bundler, as the author confesses that most people now use Bundler instead: github.com/technicalpickles/jeweler/issues/232 –  joonty Feb 15 '13 at 8:58
I agree. I no longer use jeweler. It is probably better to start from scratch your first time, so you understand how the gemspec works. –  cowboycoded Feb 15 '13 at 14:39
add comment

Here's an alternative that's worth looking at: ore

Bundler gives you a single template for ruby gems, whereas ore has multiple built in templates, plus the ability to create your own. It also supports Git, SVN (urgh) and Mercurial.

share|improve this answer
add comment

Your Answer


