Ruby and Debian

H

Hal Fulton

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."

What's the magic to get this going on Debian?


Thanks,
Hal
 
J

jennyw jennyw

Hal said:
What's the magic to get this going on Debian?

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.

Jen
 
E

ezmobius mob

What's the magic to get this going on Debian?


Thanks,
Hal

Hal-

=09After 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.

[1] http://brainspl.at/rails_stack.html

Cheers-

-Ezra
 
C

Chris Martin

What's the magic to get this going on Debian?


Assuming you're using Ruby 1.8 you need to

apt-get install libruby1.8

it replaces libzlib-ruby1.8

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
 
J

Jim

Now I'm having trouble compliling ruby 1.8.3 on Debian stable with tk
support so I can play rrobots. Anyone help here?
 
E

Esteban Manchado Velázquez

--G4iJoqBmSsgzjUCe
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hi:

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.
=20
Please refrain if you can from digressing into discussions of politics,
licenses, package management, rubygems replacements, or "my distro can
beat up your distro."
=20
I met with a friend at breakfast this morning. Coffee shop with killer
pastries and wi-fi, ahhhh.
=20
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.)
=20
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 Ra=
ils
Wiki (it doesn't work for me right now, network problems?).

HTH,

--=20
Esteban Manchado Vel=E1zquez <[email protected]> - http://www.foton.es
EuropeSwPatentFree - http://EuropeSwPatentFree.hispalinux.es

--G4iJoqBmSsgzjUCe
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)

iD8DBQFDpHLZhYgK5b1UDsERAgD3AJwJjcX8VA0GIEhSkdh+ofDsFoJj7ACeNN7U
FwpFDYyRd45S5hIG/X5JyXA=
=EgP7
-----END PGP SIGNATURE-----

--G4iJoqBmSsgzjUCe--
 
P

Paul Duncan

--8sQsHfNlXZNubEnG
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

* jennyw jennyw ([email protected]) said:
=20
Last time I tried this, I discovered that Ruby is split into a whole lot= =20
of packages. I'm sure there's a really good reason the packagers split=20
Ruby into so many packages, but I've found that installing from source=20
is quicker and easier if you want everything. Maybe the packages are=20
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.
Sorry, I realize this isn't the most helpful answer.
=20
Jen
=20
--=20
Posted via http://www.ruby-forum.com/.

--=20
Paul Duncan <[email protected]> pabs in #ruby-lang (OPN IRC)
http://www.pablotron.org/ OpenPGP Key ID: 0x82C29562

--8sQsHfNlXZNubEnG
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFDpymAzdlT34LClWIRAnheAJ99OKf9QXODL7Et9P+lvZklr82ONgCeIRkg
FMIT8HsnTpe2N4UQR277YEQ=
=WdB3
-----END PGP SIGNATURE-----

--8sQsHfNlXZNubEnG--
 
P

Paul Duncan

--jFijuCULRDbBA23d
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

* Chris Martin ([email protected]) said:
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=3D'apt-cache search --names-only'

Produces:

pabs@halcyon:~> acs libruby =20
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

--=20
Paul Duncan <[email protected]> pabs in #ruby-lang (OPN IRC)
http://www.pablotron.org/ OpenPGP Key ID: 0x82C29562

--jFijuCULRDbBA23d
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFDpypezdlT34LClWIRAkcgAJ9POrxVFU2oVKZfckJGJeT0XJ6rmQCgnFWq
b01Z7YK/qOnW1sAiUTIsjQc=
=26S3
-----END PGP SIGNATURE-----

--jFijuCULRDbBA23d--
 
P

Paul Duncan

--8MD1ZCO3r6aZNHwn
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

* Hal Fulton ([email protected]) said:
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.
=20
Please refrain if you can from digressing into discussions of politics,
licenses, package management, rubygems replacements, or "my distro can
beat up your distro."
=20
I met with a friend at breakfast this morning. Coffee shop with killer
pastries and wi-fi, ahhhh.
=20
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.)
=20
He tried an apt-get before I got there. After fiddling a bit, I suggested
installing from source -- rubygems was complaining about zlib.
=20
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,=20
"-dev" suffix =3D=3D 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:

# install ruby and ruby development packages
sudo apt-get install ruby1.8{,-dev} libruby1.8

# install gems from source
gem_url=3D'http://rubyforge.org/frs/download.php/5207/rubygems-0.8.11.tgz'
wget $gem_url && tar zxf rubygems-0.8.11.tar.gz && \
cd rubygems-0.8.11 && sudo ruby setup.rb
=20
If zlib wasn't listed as a dependency for libruby1.8 on the system in
question, it is now (in the more recent versions):

pabs@halcyon:~> ach libruby1.8 | grep Dep.*zlib
Depends: libc6 (>=3D 2.3.5-1), libncurses5 (>=3D 5.4-5), zlib1g (>=3D
1:1.2.1)
Moved to a Red Hat server where it all "just worked."
=20
What's the magic to get this going on Debian?

--=20
Paul Duncan <[email protected]> pabs in #ruby-lang (OPN IRC)
http://www.pablotron.org/ OpenPGP Key ID: 0x82C29562

--8MD1ZCO3r6aZNHwn
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFDpy46zdlT34LClWIRApZIAKDJz7wApdOhWwcydXn2wtwFB5WdgwCcCMrB
yJpligwwjNhUUxisNUrCIuk=
=pp/f
-----END PGP SIGNATURE-----

--8MD1ZCO3r6aZNHwn--
 
S

Shot - Piotr Szotkowski

Hello.

Chris Martin:
I haven't seen a rubygem package for debian since 8.4,

Hyspro seems to have 0.8.11 - see the end of
http://pkg-ruby-extras.alioth.debian.org/rubygems.html
which can still be used if you do the following
# gem install rubygems-update
AND
# update_rubygems

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 ...`
- does this work/makes sense?

Cheers,
-- Shot
 
A

Al Gordon

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 installe= d.

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:



mathew


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.

Thanks,
 
H

Hans Fugal

It's called equivs, and I've never used it but I know you can do it.
Try that for a google keyword.
 
E

Esteban Manchado Velázquez

--YH9Qf6Fh2G5kB/85
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

It's called equivs, and I've never used it but I know you can do it.
Try that for a google keyword.

equivs is for creating (mostly) empty .deb packages, for testing purpos=
es
or to work-around dependency problems.

There isn't (yet) a way to create a .deb package from a Ruby Gem or a
setup.rb-ridden Ruby tarball, but we're working on it (specially the second=
).

Regards,

--=20
Esteban Manchado Vel=E1zquez <[email protected]> - http://www.foton.es
EuropeSwPatentFree - http://EuropeSwPatentFree.hispalinux.es

--YH9Qf6Fh2G5kB/85
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)

iD8DBQFDrCpghYgK5b1UDsERAtYCAJ4x2lkmW96eBK/TfkjquVStTvWTOQCfVszz
YSY+fzplfn2UCEQxpvZSAbA=
=VqxF
-----END PGP SIGNATURE-----

--YH9Qf6Fh2G5kB/85--
 
S

Shot - Piotr Szotkowski

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.)

Cheers,
-- Shot (who believes that Debian folks are right in trying to follow FHS)
 
S

Shot - Piotr Szotkowski

Hello.

mathew:
Esteban Manchado Vel=E1zquez wrote:

ruby
ri1.8
rdoc1.8

Or, better yet, ri and rdoc (dummy packages depending on the latest ri
and RDoc versions, just like the ruby one depends on the latest Ruby)
- this way you'll get automagically upgraded to 2.0 if/when the next
Debian stable ships it.

Cheers,
-- Shot
--=20
Life is like sendmail: you're not sure you know how to handle
it, but you know it'll end in tears. -- Malcolm Ray, asr
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D http:/=
/shot.pl/hovercraft/ =3D=3D=3D http://shot.pl/1/125/ =3D=3D=3D
 
G

Gregory Seidman

On Sat, Dec 24, 2005 at 07:39:46AM +0900, Shot - Piotr Szotkowski 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
 
C

Chad Perrin

Hello.

mathew:


Or, better yet, ri and rdoc (dummy packages depending on the latest ri
and RDoc versions, just like the ruby one depends on the latest Ruby)
- this way you'll get automagically upgraded to 2.0 if/when the next
Debian stable ships it.

The point of Stable is that it doesn't change, so that you'll never have
to worry about something that works suddenly breaking when you're doing
security updates or adding software. Thus, one tends to not see new
packages appear in Stable unless absolutely necessary for security
reasons.
 
A

angus

The point of Stable is that it doesn't change, so that you'll never have
to worry about something that works suddenly breaking when you're doing
security updates or adding software. Thus, one tends to not see new
packages appear in Stable unless absolutely necessary for security
reasons.

Anyway, whether you don't want to upgrade to the next stable release when it
appears, or whether you do want to, selecting the dummy, generic-named
packages is better.

Cheers.
 
C

Chad Perrin

Anyway, whether you don't want to upgrade to the next stable release when it
appears, or whether you do want to, selecting the dummy, generic-named
packages is better.

Sorry, didn't mean to get pedantic. Yes, you're right.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top