I don’t wish to open a can of worms here. I’m not even a Debian
user, I’m just trying to help a friend.
Please refrain if you can from digressing into discussions of politics,
licenses, package management, rubygems replacements, or “my distro can
beat up your distro.”
I met with a friend at breakfast this morning. Coffee shop with killer
pastries and wi-fi, ahhhh.
He’s a Debian guy. Our purpose in meeting was to install Ruby and
rubygems
and one other library and then play with it a little. (He doesn’t know
Ruby yet.)
He tried an apt-get before I got there. After fiddling a bit, I
suggested
installing from source – rubygems was complaining about zlib.
We installed from source, got no zlib, thus rubygems crashed. Tried an
apt-get of zlib-ruby, but no joy. Version conflict or something.
Gave up, moved to a different server, did everything the “right” way.
Wasted over an hour. Never got ruby/zlib/rubygems all installed properly
on either box.
Moved to a Red Hat server where it all “just worked.”
Last time I tried this, I discovered that Ruby is split into a whole lot
of packages. I’m sure there’s a really good reason the packagers split
Ruby into so many packages, but I’ve found that installing from source
is quicker and easier if you want everything. Maybe the packages are
useful for people who want a minimal install.
Sorry, I realize this isn’t the most helpful answer.
FWIW I’ve never used libzlib, but have (and do) use ruby on debian.
I usually use debian’s ruby package, and libs such as fcgi/mysql
I haven’t seen a rubygem package for debian since 8.4, which can still
be used if you do the following
gem install rubygems-update
AND
update_rubygems
Although it’s just as easy to install rubygems from source, and lately
I’ve just been doing that.
For Rails, I ALWAYS use rubygems to install it. I’ve never had luck
with the debian packages.
Obviously it’s kind of a try and see type of thing, there really is no
“right way”.
As silly as this sounds, I typically install gems via gem (rubygems)
and anything that starts with lib via apt.
The following commands help alot while searching for ruby packages via
apt, just replace “libruby1.8” with whatever you’re looking for.
apt-cache search libruby1.8 | grep ruby
apt-cache search ruby | grep libruby1.8
apt-cache show libruby1.8
HTH
–
Chris M.
Web D.
Open Source & Web Standards Advocate
After quite a few times experimenting to get a nice setup for ruby
and rails on debian, I wrote a detailed tutorial[1]. The tutorial
covers some stuff you probably don’t need or already have installed
but it does install a fully working ruby and gems plus other goodies
like Imagemagick and Rmagick plus the mysql-ruby bindings. So you can
probably find what you need in it.
On Sat, Dec 17, 2005 at 03:51:29PM +0900, Hal F. wrote:
He’s a Debian guy. Our purpose in meeting was to install Ruby and rubygems
and one other library and then play with it a little. (He doesn’t know
Ruby yet.)
He tried an apt-get before I got there. After fiddling a bit, I suggested
installing from source – rubygems was complaining about zlib.
[…]
Is he using Debian stable? Is it a server? That is supposed to have
been
fixed months ago (in sid and testing).
If he's indeed using stable, you'll have to install a couple of
packages
to have a complete Ruby installation. There was a guide somewhere in the
Rails
Wiki (it doesn’t work for me right now, network problems?).
Last time I tried this, I discovered that Ruby is split into a whole lot
of packages. I’m sure there’s a really good reason the packagers split
Ruby into so many packages, but I’ve found that installing from source
is quicker and easier if you want everything. Maybe the packages are
useful for people who want a minimal install.
They fixed this brain-dead policy recently.
I use Debian for everything personally, but adding “this library is in
the standard library, except in Debian” to my documentation was getting
a bit old.
What’s the magic to get this going on Debian?
[snipped]
The following commands help alot while searching for ruby packages via
apt, just replace “libruby1.8” with whatever you’re looking for.
apt-cache search libruby1.8 | grep ruby
apt-cache search ruby | grep libruby1.8
apt-cache show libruby1.8
save your fingers and keep your hair
alias acs=‘apt-cache search --names-only’
Produces:
pabs@halcyon:~> acs libruby
libruby - Libraries necessary to run Ruby 1.8.x
libruby1.6 - Libraries necessary to run Ruby 1.6.x
libruby1.6-dbg - Debugging libraries for Ruby 1.6.x
libruby1.8 - Libraries necessary to run Ruby 1.8
libruby1.8-dbg - Debugging libraries for Ruby 1.8
libruby1.9 - Libraries necessary to run Ruby 1.9
libruby1.9-dbg - Debugging libraries for Ruby 1.9
He’s a Debian guy. Our purpose in meeting was to install Ruby and rubygems
and one other library and then play with it a little. (He doesn’t know
Ruby yet.)
He tried an apt-get before I got there. After fiddling a bit, I suggested
installing from source – rubygems was complaining about zlib.
We installed from source, got no zlib, thus rubygems crashed. Tried an
apt-get of zlib-ruby, but no joy. Version conflict or something.
If you’re installing from source, you need zlib1g-dev (in Debianese,
“-dev” suffix == header files).
Gave up, moved to a different server, did everything the “right” way.
Wasted over an hour. Never got ruby/zlib/rubygems all installed properly
on either box.
Depending on the version of Debian (I’m using Sid, so the way things are
for me are how they’ll be for you eventually), it should be this
simple:
He’s a Debian guy. Our purpose in meeting was to install Ruby and rubygems
and one other library and then play with it a little. (He doesn’t know
Ruby yet.)
He tried an apt-get before I got there. After fiddling a bit, I suggested
installing from source – rubygems was complaining about zlib.
Probably not such a good idea, because then you lose dependency
handling.
We installed from source, got no zlib, thus rubygems crashed.
Sounds like a bug in Ruby. The ./configure ought to test for the
presence of zlib. I’d report the bug.
Gave up, moved to a different server, did everything the “right” way.
Wasted over an hour. Never got ruby/zlib/rubygems all installed properly
on either box.
Well, I’ve got a vanilla debian-stable server hanging around that I’ve
never done any Ruby work on, so I’ve just tried the obvious ‘right’ way
of doing everything, and it all worked first time:
apt-get install ruby
Reading package lists… Done
Building dependency tree… Done
The following extra packages will be installed:
libruby1.8 ruby1.8
Suggested packages:
ruby1.8-examples rdoc1.8 ri1.8
The following NEW packages will be installed:
libruby1.8 ruby ruby1.8
0 upgraded, 3 newly installed, 0 to remove and 4 not upgraded.
Need to get 1500kB/1519kB of archives.
After unpacking 5837kB of additional disk space will be used.
Do you want to continue [Y/n]? Y
[Stuff scrolls past]
But ruby already lists libruby1.8 as a dependency, so that shouldn’t be
the problem. It should already have been installed when ruby was
installed.
For Rails, I ALWAYS use rubygems to install it. I’ve never had luck
with the debian packages.
Yes, well, let’s not reopen the RubyGems vs APT discussion again…
That’s one area where the Debian folk deserve criticism, but they don’t
seem to have any interest in cooperating to fix the problem.
So yeah, the best thing is to install RubyGems from source and use it
for all Ruby libraries. Or as you say:
As silly as this sounds, I typically install gems via gem (rubygems)
and anything that starts with lib via apt.
What is the purpose of this? Does this keep the rubygems updated
‘the Debian way’, i.e. dpkg knows about any added/removed files?
Although it’s just as easy to install rubygems
from source, and lately I’ve just been doing that.
Right, but if you don’t put it in /opt, you’re polluting the
dpkg’s file hierarchy. You could at least checkinstall -D.
For Rails, I ALWAYS use rubygems to install it.
I’ve never had luck with the debian packages.
Hm, the rails Debian package always worked for me as a charm.
Obviously it’s kind of a try and see type
of thing, there really is no “right way”.
As silly as this sounds, I typically install gems via
gem (rubygems) and anything that starts with lib via apt.
I try to install anything I can via apt, so as to minimise the
filesystem pollution and to have other Debian packages that might
depend on a given thing have it fulfilled without duplications.
I was wondering whether anyone tried checkinstall -D gem install ...
As silly as this sounds, I typically install gems via gem (rubygems)
and anything that starts with lib via apt.
mathew
<URL:http://www.pobox.com/~meta/>
My parents went to the lost kingdom of Hyrule
and all I got was this lousy triforce.
Is there an easy way for Debian users to create .debs for stuff
otherwise installed via gems or with setup.rb? I regularly create
.debs for “./configure; make; make install” by using checkinstall, but
am unaware of the ruby equivalent, if any. I’d heard that it’s out
there, but haven’t seen it in my googling.
Yes, well, let’s not reopen the RubyGems vs APT discussion again…
That’s one area where the Debian folk deserve criticism, but they
don’t seem to have any interest in cooperating to fix the problem.
Don’t you think that following ‘let’s not reopen’ with ‘Debian folk
deserve criticism’ and ‘don’t seem to have any interest in cooperating’
seems a bit contradictory?
Al Gordon:
Is there an easy way for Debian users to create .debs for stuff
otherwise installed via gems or with setup.rb? I regularly create
.debs for “./configure; make; make install” by using checkinstall,
but am unaware of the ruby equivalent, if any.
Don’t checkinstall gem install ...
and checkinstall ruby setup.rb work?
(Not tried these, just wondering.)
Cheers,
– Shot (who believes that Debian folks are right in trying to follow
FHS)
On Sat, Dec 24, 2005 at 07:39:46AM +0900, Shot - Piotr S. wrote:
} Hello.
}
} mathew:
}
} > Yes, well, let’s not reopen the RubyGems vs APT discussion again…
} > That’s one area where the Debian folk deserve criticism, but they
} > don’t seem to have any interest in cooperating to fix the problem.
}
} Don’t you think that following ‘let’s not reopen’ with ‘Debian folk
} deserve criticism’ and ‘don’t seem to have any interest in
cooperating’
} seems a bit contradictory?
}
} Al Gordon:
}
} > Is there an easy way for Debian users to create .debs for stuff
} > otherwise installed via gems or with setup.rb? I regularly create
} > .debs for “./configure; make; make install” by using checkinstall,
} > but am unaware of the ruby equivalent, if any.
}
} Don’t checkinstall gem install ...
} and checkinstall ruby setup.rb work?
}
} (Not tried these, just wondering.)
I haven’t tried either of these, but I’ve been happy with a /usr/local
install of gem on Debian. It took some work to figure out how to get it
to
work right, but I documented it at http://rubyforge.org/tracker/index.php?func=detail&aid=1198&group_id=126&atid=575
so other people can deal with it themselves. To deal with the GEM_HOME
environment variable issue I added the following line to /etc/csh.cshrc:
setenv GEM_HOME “/usr/local/lib/site_ruby/gems”
…and the following line to /etc/profile:
export GEM_HOME=“/usr/local/lib/site_ruby/gems”
I also symlinked /usr/local/lib/site_ruby/gems/bin to /usr/local/bin for
convenience.
While it would be nice if Debian magically played nice with RubyGems,
I’m
more annoyed that it took a moderately complicated workaround to get gem
to
install in /usr/local properly, like any well-behaved piece of OSS
would.
} Cheers,
} – Shot (who believes that Debian folks are right in trying to follow
FHS)
–Greg