ruby1.8-dev should be recommended, not suggested

Bug #244742 reported by Scott Severance
10
Affects Status Importance Assigned to Milestone
libgems-ruby (Debian)
Fix Released
Unknown
libgems-ruby (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Currently, rubygems suggests ruby1.8-dev. However, ruby1.8-dev should be recommended instead--or even a full-blown dependency. If a gem requires it, it will produce unintelligible errors. For example, without ruby1.8-dev, installing the gem ruby-debug produces:

-------------------------
ERROR: Error installing ruby-debug:
 ERROR: Failed to build gem native extension.

/usr/bin/ruby1.8 extconf.rb install ruby-debug
extconf.rb:1:in `require': no such file to load -- mkmf (LoadError)
 from extconf.rb:1
-------------------------

Apparently, mkmf is part of ruby1.8-dev, but how is someone who isn't familiar with building gems to know that?

When someone installs rubygems, it's reasonable to expect to get everything necessary for installing gems--unless rubygems itself takes care of any dependencies. With ruby1.8-dev as a recommended package, aptitude will install it automatically. If it remains suggested, then how many people will realize that it provides essential functionality? How many people regularly check to see which packages are suggested?

Related branches

Revision history for this message
Nathan Handler (nhandler) wrote :

libgems-ruby currently FTBFS on Ubuntu (LP: #246767). You should report this bug on the Debian BTS. That way, when the bug is patched, both Debian and Ubuntu users will be able to benefit from the patch. Otherwise, we will have to wait for LP: #246767 to be fixed before we can patch this bug.

Changed in libgems-ruby:
status: New → Incomplete
Revision history for this message
Scott Severance (scott.severance) wrote :

Turns out this bug is already in Debian as Debian bug 466189. Adding a bugwatch.

Changed in libgems-ruby:
status: New → Unknown
Changed in libgems-ruby:
status: Unknown → New
Revision history for this message
chastell (chastell) wrote :

If the resolution of this bug is that rubygems depends (or recommends) on libruby-dev, it should also depend/recommend build-essentials.

Nathan: I don’t really agree with the ‘you should report this bug on the Debian BTS’ idea. First, I’m an Ubuntu user, I might have no idea whether Debian’s rubygems package depends/recommends libruby-dev. Second, Debian and Ubuntu are tailored for different users, and I’d actually understand a resolution in which rubygems suggests libruby-dev on Debian while recommending it (and build-essentials) in Ubuntu.

Revision history for this message
Bryan McLellan (btm) wrote :

Shot,

Many Ubuntu packages are direct sync's from Debian packages which is considered "upstream" from Ubuntu. While we could fork the packaging and add our own changes, that adds considerable work to each new release of the package. Changes and improvements should go as far upstream as possible/applicable to avoid the high cost of maintenance. You can usually tell which packages are maintained locally because they will have a version like 'foo-1.0.0-1ubuntu1'. I don't see a wiki entry about this, but see this [1] IRC session for more information.

This can also be a slippery slope. Many gems require additional development packages to be installed because they compile extensions [2] rather than only installing ruby libraries. However I agree that ruby1.8-dev is reasonable. Since gems is currently synced from debian, and being a complex package that we should all work on together, we should defer the resolution of this ticket to the upstream debian bug.

[1] https://wiki.ubuntu.com/MeetingLogs/devweek0901/Package
[2] http://blog.loftninjas.org/2008/09/25/installing-the-oniguruma-gem-on-debianubuntu/

Changed in libgems-ruby:
status: Incomplete → Confirmed
Revision history for this message
chastell (chastell) wrote :

I wholeheartedly agree that diverging from Debian packages is a bad thing, and got bitten by it way too many times when backporting packages (and having to choose between an older Ubuntu version, a newer Debian version and forward-porting the Ubuntu-specific changes to the newer Debian source).

I agree with the Onigurama example you linked; depending on everything needed to build all possible gems would be silly – but, as you yourself agree, ruby-dev is both needed for quite a lot of gems and the mkmf error is really cryptic.

I don’t think diverging from Debian for just this one change would make sense, but libgems-ruby is already Ubuntu-versioned, and IMHO this particular change is quite trivial, both to introduce and to maintain. Being a Ruby developer I use hand-compiled Ruby versions anyway (also for the unfortunate decision of compiling Ruby with --enable-pthread on Debian/Ubuntu), but I can foresee this being a problem for the regular RubyGems user.

I agree with defering the resolution of this issue until debbugs #466189 is resolved (although it’s been silent for the past nine months). Thanks a lot for your interest in this issue!

Revision history for this message
Bryan McLellan (btm) wrote :

We're going to try to get back into sync with debian [1] after some diversions [2][3]. Rubygems is a complex package with a number of interesting problems that really deserves us all working together on.

[1] https://bugs.launchpad.net/ubuntu/+source/libgems-ruby/+bug/302990
[2] https://bugs.launchpad.net/ubuntu/+source/libgems-ruby/+bug/145267
[3] https://bugs.launchpad.net/ubuntu/+source/libgems-ruby/+bug/262063

Revision history for this message
Wesley Schwengle (wesleys) wrote :

I want to second the idea of -dev package as a dependency for libgems (or gems) package. I needed to install a gem and I got errors, which started with mkmf.

Revision history for this message
Bryan McLellan (btm) wrote : Re: [Bug 244742] Re: ruby1.8-dev should be recommended, not suggested

On Tue, Aug 25, 2009 at 2:12 PM, Wesley<email address hidden> wrote:
> I want to second the idea of -dev package as a dependency for libgems
> (or gems) package. I needed to install a gem and I got errors, which
> started with mkmf.

Not all gems require a development environment to install, so I
disagree with any development packages being a dependency. That some
gems require a development environment to install is, in my opinion, a
flaw with the gem model. Those gems that are ultimately necessary
should be natively packaged.

The argument over if ruby1.8-dev should be 'suggests' or 'recommends'
is still open upstream.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libgems-ruby - 1.3.7-3

---------------
libgems-ruby (1.3.7-3) unstable; urgency=low

  [ Lucas Nussbaum ]
  * Team Upload.
  * Recommend libruby1.8-dev and build-essential instead of suggesting them,
    because we have to answer that FAQ too frequently. LP: #244742

  [ Clint Byrum ]
  * debian/patches/50_add_missing_require_yaml.diff require 'yaml' in
    lib/rubygems/specification.rb (Closes: #597554)
 -- Ubuntu Archive Auto-Sync <email address hidden> Thu, 04 Nov 2010 11:41:54 +0000

Changed in libgems-ruby (Ubuntu):
status: Confirmed → Fix Released
Changed in libgems-ruby (Debian):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.