Anyone running v1.9.2 with Ubuntu 10.04?

S

Sam Weber

I had LoadError problems when my box was running Ruby v1.8.? and v1.9.2.
Since I didn't get an answer to a recent post about the issue, I decided
to uninstall both versions and attempt to get on v1.9.2. But there's no
v1.9.2 package available yet for Ubuntu 10.04. So should I attempt to
build from source? I saw some posts about using RVM but the last thing
I want is another package managing layer.
 
L

Luis Lavena

I had LoadError problems when my box was running Ruby v1.8.? and v1.9.2.
Since I didn't get an answer to a recent post about the issue, I decided
to uninstall both versions and attempt to get on v1.9.2.  But there's no
v1.9.2 package available yet for Ubuntu 10.04.  So should I attempt to
build from source?  I saw some posts about using RVM but the last thing
I want is another package managing layer.

Wonder how you installed 1.9.2 and then uninstalled it when there is
no package manager for it on Ubuntu.

Remember that 1.9.2 removes the "." directory form the $LOAD_PATH,
meaning a.rb and b.rb in the same directory, require 'b' inside a.rb
will fail to find it.

As for RVM, if you still want to use 1.9.2 and still keep your mental
sanity, should give it a shot, is just a manager for ruby and
RubyGems, not a full package manager.
 
M

Mike Owens

[Note: parts of this message were removed to make it a legal post.]

I hacked together a 1.9.2 deb source package based on the 1.9.1. As root,
you can build binary packages from a clean chroot as follows:

bash $ /usr/lib/pbuilder/pbuilder-createbuildenv
bash $ cd /var/tmp && mkdir chroot
bash $ tar -C /var/tmp/chroot -xzvf /var/cache/pbuilder/base.tgz
bash $ mount -t mount devpts /dev/pts
bash $ mount proc -t proc chroot/proc
bash $ chroot /var/data/tmp/bin/bash
bash $ . /etc/lsb-release
bash $ locale-gen en_US.UTF-8
bash $ apt-get --allow-unauthenticated update
bash $ apt-get --allow-unauthenticated -q -y install debhelper
devscripts fakeroot \
ruby curl fakeroot pbuilder git-core ssh wget
bash $ cd /var/tmp
bash $ git clone git://github.com/linterra/ruby1.9.2.git
bash $ cd rsp && /usr/lib/pbuilder/pbuilder-satisfydepends
bash $ fakeroot debian/rules clean
bash $ dpkg-build -b
bash $ exit
bash $ umount chroot/dev/pts
bash $ umount chroot/proc
bash $ cd chroot/var/tmp/
bash $ dpkg -i libruby1.9.2_1.9.2.0-1_i386.deb ruby1.9.2_1.9.2.0-1_i386.deb \
libreadline-ruby1.9.2_1.9.2.0-1_i386.deb
irb1.9.2_1.9.2.0-1_all.deb ... etc.

You need to have pbuilder already installed on your system.
 
M

Mike Owens

[Note: parts of this message were removed to make it a legal post.]

sorry, step 13 should be cd ruby1.9.2:

12. bash $ git clone git://github.com/linterra/ruby1.9.2.git
13. bash $ cd ruby1.9.2 && /usr/lib/pbuilder/pbuilder-satisfydepends



I hacked together a 1.9.2 deb source package based on the 1.9.1. As root,
you can build binary packages from a clean chroot as follows:

bash $ /usr/lib/pbuilder/pbuilder-createbuildenv
bash $ cd /var/tmp && mkdir chroot
bash $ tar -C /var/tmp/chroot -xzvf /var/cache/pbuilder/base.tgz
bash $ mount -t mount devpts /dev/pts
bash $ mount proc -t proc chroot/proc
bash $ chroot /var/data/tmp/bin/bash
bash $ . /etc/lsb-release
bash $ locale-gen en_US.UTF-8
bash $ apt-get --allow-unauthenticated update
bash $ apt-get --allow-unauthenticated -q -y install debhelper devscripts fakeroot \

ruby curl fakeroot pbuilder git-core ssh wget
bash $ cd /var/tmp
bash $ git clone git://github.com/linterra/ruby1.9.2.git
bash $ cd rsp && /usr/lib/pbuilder/pbuilder-satisfydepends
bash $ fakeroot debian/rules clean
bash $ dpkg-build -b
bash $ exit
bash $ umount chroot/dev/pts
bash $ umount chroot/proc
bash $ cd chroot/var/tmp/
bash $ dpkg -i libruby1.9.2_1.9.2.0-1_i386.deb ruby1.9.2_1.9.2.0-1_i386.deb \

libreadline-ruby1.9.2_1.9.2.0-1_i386.deb irb1.9.2_1.9.2.0-1_all.deb ... etc.

You need to have pbuilder already installed on your system.
 
J

Joel VanderWerf

I hacked together a 1.9.2 deb source package based on the 1.9.1. As root,
you can build binary packages from a clean chroot as follows:

bash $ /usr/lib/pbuilder/pbuilder-createbuildenv
bash $ cd /var/tmp&& mkdir chroot
bash $ tar -C /var/tmp/chroot -xzvf /var/cache/pbuilder/base.tgz
bash $ mount -t mount devpts /dev/pts
bash $ mount proc -t proc chroot/proc
bash $ chroot /var/data/tmp/bin/bash
bash $ . /etc/lsb-release
bash $ locale-gen en_US.UTF-8
bash $ apt-get --allow-unauthenticated update
bash $ apt-get --allow-unauthenticated -q -y install debhelper
devscripts fakeroot \
ruby curl fakeroot pbuilder git-core ssh wget
bash $ cd /var/tmp
bash $ git clone git://github.com/linterra/ruby1.9.2.git
bash $ cd rsp&& /usr/lib/pbuilder/pbuilder-satisfydepends
bash $ fakeroot debian/rules clean
bash $ dpkg-build -b
bash $ exit
bash $ umount chroot/dev/pts
bash $ umount chroot/proc
bash $ cd chroot/var/tmp/
bash $ dpkg -i libruby1.9.2_1.9.2.0-1_i386.deb ruby1.9.2_1.9.2.0-1_i386.deb \
libreadline-ruby1.9.2_1.9.2.0-1_i386.deb
irb1.9.2_1.9.2.0-1_all.deb ... etc.

You need to have pbuilder already installed on your system.

I had LoadError problems when my box was running Ruby v1.8.? and v1.9.2.
Since I didn't get an answer to a recent post about the issue, I decided
to uninstall both versions and attempt to get on v1.9.2. But there's no
v1.9.2 package available yet for Ubuntu 10.04. So should I attempt to
build from source? I saw some posts about using RVM but the last thing
I want is another package managing layer.

If you just want to get a recent ruby running on one ubuntu host, the
easiest thing is to build from source. Of course, that doesn't give you
debs you can copy to other hosts (thanks, Mike, for writing that up).
I've had no major issues with building ruby on various ubuntu hosts,
except a gcc version problem (does not affect the gcc on 10.04) and some
issues with tk and ruby 1.8 (does not affect 1.9.

If you want ruby 1.8.7 to work with the ubuntu-packaged Tk, make sure
you configure ruby with:

./configure --enable-pthread

Then do "make" as usual.

Then, before the 'make install' step, go into ext/tk and do

CONFIGURE_ARGS='--with-tcl-include=/usr/include/tcl8.5
--with-tcllib=tcl8.5 --with-tklib=tk8.5' ruby extconf.rb && make

Then go into the tkutil subdir and build it the same way (not sure the
args are needed here, but it seems ok).

Finally, you can make install.

But I guess you don't need any of this for 1.9.2... just do a generic build.
 
S

Sam Weber

RVM turns out to be a very good answer to the question of how to get to
Ruby v1.9.2 on Ubuntu 10.04. I had some trouble on my desktop machine
(separate post) but the instructions on www.christopherirish.com (see
link below) work flawlessly on my laptop. Thanks very much to Joseph
Savard for the incredibly helpful links below.
 

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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top