Forum: Ruby Ruby and Debian

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
C1bcb559f87f356698cfad9f6d630235?d=identicon&s=25 Hal Fulton (Guest)
on 2005-12-17 07:53
(Received via mailing list)
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
114a64bf4e0cb600120f348b6447c258?d=identicon&s=25 Jennyw Jennyw (jennyw)
on 2005-12-17 08:34
Hal Fulton wrote:
> 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
7c3a0706ce454a5e7c405a63fdcd2c21?d=identicon&s=25 Jim (Guest)
on 2005-12-17 08:35
(Received via mailing list)
stable:

aptitude install zlib1g-dev

then try to configure and compile ruby again.
6076c22b65b36f5d75c30bdcfb2fda85?d=identicon&s=25 ezmobius mob (Guest)
on 2005-12-17 08:50
(Received via mailing list)
On 12/16/05, Hal Fulton <hal9000@hypermetrics.com> wrote:

> What's the magic to get this going on Debian?
>
>
> Thanks,
> Hal
>
>
>

Hal-

	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.

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

Cheers-

-Ezra
Ce01db9bec66e5796cad9fe202acf8e1?d=identicon&s=25 Chris Martin (Guest)
on 2005-12-17 08:50
(Received via mailing list)
On 12/16/05, Hal Fulton <hal9000@hypermetrics.com> wrote:
>
> 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

--
Chris Martin
Web Developer
Open Source & Web Standards Advocate
http://www.chriscodes.com/
7c3a0706ce454a5e7c405a63fdcd2c21?d=identicon&s=25 Jim (Guest)
on 2005-12-17 20:10
(Received via mailing list)
Now I'm having trouble compliling ruby 1.8.3 on Debian stable with tk
support so I can play rrobots. Anyone help here?
04bd97396a23bebf19887fd041e15123?d=identicon&s=25 Esteban Manchado =?iso-8859-1?Q?Vel=E1zquez?= (Guest)
on 2005-12-17 21:22
(Received via mailing list)
Hi:

On Sat, Dec 17, 2005 at 03:51:29PM +0900, Hal Fulton 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?).

    HTH,
Ff260830c27224f0e15f37362a6256d0?d=identicon&s=25 Paul Duncan (Guest)
on 2005-12-19 22:45
(Received via mailing list)
* jennyw jennyw (jennyw@dangerousideas.com) wrote:
> Hal Fulton wrote:
> > 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.

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.
Ff260830c27224f0e15f37362a6256d0?d=identicon&s=25 Paul Duncan (Guest)
on 2005-12-19 22:48
(Received via mailing list)
* Chris Martin (chriscodes@gmail.com) wrote:
> On 12/16/05, Hal Fulton <hal9000@hypermetrics.com> wrote:
> >
> > 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
Ff260830c27224f0e15f37362a6256d0?d=identicon&s=25 Paul Duncan (Guest)
on 2005-12-19 23:06
(Received via mailing list)
* Hal Fulton (hal9000@hypermetrics.com) 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.
>
> 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:

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

  # install gems from source
  gem_url='http://rubyforge.org/frs/download.php/5207/rubygem...
  wget $gem_url && tar zxf rubygems-0.8.11.tar.gz && \
    cd rubygems-0.8.11 && sudo ruby setup.rb

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 (>= 2.3.5-1), libncurses5 (>= 5.4-5), zlib1g (>=
  1:1.2.1)
93139b2c9893fd7dfafba4090db346c9?d=identicon&s=25 Shot - Piotr Szotkowski (Guest)
on 2005-12-21 12:18
(Received via mailing list)
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
04d072ab8843cfd3d1714faf3a2a0fb2?d=identicon&s=25 mathew (Guest)
on 2005-12-21 23:45
(Received via mailing list)
Hal Fulton 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.

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]
# wget http://rubyforge.org/frs/download.php/5207/rubygem...
# tar -xzf rubygems-0.8.11.tgz
# cd rubygems-0.8.11
# ruby setup.rb
[Stuff scrolls past]
# gem install vim-ruby
[Stuff scrolls past]
Successfully installed vim-ruby-2005.10.07
#

I note also that ruby correctly has zlib as a dependency in Debian
stable. So apt-get install ruby should have installed zlib even if it
was missing.

So I'm guessing your friend's debian box is b0rked in some major way.


mathew
04d072ab8843cfd3d1714faf3a2a0fb2?d=identicon&s=25 mathew (Guest)
on 2005-12-21 23:48
(Received via mailing list)
Chris Martin wrote:
>On 12/16/05, Hal Fulton <hal9000@hypermetrics.com> wrote:
>>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

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


mathew
04d072ab8843cfd3d1714faf3a2a0fb2?d=identicon&s=25 mathew (Guest)
on 2005-12-21 23:51
(Received via mailing list)
Esteban Manchado Velázquez wrote:
>     If he's indeed using stable, you'll have to install a couple of packages
> to have a complete Ruby installation.

Specifically:

ruby
ri1.8
rdoc1.8

The latter two are suggested by APT when you install the first.


mathew
1dfb026cfdfe73c7171c653da29c134d?d=identicon&s=25 Al Gordon (Guest)
on 2005-12-22 23:06
(Received via mailing list)
On 12/21/05, mathew <meta@pobox.com> wrote:
>
> > 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.

Thanks,

--

  -- AL --
D2bc07ef3dd6e18824932ce55b1f5571?d=identicon&s=25 Hans Fugal (Guest)
on 2005-12-23 14:34
(Received via mailing list)
It's called equivs, and I've never used it but I know you can do it.
Try that for a google keyword.
04bd97396a23bebf19887fd041e15123?d=identicon&s=25 Esteban Manchado =?iso-8859-1?Q?Vel=E1zquez?= (Guest)
on 2005-12-23 17:50
(Received via mailing list)
On Fri, Dec 23, 2005 at 10:32:50PM +0900, Hans  Fugal wrote:
> 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
purposes
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,
93139b2c9893fd7dfafba4090db346c9?d=identicon&s=25 Shot - Piotr Szotkowski (Guest)
on 2005-12-23 23:40
(Received via mailing list)
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)
93139b2c9893fd7dfafba4090db346c9?d=identicon&s=25 Shot - Piotr Szotkowski (Guest)
on 2005-12-23 23:46
(Received via mailing list)
Hello.

mathew:

> Esteban Manchado Velázquez wrote:

>> If he's indeed using stable, you'll have to install
>> a couple of packages to have a complete Ruby installation.

> Specifically:

> 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
Bf6862e2a409078e13a3979c00bba1d6?d=identicon&s=25 Gregory Seidman (Guest)
on 2005-12-24 01:19
(Received via mailing list)
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...
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
Fd22ee3cfc7dac283ce8e451af324f7d?d=identicon&s=25 Chad Perrin (Guest)
on 2005-12-24 02:25
(Received via mailing list)
On Sat, Dec 24, 2005 at 07:44:41AM +0900, Shot - Piotr Szotkowski wrote:
> - 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.

--
Chad Perrin [ CCD CopyWrite | http://ccd.apotheon.org ]

unix virus: If you're using a unixlike OS, please forward
this to 20 others and erase your system partition.
C2cd72c24873556e278b44b5b3c7ef33?d=identicon&s=25 angus (Guest)
on 2005-12-24 06:47
(Received via mailing list)
[Chad Perrin <perrin@apotheon.com>, 2005-12-24 02.23 CET]
> > 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.

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.
Fd22ee3cfc7dac283ce8e451af324f7d?d=identicon&s=25 Chad Perrin (Guest)
on 2005-12-24 09:14
(Received via mailing list)
On Sat, Dec 24, 2005 at 02:45:28PM +0900, angus wrote:
> > > Or, better yet, ri and rdoc (dummy packages depending on the latest ri
> 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.

--
Chad Perrin [ CCD CopyWrite | http://ccd.apotheon.org ]

unix virus: If you're using a unixlike OS, please forward
this to 20 others and erase your system partition.
93139b2c9893fd7dfafba4090db346c9?d=identicon&s=25 Shot - Piotr Szotkowski (Guest)
on 2005-12-27 12:04
(Received via mailing list)
Hello.

Chad Perrin:

> On Sat, Dec 24, 2005 at 07:44:41AM +0900, Shot - Piotr Szotkowski wrote:

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

That's why I explicitly mentioned I'm writing about upgrading to the
next stable. I prefer to automagically see there's a new stable Ruby
version and be able to easily choose whether to upgrade (with the
dependencies changed to ruby2.0) or keep the dummy ruby package at
the current version (thus keeping ruby1.8).

Also, in this particular case, the suggestion was already to install the
dummy ruby package; IMHO it only makes sense to do the same for the ri
and rdoc packages (what would be the benefit of upgrading to Ruby 2.0
but keeping the older ri and RDoc?).

Also, Debian releases stable versions fairly rarely, but Ubuntu releases
every six months (and I generally upgrade accordingly); it's really nice
not to have to track such changes in all of the non-default packages,
and use the dummy ones to do the work. :o)

Cheers,
-- Shot
This topic is locked and can not be replied to.