For example, you can setup your own local gem server. You can load it with only the gems you want to install on your fleet of machines and use 'gem install --source your-local-server fastthread', for example. You might even get around your "pick the right gem" problem by installing only the fastthread gem you need on your local server.
But, I think the real problem you have with rubygems is that you don't want to learn another package management system. I really don't think the rubygems devs can do anything to remedy that problem.
I'll certainly admit that I don't know the gems packaging system as well as I know dpkg and aptitude, but I think that that criticism misses the larger issue.
You're certainly right that the gems system could be made to do everything that the Debian/Ubuntu system does, particularly if given time to mature. But as I pointed out in my post, this wouldn't fix the problem.
Apache, for example, has hundreds of modules, each of which have complex dependencies.. They're released on their own schedule, and they're released across lots of platforms. Firefox has it's own set of extensions, and updates- You see the same thing with CPAN, and Python modules.
But the more disparate systems you add, the more sets of configurations you need, the more repositories you need, and the more ways to update everything you need.
So for our servers, I could set up a Gems repo, an Apache repo, a System Software Repo, a Cpan repo. I could have separate upgrade commands for every software package that comes along.
But the complexity is increased with each addition to this system-
* If I want to get a list of everything that's installed under this system, I need to run X commands.
* During installations, I can't chain everything together, I need to run X set of separate installations.
* I need to review X different release chains, to see if there are packages I need to test before deploying to multiple machine
* And yes, I need to learn X different systems for installing software, rather than one system for installing system wide.
There are a lot of good reasons to have the gems system, and I think it's a great tool for individual systems, but for anything that's going farm-wide, It's substantially easier to have everything go through one tool.
Debian, Gentoo, Redhat, FreeBSD, etc all depend on heavily on volunteers to create the packages, manage dependencies, issue security announcements, feed bug reports and patches upstream to developers, etc. I've used Gentoo for a long time and I've watched it struggle in recent years as it loses volunteers. New releases take longer to reach portage, some software never finds its way to portage at all, and I find more and more broken packages. The only Ruby package I install from portage is Ruby itself.
The thing is, every Ruby developer uses RubyGems. There are no volunteers because the developers themselves create the packages for each release. I think this is more sustainable, even if I don't think RubyGems is as good as the packaging tools used by the major distributions.
Of course, in a fantasy ideal world, the way things would work is that the Ruby developers would create their own repository for .debs..
This would mean that if I want the latest and greatest files, I can add their repository to my existing package system, and everything integrates.
When I did an "apt-get upgrade" it would check the Ruby repository, and upgrade all my ruby packages, too..
Then, when a package had proven itself to be stable enough, it could be copied back into the standard Ubuntu/Debian repositories, so that everyone could have it, even if they didn't add the repositories.
Of course, in the real world, that would be far to much work for the Ruby developers, and would require that they customize for one specific OS.. But a man can dream, can't he? ;)
You don't think the RubyGems devs can use the normal packaging system, and hence get rid of these odd requirements? Why not?
Unless and until Debian supports the concept of multiple version side-by-side installations which is IMO mandatory, I don't see this particular problem being resolved.
I'm also unsure why wanting an app to install its files to the same standard directories that other apps do, and not require separate updating tools, constitutes bigotry. Can you explain?
2. Even if what RubyGems does is supported by dpkg et al., this does nothing to help the language or programs written in the language support this without resorting to ugly, stupid, and nonsensical platform-specific hacks. We've already seen people on Ruby doing a few silly things (e.g., RUBY_PLATFORM =~ /win/ matches darwin, cygwin, and win32, but doesn't match mingw -- which is a closer match for win32 than darwin or cygwin ;). Doing "gem 'foo', '=2.1'" allows me to use a specific version (equivalent of -lfoo2 in linking in C++), but if I don't care, I can just require 'foo'. (The "require 'foo'" bit is required in any case; "gem 'foo', '=2.1'" doesn't require anything, but sets the load paths.)
3. The bigotry is in assuming that dpkg or RPM are appropriate for everyone. I would rather have a Ruby-centric system for Ruby rather than two dozen platform-specific systems that I have to know and support. Yes, I'm bigoted toward Ruby and don't care what platform I run Ruby on. I don't want to have to deal with the operating system's package management (or lack thereof, as is the case on systems with wider adoption than Linux).
RubyGems isn't perfect or a be-all, end-all packaging system. It doesn't try to be. What it does, however, it does very well and it does right.
Like every Linux distro shipped GCC296 and GCC29x for years?
It seems the Ruby community (and the Python community to a lesser extent) have a Not Invented Here syndrome.
2. Even if what RubyGems does is supported by dpkg et al., this does nothing to help the language or programs written in the language support this
Yes it does. Dpkg and RPM provide a standard mechanism to query if software is installed (foo), including optionally what verion is installed (foo >= 2.1).
3. I think the greater bigotry exists in assuming that Ruby is somehow special, and deserves to write unsigned binaries all over systems although all other software does not. Python, Java, and other languages all make the effort to integrate into their environments rather than forcing a whole new mechanism of querying, fetching, downloading, verifying, and signature checking upon users.
Rails 2x and Merb 1.x with their support of Gem dependencies are a lot easier to manage now than they were in the past.
It would be relatively easy nowadays to manage one server with lots of different applications with different Rails and Gem dependencies purely using gems now. You would not be able to do this if Rails was installed via aptget unless a special require_aptget library was written.
RubyGem is improving a lot with every release. Poolparty and other similar tools for remote management look like they would be able to deal with many of these kinds of issues in the future.
I believe EngineYard maintain their own local gem server for speeding this up.
I think that's exactly the problem, though.. Yes, I'm 100% that all of these problems can, and probably will, be fixed.
But even once they are, there will be two methods for doing everything, and that makes things more complex than they need to be.
It's one of the disadvantages of such a relatively unpredictable environment- Every tool has has to be able to work across a variety of platforms, which means that every tool has to assume the worst case. ;(
The Ruby devs can't assume packages are sane everywhere- Redhat packages, for instance, have been a world of hurt for years.. OS X and Windows don't even HAVE native packaging systems.
I entirely understand why it is the way that it is.. But I look forward to it getting better.
As another poster pointed out, in newer releases of Ubuntu, they DO package up the gems as individual .deb packages.
Essentially, the Ubuntu devs bypassed the gem manager, just as the gem manager itself bypassed Ubuntu.
A lot of your criticisms have already been addressed in the latest RubyGems version.
(I could have sworn there was something like that.) Though, most of your complaints are very vaild. Also add on that ruby gems LOOOVES to eat all the memory on your machine if at all possible...
My frustration comes mainly in that Ubuntu makes nice, easy systems to keep everything consistent; Ruby gems make an end-run around these systems. No matter WHAT it might do on it's own, it bypasses the rules that the rest of the system lives by.
(And as for the Ubuntu thing. I keep around the tarball with the ruby gem source, and have a script that scps, untars, and runs the install script. I have to type in the root password, but thats about it. Its definitely not ideal, but there are worse things ;))
As a systems administrator, I'm absolutely not a fan of Ruby gems for exactly the reason the article mentions-
They're designed to be convenient for the developer, but they make an end-run around all of the methods that we admins set up to make things easy to deploy, and safe to update.
For instance- At Darkenedsky, we have a fleet of Ubuntu 6.06 webservers that are configured to run Apache, Postgresql, etc.
One of our coders has recently made a change which means that I need to push a library out to all 50+ machines..
Normally, this is a pretty trivial affair.
Unfortunately, this particularly library is a Ruby gem, so things aren't nearly as simple ;(The first step is that I need to ssh into each machine, and manually install Rubygems. Rubygems aren't packaged for Ubuntu 6.06, so I need to do a source install and configure.
Once it's installed, I need to update gems to have the most recent package definitions, and then I can start to install the package I actually want.
So far, it's annoying in that there are several extra steps, but they're scriptable, so it's liveable.
Unfortunately, installing the packages isn't very scriptable at all. When I install, I'm presented with a menu-
If this were a non-gems library, and/or packaged as a normal Ubuntu release, I wouldn't need to manually choose one of these. I could set my choice in debconf (write it to a file), and then push it out everywhere.If we're dealing with only one machine, like most developers do, this isn't a big deal. It downloads and installs the gem, and you're good to go. But when you're dealing with a fleet of machines, anything that requires manual interaction is a sin against man and god.
Debconf allows me to choose whatever level of interaction I want-
Why should I need to choose between 1.01 and 1.0 after I start the install?On Ubuntu, if the packages were really so important that both needed to be available, I could choose to install something between
or Again, we're down to one command. Nice and simple, no interaction needed.Further compounding the pain is that this isn't a choice I should even have to make- Why would I want the win32 version of a library on by Linux box?
If I'm installing a packaged version, It's already been tested in this configuration, and it's designed to work with everything else on the system.
Too many servers give me an error on install-
While that's certainly fixable, it means that I need to babysit the install far more than I do for something that's properly packaged.After I choose what I want, I get to wait while the package downloads across the public internet.
When dealing with Ubuntu, all our servers are pointed at an in-house repository for packages- We keep a copy of everything we need on-site, and I can update it with one command.
This means that when installing software, it only has to travel to the server a few racks over, not out the internet at large. With gems, this system is broken- Each one reaches out to the public internet.
Not only is this is much slower, but I can't trust that a package is 100% identical.
Having one machine be different, even by a point release, can be a guge problem in trying to debug intermittent errors.
Finally, upgrading the packages are far more difficult that they have to be.
If a bug is discovered in a library, such as the zlib bug that came out a few years ago, I can update it trivially and easily across all the machines.
Ubuntu has built-in commands for updating security bugs, and it separates that from updating features.. That way, I don't need to move to the next version of a package, possibly breaking the code, to resolve a security bug.
Now, that's not to say that issues with Ruby gems couldn't be fixed.. I'm sure that one by one, they could be addressed- Scripting support could be beefed up, local repositories could be added. Upgrading could be improved, and configuration could be rewritten..
But even if they were to fix EVERYTHING on the list, it would still be layering one packaging system atop another, which means that we need to have two ways to do everything.
Two sets of config files. Two repositories of packages. Two places for bugs.
As the author suggests, the problem comes in that OS packages and Ruby gems are are focused on different audiences-
Developers love ruby gems because for the one machine they use to write the code, it's easy, fast, and convenient.
Admins hate gems because when you're trying to deal with a fleet of machines, it's none of the above.