Rails needs gems

Bug #34840 reported by Akkana Peck on 2006-03-14
22
Affects Status Importance Assigned to Milestone
rails (Ubuntu)
Medium
Unassigned

Bug Description

Although there's a rails package in ubuntu, I've never been able to use it (even on Dapper) because it doesn't include gems or some of the important gem packages (such as initializer or even active_record) that most rails apps seem to need.

See http://fo64.com/articles/2005/10/20/rails-on-breezy for an elaborate workaround someone found, which includes installing the rails package (and a bunch of other packages), then building gems from source, then using the source-built gems to install a whole new version of rails (ending up with two separate rails installations on the same machine).

Lucas Nussbaum (lucas) wrote :

Rubygems has many issues which were raised on ruby mailing lists but never addressed by the rubygems developers. It's therefore not possible to have rubygems-based packages in Debian or Ubuntu.

For more details, refer to :
http://pkg-ruby-extras.alioth.debian.org/rubygems.html

Changed in rails:
status: Unconfirmed → Rejected
Akkana Peck (akkzilla) wrote :

That page explains why gems isn't included, and I have to agree that I prefer Debian's packaging to using yet another one. But the page doesn't explain why Ubuntu has a rails package that doesn't include active_record or initializer. Are there many people who use rails without active_record? Most of the rails docs I've seen start with it.

Would it be possible for the rails package to include these packages, so it would work for a typical rails project? Then some people might not even need gems

Rick DeNatale (rick-denatale) wrote :

I've been using rails on breezy for some days now using the packaged rails and ruby. I'm building a membership database front-end for our local linux users group using rails.

I'm working through the Agile Web Development book and everything seems to work....

...except, I just looked into using the SaltedHash login generator, and discovered the lack of support for gems. Drat!

Lucas says that "Rubygems has many issues which were raised on ruby mailing lists but never addressed by the rubygems developers", I'm not sure which mailing lists he's talking about, but I'd love to see those issues. What I did find was a lot of debian (and by inheritance) ubuntu bashing because from the perspective of the ruby users, the debian packagers have given up on warping the gem file structure into the debian file structure. The ruby users seem to think that gems "just works" and that this is all debian's fault.

I'm not sure who is right and who is wrong here, or probably more realistically to what extent each side is wrong, but I'd really like to get rails working WITH gems on Ubuntu. It's looking like I'm going to have to install rubygems from source (or perhaps from the unofficial debian package referenced in the debian-extras manifesto http://pkg-ruby-extras.alioth.debian.org/rubygems.html

I'm not sure whether or not this will work with the packaged installations of rails and/or ruby or whether I need to uninstall either or both and reinstall from source/gem.

I wish I didn't have to though.

It sounds like philosophical issues. In which case we either need:
  - ubuntu packages for alle the different rails & ruby add-ons, without gems
  - onofficial packages for gems (perhaps in universe, for all I care)

Although, since it isn't a liscense issue, I do feel debian/ubuntu shouldn't push their architecture that much. Freedom as in free beer, freedom as in free free speech, FREEDOM AS IN CHOICE.

Its their choice not to _support_ it. But can/should they really _ban_ it? Single it out and say 'you can't come to our party' Can't we just put it in universe? Or do they have to 'like' all the software there as well? Should it even be about this? I'm confused.

On 8/21/06, Ralf Nieuwenhuijsen <email address hidden> wrote:
> It sounds like philosophical issues. In which case we either need:
> - ubuntu packages for alle the different rails & ruby add-ons, without gems
> - onofficial packages for gems (perhaps in universe, for all I care)
>
> Although, since it isn't a liscense issue, I do feel debian/ubuntu
> shouldn't push their architecture that much. Freedom as in free beer,
> freedom as in free free speech, FREEDOM AS IN CHOICE.
>
> Its their choice not to _support_ it. But can/should they really _ban_
> it? Single it out and say 'you can't come to our party' Can't we just
> put it in universe? Or do they have to 'like' all the software there as
> well? Should it even be about this? I'm confused.

Yes, it's all about choice, yours, mine, and theirs.

As I understand it, the gem architecture just doesn't fit the debian
'contract' which requires among other things adherence to debian's
standard for file system layout. It's insistence on the debian
standard for debian packages which is the key behind debian's
reputation for seamless package maintainance and system upgrades.

There are quite a few debian packages whose upstream code is modified
by the debian maintainer to place things in the right places. Often
this is just a matter of configuring the build. I haven't looked into
the matter in detail, but I think that those who make decisions about
packaging ruby for debian are of the opinion that reconfiguring gems
this way is either impossible or just too hard.

Now, for our freedom. Just because software isn't packaged for
debian, doesn't mean that it can't be installed on a debian system
like Ubuntu. I've installed both Ruby and rubygems from source on my
Ubuntu machines, and although I didn't attempt to put the artifacts
where they would be for a debian package, I did configure them to go
into places which would be safe from being clobbered by maintainence
of the packaged software on the machine. Places like /usr/local are
save havens.

And there's sometimes a benefit to doing installs outside of packages.
 Sometimes although debian package upgrades don't clobber the file
system, they do mess you up when the package maintainer doesn't
understand upstream upgrade requirements well enough. I've got a
plone site on one of my machines, which died when I upgraded from
Ubuntu Breezy to Dapper a few weeks ago, which upgraded zope and
plone, and I'm still trying to figure out how to get it back.

Once I recover it, I'm looking to replace zope/plone with a rails-based CMS.

--
Rick DeNatale

My blog on Ruby
http://talklikeaduck.denhaven2.com/

Colin Watson (cjwatson) wrote :

Lucas, is there any reason why we can't just sync the rubygems package from Debian experimental? What state is it in?

"Rubygems has many issues which were raised on ruby mailing lists but never addressed by the rubygems developers. It's therefore not possible to have rubygems-based packages in Debian or Ubuntu.

For more details, refer to :
http://pkg-ruby-extras.alioth.debian.org/rubygems.html
"

I'm not sure what you mean Lucas. That page specifically states that Debian will have a rubygems package with which you can install gems:

"For Ruby developers requiring bleeding edge library versions or libraries that haven’t been packaged (yet), a rubygems package will be made available. This package provides the gem command to be able to install/remove gems at the developer’s own discretion and risk. The gems will be installed using the normal gem installation procedure, in usr/lib/ruby/gems."

This sounds just like what we need. I don't understand why Ubuntu can't use the same mechanism or package as Debian.

Not having access to gems basically makes it very cumbersome to develop web apps using rails.

Don't get me wrong, I'm all for repackaging gems into Ubuntu packages. But it's not going to be feasible to keep up with the gems available or repackage all of them.

To take a real example, I can't find any Ubuntu package that provides an authentication system for rails, even though there are many gems available for that: http://wiki.rubyonrails.org/rails/pages/Authentication

I suppose for the time being an intermediate solution is to use the rubygems package in Debian:

deb http://www.sgtpepper.net/hyspro/deb unstable/
deb-src http://www.sgtpepper.net/hyspro/deb unstable/

Cheers,

Daniel

Rocco Stanzione (trappist) wrote :

The problem isn't specific to rails. I do a lot of development that requires Ruby libraries not available from the repos, and some of those in turn depend on rubygems. It's analogous to cpan for Perl (which is packaged) and pretty much ubiquitous among Ruby developers. I've installed rubygems on every Ubuntu machine I've ever used, without taking any of the precautions others have taken, and I've never had a problem. I know there are potential problems, but Ruby developers ought to be free to take that risk.

PS. Other than this, I take great pains to to restrict myself to the package management system, which is only plausible because the vast majority of what I need is available that way.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers