tags:

views:

40

answers:

1

With Jeweler I created a gem folder structure with ease.

However, I still have some questions:

  1. Why are params like --gemcutter and --rubyforge still available for Jeweler. Aren't these replaced by RubyGems? Do I have to specify anything to create a gem for RubyGems?

  2. In the Rakefile I have information about the gem, and when I run "rake install" it created a gemspec. Why is the same information in two places?

  3. What is a manifest? Just read about it, haven't seen such file.

  4. How do I make my gem callable from the shell once I have installed it, like rails. Cause right now it's just accessible through a Ruby script using require.

  5. Should I use "jeweler release" or "gem push" to push my gem to RubyGems.org?

  6. I have to specify "handle" when signing up in RubyGems. What is that?

Thanks.

+1  A: 
  1. jeweler was created before RubyGems became what it is, so it still reflects the split. I'm not sure when jeweler was last updated, either. (I think it also still recognizes building gems on Github, which is now disabled.)
  2. I'm not sure I follow what you're saying. The specification in the Rakefile details what the spec that gets written should look like. The spec that gets written details what should be installed and how, I believe.
  3. A manifest is a list of all the files that your gem should ship with. Not everyone uses one. See the hoe documentation for some pro-manifest discussion.
  4. Many Ruby gems are only libraries. If you want yours to also have a program like jeweler or rake or rails that you can call, you have to write the callable program, put it in bin in your gem's layout and specify (in your gemspec) that it should be packaged and installed. See the Gem::Specification reference under files and executable.
  5. Not sure. Consult both jeweler's docs and the docs for RubyGems.
  6. You can give an email address or use a name (a 'handle', like I use Telemachus here), which is all they mean by 'handle'.

For the record, if you are just learning how to write gems, you do not need to upload your first attempts using RubyGems or anything like it. You can simply install the gem on your machine only.

Telemachus