# Install ruby 1.9-p243 from source in /usr/bin, ubuntu 9.04

**URL:** <https://www.ruby-forum.com/t/install-ruby-1-9-p243-from-source-in-usr-bin-ubuntu-9-04/174682>\
**Category:** Ruby\
**Created:** [August 31, 2009, 12:36pm UTC](https://www.ruby-forum.com/t/install-ruby-1-9-p243-from-source-in-usr-bin-ubuntu-9-04/174682 "2009-08-31T12:36:01Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![tick](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/47e85d/32.png) [@tick](https://www.ruby-forum.com/u/tick)\
**Post date:** [August 31, 2009, 12:36pm UTC](https://www.ruby-forum.com/t/install-ruby-1-9-p243-from-source-in-usr-bin-ubuntu-9-04/174682/1 "2009-08-31T12:36:01Z")

</div>

What I expected: Ruby should install in /usr/bin and /usr/lib where the  
previous ruby installation already is.

What happened: Ruby installed in /usr/local

What I did:  
download ruby1.9-p243  
unpack  
./configure  
make  
sudo make install

Can someone help me to get this installed over the current ruby1.9-p129  
installation which alread is at /usr/bin so I can keep all my already  
installed gems.

Ray

Ubuntu 9.04

---

<div class="post-metadata">

**Author:** ![tick](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/47e85d/32.png) [@tick](https://www.ruby-forum.com/u/tick)\
**Post date:** [August 31, 2009, 1:35pm UTC](https://www.ruby-forum.com/t/install-ruby-1-9-p243-from-source-in-usr-bin-ubuntu-9-04/174682/2 "2009-08-31T13:35:56Z")

</div>

On Monday 31 August 2009, Rainer Kuhn wrote:

> |sudo make install  
> |  
> |  
> |Can someone help me to get this installed over the current ruby1.9-p129  
> |installation which alread is at /usr/bin so I can keep all my already  
> |installed gems.  
> |  
> |Ray  
> |  
> |Ubuntu 9.04  
> |

I guess you should use

./configure --prefix=/usr

instead of simply

./configure

I hope this helps

Stefano

---

<div class="post-metadata">

**Author:** ![tick](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/47e85d/32.png) [@tick](https://www.ruby-forum.com/u/tick)\
**Post date:** [August 31, 2009, 1:57pm UTC](https://www.ruby-forum.com/t/install-ruby-1-9-p243-from-source-in-usr-bin-ubuntu-9-04/174682/3 "2009-08-31T13:57:17Z")

</div>

Thx, I knew I forgot something simple.

Ray

---

<div class="post-metadata">

**Author:** ![tick](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/47e85d/32.png) [@tick](https://www.ruby-forum.com/u/tick)\
**Post date:** [March 10, 2010, 5:57pm UTC](https://www.ruby-forum.com/t/install-ruby-1-9-p243-from-source-in-usr-bin-ubuntu-9-04/174682/4 "2010-03-10T17:57:29Z")

</div>

2010/3/10 G Brandon H. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> The reason why built-from-source ruby lives in /usr/local is because  
> Ubuntu ‘owns’ the files in /usr/bin and /usr/lib. When Ubuntu updates  
> packages, these packages change. You ‘own’ the files in /usr/local/\*,  
> so you are responsible for making sure they stay up to date, Ubuntu does  
> not change them. The downside is that if you are building ruby from  
> source, you can’t use the packages for ruby in Ubuntu. That’s ok, most  
> of what you need comes automatically when you build the code from source.

I couldn’t agree more! It is a very bad idea to try to install over  
those versions provided by the package manager. This is definitively  
calling for trouble. It’s easier to stick with the installation in  
/usr/local and adjust either shebang in scripts or create a few  
symlinks in /usr - although I would be cautious with that already.

Alternative: get a package from another source, e.g. 1.9.1.378-1:  
[http://packages.debian.org/squeeze/ruby1.9.1](http://packages.debian.org/squeeze/ruby1.9.1)  
[http://packages.debian.org/sid/ruby1.9.1](http://packages.debian.org/sid/ruby1.9.1)

or live with a tad older version 1.9.1.243-2:  
[http://packages.ubuntu.com/de/karmic/ruby1.9.1-full](http://packages.ubuntu.com/de/karmic/ruby1.9.1-full)

Kind regards

robert

---

<div class="post-metadata">

**Author:** ![tick](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/47e85d/32.png) [@tick](https://www.ruby-forum.com/u/tick)\
**Post date:** [March 10, 2010, 8:23am UTC](https://www.ruby-forum.com/t/install-ruby-1-9-p243-from-source-in-usr-bin-ubuntu-9-04/174682/5 "2010-03-10T08:23:53Z")

</div>

-----BEGIN PGP SIGNED MESSAGE-----  
Hash: SHA1

Rainer Kuhn wrote:

> sudo make install
> 
> Can someone help me to get this installed over the current ruby1.9-p129  
> installation which alread is at /usr/bin so I can keep all my already  
> installed gems.
> 
> Ray
> 
> Ubuntu 9.04

Hi, I know this is an old thread, but being as how I have been using  
source ruby for over two years now on Ubuntu, I will give a little  
perspective, hopefully help someone out. Plus I just read the message.

I take it you installed ruby from the Ubuntu repository. That is fine,  
but if you are going to switch to the source of ruby, you have to  
uninstall the packages, and all that that implies for your gems, I would  
suggest saving a list of the gems you have in a text file (gemlist.txt)  
in the example) and running something like $ruby -e  
‘File.open(“./gemlist.txt”, “r”).each {|g| `sudo gem install #{g}`}’  
from the command line after you install new ruby from source.

Also, when you build ruby from source you need to "./configure

- –enable-shared" in Ubuntu to get it to play nice with some things.  
Also, this automagically installs a new gem command, irb command, and  
rdoc(as of ruby 1.9).

The reason why built-from-source ruby lives in /usr/local is because  
Ubuntu ‘owns’ the files in /usr/bin and /usr/lib. When Ubuntu updates  
packages, these packages change. You ‘own’ the files in /usr/local/\*,  
so you are responsible for making sure they stay up to date, Ubuntu does  
not change them. The downside is that if you are building ruby from  
source, you can’t use the packages for ruby in Ubuntu. That’s ok, most  
of what you need comes automatically when you build the code from  
source.

hope this helped, a year too late perhaps!  
G Brandon H.  
-----BEGIN PGP SIGNATURE-----  
Version: GnuPG v1.4.9 (GNU/Linux)  
Comment: Using GnuPG with Mozilla - [http://enigmail.mozdev.org](http://enigmail.mozdev.org)

iEYEARECAAYFAkuXRvwACgkQf3s7GyRXBzQh6ACffJNPOX2c/pza9V5aofzZWJ5e  
EJsAn1TlLaV9xmbSb56pmOXJFoEUNoI1  
=TeMY  
-----END PGP SIGNATURE-----

---

<div class="post-metadata">

**Author:** ![tick](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/47e85d/32.png) [@tick](https://www.ruby-forum.com/u/tick)\
**Post date:** [March 10, 2010, 8:05pm UTC](https://www.ruby-forum.com/t/install-ruby-1-9-p243-from-source-in-usr-bin-ubuntu-9-04/174682/6 "2010-03-10T20:05:39Z")

</div>

On Mar 10, 11:56 am, Robert K. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I couldn’t agree more! It is a very bad idea to try to install over
> 
> robert
> 
> –  
> remember.guy do |as, often| as.you\_can - without endhttp://blog.rubybestpractices.com/

Or just use Ruby Version Manager – RVM

[http://rvm.beginrescueend.com/](http://rvm.beginrescueend.com/)  
[http://rvm.beginrescueend.com/rvm/install/](http://rvm.beginrescueend.com/rvm/install/)
