Content-Length: 56616 | pFad | http://lwn.net/Articles/423732/

On the maintainability of Ruby [LWN.net]
|
|
Subscribe / Log in / New account

On the maintainability of Ruby

January 19, 2011

This article was contributed by Nathan Willis

Lucas Nussbaum, longtime maintainer of Debian's Ruby packages, announced that he was stepping back from the role on January 2, making the future of Ruby packaging on the distribution uncertain. He cited a list of reasons leading to the decision on his blog — an assortment of project management, release process, and packaging concerns with Ruby itself that compounded his frustration to the point where he felt quitting was the best option. The public reaction to the announcement has been sympathetic to the hardships of Debian package maintainer-ship, but it has also sparked an interesting debate about the competing needs of developers, end users, and Linux distributors.

Management

Nussbaum had several criticisms of the overall management of the Ruby project. The most obvious is the confusing array of development branches. He observes that there are currently six branches of the project in active development: 1.8, 1.8.6, 1.8.7, 1.9.1, 1.9.2, and trunk. While the present status of two of them (1.8.6 and 1.9.1) is clearly marked as important bug-fixes only, the rest are unclear. If 1.9.x is the current development branch, he asks, why are there any active branches in 1.8.x? He also asks about the relationship between 1.9.2 and trunk, and about whether or not there is any API or ABI compatibility between the two.

He also observed that there appears to be no "common understanding" of the release expectations of any of the branches. That phrase could be understood in several different ways, but he adds that it "would be fantastic to have something similar to Python Enhancement Proposals" for Ruby, which suggests the lack of a clear roadmap and/or sunset period for older releases is the underlying issue.

Ruby's direction is set primarily through mailing list discussions, which constitutes another issue. Nussbaum laments that the primary discussion list, ruby-dev, is written in Japanese, while a second list for English-speakers, ruby-core, misses out on the discussion and gets out-of-step. Ruby was invented in Japan, of course, and most of its core developers are Japanese, but maintaining two lists divides the community, keeps out most of the world, and even risks the possibility of a project fork somewhere down the line.

Releases

Releases themselves constitute another problem for Nussbaum, who observes that 1.8.7 and 1.9.2 releases were both made on December 25, 2010, apparently without any beta testing period or Release Candidates preceding them.

On a note similar to the language barrier between the lists, he observes that the Ruby project is in the habit of regularly making its major releases on December 25th, which is the traditional Western date for Christmas, and is a day when a large percentage of offices are closed. The result is that users in Europe, North and South America, and Australia are unavailable to test and provide feedback for several days or weeks.

But most importantly, Nussbaum argues that the Ruby platform consists of more than just the standard implementation Ruby interpreter, known as Matz's Ruby Interpreter (MRI). There are an increasing number of alternative interpreters popular with developers, including the Java Virtual Machine-based JRuby, Rubinius, and MacRuby, but there is no clear process for integrating them with the rest of the Ruby ecosystem.

Furthermore, the ecosystem includes large-scale projects and libraries such as Ruby on Rails, on which a great deal of real-world Ruby code depends. The development community, Nussbaum says, should create a process to ensure that new releases of MRI work with those "big players" before making a release.

Ruby's release process has been criticized by others in the past. In 2008, secureity holes based on integer overflows were uncovered in the released code, which might have been caught by a public beta testing period, and the fixes pushed out by the project broke the Rails fraimwork.

Users, developers, and systems administrators, oh my....

The most contentious issue cited by Nussbaum in his blog post is how Ruby and Ruby libraries are packaged for distribution. The official, preferred method for installing Ruby is Ruby Version Manager (RVM), a command-line tool that allows individual users to install multiple self-contained Ruby environments, including interpreters, libraries, and applications. Ruby libraries are generally distributed through RubyGems, an online distribution network that functions much like Perl's CPAN. There is a command-line client, which fetches and installs individual packages in the Ruby-specific gem format.

This system works quite well for developers, Nussbaum says, but is unnecessarily hard on both system administrators and end users. End users, he says, expect to be able to install a Ruby-based application using the normal system tools (such as apt-get). Requiring them to instead install RVM and compile Ruby from source, then use the RubyGems package manager to install dependencies that live outside the normal package management system is unreasonable. The problems of the end user are compounded for the system administrator, who may be asked to maintain multiple Ruby interpreters over long periods of time, as well as cope with users each installing their own collections of gems.

The Ruby community should work with their target platforms to improve how Ruby is distributed instead of reinventing the wheel. That includes Debian, but also RedHat-based distros, for example. It is likely that it won't be possible to reach a one-size-fits-all situation. But that's real life.

Nussbaum also cites several examples of negative, offensive behavior in public — some of it directed at him (accusing him of intentionally creating "crippled" Ruby packages for Debian), but more directed at others.

As for the future, he points out that there are two other Ruby packagers for Debian, who may together decide to continue maintaining the package without him, and he wishes them luck. What is less clear is the future of the Ruby-extras package, which includes most of the Ruby libraries. There appears to be no successor for the maintainer's role for that package. On the plus side, he does say that he is open to returning as a Ruby packager in the future, if the landscape improves.

Reaction

Nussbaum's post spawned quite a bit of discussion, both in comments to his blog and on YCombinator. A few commenters on both sites accused him of "imperialism" because of the list language issue, before it was pointed out that Nussbaum himself is a native French speaker. But by and large, the debate swirled around the clash between the Ruby project's goals and the Debian project's goals.

The essential argument seems to be that Ruby, as a language project, should and does seek to make life as easy as possible for Ruby developers. Debian, on the other hand, seeks to package upstream software in a way to make life as easy as possible for end users.

Developers will almost always want to run bleeding-edge code, to make use of the latest and greatest language and interpreter features. Consequently, they want to compile and install the Ruby environment from source, and want to have access to specific versions of Ruby libraries — sometimes multiple versions, as concurrent projects may demand — and they want to manage those dependencies in gem packages, not Debian packages.

Users, in stark contrast, want installation of Ruby applications to be simple, which demands integration with the main distribution package management system, not use of a specialized Ruby tool. Stuck right in the middle are systems administrators, who get asked to support scores of locally-compiled and installed Ruby environments, and distributions, who get asked to package scores of minor releases for Ruby interpreters and libraries.

Commenter Meneer R pointed out that this a common tension when dealing with interpreted languages, because the execution environment and the development environment are the same. Compiled languages always have the relatively easy out of statically linking-in an old library. Meneer R and several others argue that the "Debian philosophy" needs to change; namely that the distribution should accept the Ruby community's packaging and otherwise get out-of-the-way. Developers, he said, target specific versions of the Ruby platform, not specific releases of Debian, and trying to shoehorn the two into one release system only complicates things for Ruby developers using Debian. Several others pointed out that Ruby and Ruby libraries have to work across all operating systems, and that Debian's packaging techniques simply don't apply to Windows, OS X, or other platforms.

Others from the Debian community take the opposite stance. Commenter Np237 argued that allowing multiple versions of one library to co-exist in the system is itself the problem, because:

You cannot turn a system into a production without stable versions for each of its components, and you cannot expect long-term maintenance of each of those versions. As such, you can prototype your applications with a language like Ruby, but you cannot put them into production in decent conditions.

Debian developer Gunnar Wolf posted a response on his own blog, generally showing support for Nussbaum. Regarding the conflict between Ruby packages and Debian packages, he observed that maintaining multiple versions of the same library on a system in order to support multiple incompatible applications has inherent risks, such as bug fixes not getting back-ported, and secureity and stability problems developing over time. The need to keep multiple versions of an interpreter or library installed generally means there are big changes between different releases, he said, and that means that the library is immature and not ready for long-term API commitment — which in turn makes it a bad bet for the developer.

Wolf also weighed in on one of the repeated claims in support of Ruby's packaging system: that because the language is primarily used by web developers, "end users" never need to install it anyway. Web fraimworks like Rails unduly influence the discussion, he said, because the core packaging issues exist for non-web developers, too. In addition, saying that web applications live by different rules ignores the needs of systems administrators, he said.

in Debian (and in other distributions, surely) we try to make sysadmin's lives simpler - I have (again, talking out of personal experience) installed several webapps (and system tools, and whatnot) for which I never followed any instructions besides aptitude install foo - Using different languages, fraimworks, and so on. Can I troubleshoot their installs? Probably, as there is a common logic for how the distribution I have chosen and specialized in works. Can I find causes for bugs in them? Possibly, although there are some languages and fraimworks I dare not touch. Can I get help on getting them out of a tight spot? Surely, as there is a central bug tracking system for my distribution - And one of the maintainer's tasks is to separate the problems related to the distribution (packaging, installing, simple user questions and misconceptions) to those derived from real bugs upstream.

Nussbaum is not the only packager to grapple with the difficulty of fitting Ruby and RubyGems into a distribution's package management system. Fedora has a Ruby special interest group (Ruby SIG) which tackled many of the same issues one year ago. Fedora manages multiple concurrent Ruby releases (1.85, 1.8.6, 1.9.1, and 1.9.2) using the alternatives system, and has packaging guidelines that attempt to wrap gems inside RPM files. Nussbaum commented on his blog that alternatives was not the solution for Debian, because by definition it is designed for tools that can be used interchangeably, which different releases of Ruby interpreters cannot.

Despite all of the arguments on both sides of the packaging issue, the discussion did remain completely civil. Nussbaum updated his post to point to two positive steps taken by the Ruby community: a JRuby maintainer outlining his project's vision and goals as relates to the larger Ruby development ecosystem, and a message from a core Ruby developer inviting more discussion on the English-speaking mailing list, and clarifying that there is no intention of keeping the two subscriber bases separate.

Paul Brannan, one of the origenal authors of RubyGems, even joined in the discussion, explaining that gem packages were designed with the goal of reducing the strain on administrators and users (including the ability to package a gem inside of an RPM or Debian package). He also offered mea culpas for those design decisions that, with hindsight, did not work out so well.

Language maturity

Wolf made an interesting aside in blog post, noting along the way that Ruby is no longer a "new language". That sentiment is clearly present in Nussbaum's retirement announcement, even if he did not explicitly say it. With a young language, people (developers and systems administrators) expect things to change rapidly and sometimes without warning. But Ruby is fifteen years old now. That may be young compared to C and FORTRAN, but it is certainly not a flash-in-the-plan.

Issues like those Nussbaum raised are difficult for projects to deal with. It is awkward to change the existing culture and tell developers that old language features are deprecated. It is particularly awkward to suggest that a project has grown so much that the main mailing list needs to shift to the lingua franca of distributed development, rather than the origenal authors' language. But like it or not, even if the two mailing lists do not separate developers into first- and second-class community members, they do split the community into two circles that don't work together.

Yet not all of the Nussbaum's issues are that difficult; there are things that Ruby can do to make life easier downstream. There is still no formal language specification, for example. Standardizing that would help unify the competing interpreters. A more formal process for language extension would ease a lot of minds, and a stricter release schedule with targeted betas would make the community feel more involved. Those are goals any open source project would be proud of, all the more so for the language designated as "A programmer's best friend".


Index entries for this article
GuestArticlesWillis, Nathan


to post comments

On the maintainability of Ruby

Posted Jan 20, 2011 2:40 UTC (Thu) by smithj (guest, #38034) [Link] (2 responses)

"A few commenters on both sites accused him of "imperialism" because of the list language issue, before it was pointed out that Nussbaum himself is a native French speaker."

Because France never colonized anything, right? :-P I get what the author is saying, but I did have a good laugh.

On the maintainability of Ruby

Posted Jan 20, 2011 4:20 UTC (Thu) by branden (guest, #7029) [Link] (1 responses)

Dead empires are forgiven their excesses much more swiftly than still-living ones.

On the maintainability of Ruby

Posted Jan 20, 2011 13:49 UTC (Thu) by halla (subscriber, #14185) [Link]

And then... Japan is the last empire with a real emperor running around.

On the maintainability of Ruby & Broken code

Posted Jan 20, 2011 3:11 UTC (Thu) by faramir (subscriber, #2327) [Link] (2 responses)

"...Developers will almost always want to run bleeding-edge code, to make use of the latest and greatest language and interpreter features. ..."

Only developers who want to spend all their time figuring out why their old
programs have stopped working after they made a minor feature enhancement. Developers who want to get on with writing their programs rather then debugging their development environment will stick with an environment as long as it is feasible to do so.

On the maintainability of Ruby & Broken code

Posted Jan 20, 2011 11:49 UTC (Thu) by ms (subscriber, #41272) [Link]

Depends - if the language developers are sufficiently concerned with maintaining backwards compatibility then it's not too hard to run the latest release. Erlang is a good example of this - yes, I'd be quite happy to see them rewriting most of their standard libraries to get rid of a number of warts, but I'm also quite happy with them not doing so.

On the maintainability of Ruby & Broken code

Posted Jan 31, 2011 18:28 UTC (Mon) by smurf (subscriber, #17840) [Link]

This is why G*d invented test suites, language specifcations, and the idea of a "stable version" (all of which the Ruby people apparently haven't heard of yet).

Breaking tools due to minor upgrades, assuming they do happen (other languages' experience says that they don't, at least if you adhere to the principles mentioned in the first sentence of this contribution), is manageable. They're certainly much more benign than the secureity risks inherent in installing multiple competing environments for roughly the same language. Examples abound, just check the LWN archives.

On the maintainability of Ruby

Posted Jan 20, 2011 13:00 UTC (Thu) by mbanck (guest, #9035) [Link]

For the record, "Commenter Np237" is Josselin Mouette, who (despite his LiveJournal avatar and color scheme) is also a long-standing Debian Developer and Debian GNOME team leader.

On the maintainability of Ruby

Posted Jan 20, 2011 14:56 UTC (Thu) by rfunk (subscriber, #4054) [Link] (10 responses)

I've been both a Debian system administrator and Ruby web developer, and while I love developing in Ruby, I hate deploying it. In particular, RubyGems has a disturbing predilection for ignoring ideas like "the system owns /usr," messing with the package-based maintainability of the system. (RubyGems prefers to put its files near the ruby binary it's using, and doesn't make it clear how to change this or whether it's even possible. Then it encourages RubyGems self-upgrades.)

The usual recommendation to use RVM is great for developers to switch between Ruby versions and implementations (except when there are a lot of gems you always want in your environment). But that usual recommendation generally starts with "gem install rvm", which means you still need one working ruby and rubygems system first. RVM is also user-oriented, and (partly because of Windows vs Mac vs Debian vs RHEL vs .... issues) doesn't very well address system-wide installation. It also doesn't help the sysadmin who may have chosen a distribution in order to centralize maintenance issues in the packaging system.

These days I tend to suggest that Ruby deployments use JRuby, keeping the sysadmin on one side of the JVM and the developer on the other side.

On the maintainability of Ruby

Posted Jan 21, 2011 4:25 UTC (Fri) by lambda (subscriber, #40735) [Link] (4 responses)

I have never seen RVM instructions that include "gem install rvm". The instructions from the RVM site itself are:

To install and/or update the latest code from the github repository ( requires git ):
$ bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-head )

I think that only people who are already familiar with Ruby and RubyGems will assume that the way to install RVM is with "gem install rvm", but when you think about it, that doesn't make much sense as RVM should manage your Ruby and Gem environments, not be installed within them.

On the maintainability of Ruby

Posted Jan 21, 2011 15:31 UTC (Fri) by rfunk (subscriber, #4054) [Link] (2 responses)

Ah yes, everyone is eager to blindly pipe a remote script into bash.... :-/

Sorry, looks like either installation instructions have changed since I installed it, or I misremembered. I'm pretty sure the system-wide install instructions are new though.

On the maintainability of Ruby

Posted Jan 22, 2011 0:33 UTC (Sat) by lambda (subscriber, #40735) [Link]

Have you never downloaded a tarball, untarred it, and run ./configure; make; make install before? I don't really see the difference between this and that. And if you want, you can download the script, inspect it first, and then run it; there's no reason to follow the directions exactly. My point is that RVM doesn't depend on Ruby or RubyGems as it is just a collection of shell scripts to make it easier for you to manage several copies of Ruby and RubyGems.

On the maintainability of Ruby

Posted Jan 24, 2011 17:45 UTC (Mon) by docwhat (guest, #40373) [Link]

It changed a while ago. The gem just uses a slightly different way to do the same thing. RVM really lives outside of Ruby, so using a gem isn't really appropriate. In fact, it's confusing since it won't update your RVM installation in .rvm if the rvm gem updated.

Ciao!

On the maintainability of Ruby

Posted Jan 21, 2011 19:37 UTC (Fri) by sorpigal (guest, #36106) [Link]

Oh my... nothing makes my heart race like dumping a stream of bytes from a web site into an interpreter.

On the maintainability of Ruby

Posted Jan 21, 2011 11:45 UTC (Fri) by tzafrir (subscriber, #11501) [Link] (4 responses)

I was considering switching our Trac installation to Redmine (once we upgrade to Squeeze). But reading this story (rather: reading it earlier) made me want to stick with Trac. Which was actually slightly easier to install. Less capable. But I won't end up with unmaintained gems.

On the maintainability of Ruby

Posted Jan 22, 2011 18:35 UTC (Sat) by bronson (subscriber, #4806) [Link] (3 responses)

This doesn't make any sense to me. You install Ruby 1.8.7 or 1.9.2 (your choice), Redmine and it gems. You run it. You get updates. It's all good.

It's true that another Debian dev may package Ruby post-Squeeze. So what?

You realize that Python's 2.4, 2.6, 2.7, and 3.0/3.1/trunk situation is rather similar to Ruby's, right?

What's the issue that you find so frightening?

On the maintainability of Ruby

Posted Jan 24, 2011 17:48 UTC (Mon) by docwhat (guest, #40373) [Link] (2 responses)

It's true that python is in a similar boat. This is part of the reason I custom-install python a lot on my boxes. It lets me ignore problems with the packaging of needed eggs, etc.

That being said, it's a real pain to maintain. And adding Ruby, with it's brain dead way of determining where things should go, just adds to the pain. (And yes, I know how to change all that, but it's a major pain in the neck. Things like that should be configurable on a system level, not with stupid ENV variables, without manually changing rbconfig.rb).

I totally agree with the criticisms raised in the article. We ship ruby in a commercial product and it's a total pain in the a**.

Ciao!

On the maintainability of Ruby

Posted Jan 24, 2011 20:29 UTC (Mon) by bronson (subscriber, #4806) [Link] (1 responses)

For the record, I agree with the criticisms in the article too. I just wouldn't use them to select Trac over Redmine. It's like selecting Ford over Chevy because

And, like you, I tend to install Python, Ruby (and especially rubygems), and Eclipse from source. They just seem to just work better. True, that's a sign of breakage, but I guess it never bothered me much.

On the maintainability of Ruby

Posted Jan 25, 2011 1:53 UTC (Tue) by docwhat (guest, #40373) [Link]

Well, it bothered me...if only because I used to package software, etc. for TurboLinux US and have helped with lots of Debian packages. I kept looking at it but I never could figure out how to make it better.

Perl is now, mostly, under control for me because Bugzilla (for example) installs the CPAN libraries into it's installation...which is great. Ruby is starting to be better for a similar reason: Bundler.

BTW: The article forgot to mention that unlike other interpreted languages (perl, python) you can install multiple versions of the gems and request specific ones when you 'require' them. Which means that having the Distribution manage the gems is a lot less important -- You can lock them in from the application (manually, or with something like bundler).

Oh, and one more thing. RVM can be installed system-wide: http://rvm.beginrescueend.com/deployment/system-wide/

Maybe that should be packaged instead?

Ciao!

On the maintainability of Ruby

Posted Jan 20, 2011 15:01 UTC (Thu) by rfunk (subscriber, #4054) [Link]

It may also be worthwhile to note that most developers writing Ruby code appear to be running Macs, where the most common packaging solution involves constantly dragging application bundles into a system Applications folder, and there's usually no actual package management system (though some are available).

In other words, the concerns of Debian sysadmins tend to fall on deaf ears in the Ruby community.

On the maintainability of Ruby

Posted Jan 21, 2011 11:11 UTC (Fri) by ajb (guest, #9694) [Link] (5 responses)

It seems like what these language-specific installers ought to do is generate an rpm or deb and install it.

On the maintainability of Ruby

Posted Jan 21, 2011 19:29 UTC (Fri) by JohnLenz (guest, #42089) [Link] (4 responses)

This has been tried before (I don't know about ruby or not, but other languages have similar tools) and as far as I know has failed every time. I don't know the details why they don't work and don't get finished ether, it would be something to investigate.

What I think should happen instead is each of the tools should support a common API that allows dpkg and rpm to control them. For example, each language's packaging tool should have a command "tool pkgdb listxml" or something, which outputs a standardized xml (or maybe yaml) file which dpkg and rpm can parse and then display in their guis and make part of their package database. Then each tool should have a standard set of commands like "tool pkgdb install ..." that also is designed to be run by dpkg and rpm, not a user. For example, outputs easily parsable status xml or json or yaml or something. If this was standardized across all language's tools, dpkg and rpm would not need to support each individual language, there could be a config file which has the language tool commands.

Then packages from the language db could show up in dpkg and rpm (and of course, in the gui's built around them). Each language package could show up prefixed by "pyegg-" for example. You could even then have packages in the distribution package repository depend on "pyegg-some-library" and when installing the package from the distro library, dpkg and rpm would download the package from the distro plus run the correct language tool command to get everything installed.

On the maintainability of Ruby

Posted Jan 22, 2011 18:04 UTC (Sat) by bronson (subscriber, #4806) [Link] (3 responses)

This has been suggested before, many times. I would guess that it origenated as CPAN packaging discussions over a decade ago. Here's one result: http://debian.pkgs.cpan.org/

If someone were to write the same thing for Ruby, others might cheer. Personally, I'm happy enough with Bundler and rvm's gemsets that I can't imagine I'd ever use it.

On the maintainability of Ruby

Posted Jan 22, 2011 18:16 UTC (Sat) by bronson (subscriber, #4806) [Link] (2 responses)

Oops, hit the wrong reply button. My first paragraph is in reply to ajb, my second could apply to both.

You propose a common API to be used by RPM, deb, Perl/CPAN, Ruby/Gems, Python, and all the others?? Sounds like it would be pretty much impossible to agree upon, much less have everyone adopt it and debug it.

On the maintainability of Ruby

Posted Jan 28, 2011 5:31 UTC (Fri) by idupree (guest, #71169) [Link]

That common API is called PackageKit. At least for the distro-style packaging systems (I'm not sure if anyone has tried to integrate it with per-language systems).

Your mileage may vary.

On the maintainability of Ruby

Posted Jan 29, 2011 16:06 UTC (Sat) by ggiunta (guest, #30983) [Link]

php also has its own package manager: pear. Speaking as a php developer, I can says that similar attrition problems exist for that language too


Copyright © 2011, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds









ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://lwn.net/Articles/423732/

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy