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 developcommand — 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.
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.pyand pip (I haven’t used pip, it seems to have some features of rubygems and Bundler)Bundler’s
Gemfileis similar to pip’s requirement fileBundler will install dependencies in your development directory, and package them for deployment.
Directory layouts tend to look like this:
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: