8

I have some experience with Ruby, but it’s less than my Python experience. I've packaged and published several Python packages, but there’s only one Ruby package I've published. I want to learn rapidly about Ruby packaging ecosystem by comparing to Python.

  • I believe that there’s the tool equivalent to virtualenv in Ruby, but I don’t know what is that yet. What are the roles of RVM and Bundler?
  • When I write a Python package, I usually use setup.py develop command — it resolves the dependencies but is not installed to site-packages. What is the equivalent thing in Ruby?
  • What is the preferred way to make a directory layout structure of Ruby packages?
  • Gem package naming rule. Is Gem name case sensitive? Should it be the same as the contained Ruby module's name?
  • Any other points I missed.
minhee
  • 5,688
  • 5
  • 43
  • 81

1 Answers1

11

RVM is similar to virtualenv also checkout rbenv (perhaps more like virtualenv)

Bundler is for packaging dependencies for development and deployment, it works like setup.py and pip (I haven't used pip, it seems to have some features of rubygems and Bundler)

Bundler's Gemfile is similar to pip's requirement file

Bundler will install dependencies in your development directory, and package them for deployment.

Directory layouts tend to look like this:

/ -
  lib - classes / modules etc.
  bin - executables things you want on $PATH
  test - unit tests

Jeweler is a good tool for setting up, maintaining and releasing gems.

EDIT:

Here are some other resources:

Some links on Ruby layout:

Some for Python:

Here's one making a comparison of tools:

Community
  • 1
  • 1
  • So where does rubygems come into play? Does it download code from a package repository and unpack it much like pip and easy_install are used for? – Dan Oct 31 '12 at 20:13
  • 1
    yes, rubygems provides the `gem` command for installing and managing ruby "gems" or packages. –  Nov 02 '12 at 20:20