# Making 1.8.4 default

**URL:** <https://www.ruby-forum.com/t/making-1-8-4-default/95279>\
**Category:** Ruby\
**Created:** [May 26, 2006, 9:08am UTC](https://www.ruby-forum.com/t/making-1-8-4-default/95279 "2006-05-26T09:08:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bob\_Brander](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/c0e974/32.png) [@Bob\_Brander](https://www.ruby-forum.com/u/Bob_Brander)\
**Post date:** [May 26, 2006, 9:08am UTC](https://www.ruby-forum.com/t/making-1-8-4-default/95279/1 "2006-05-26T09:08:54Z")

</div>

I’ve tried installing ruby 1.8.4 on my Mac OS X, but ruby 1.8.2 remains  
my default. How do I make 1.8.4 my default?

---

<div class="post-metadata">

**Author:** ![Bob\_Brander](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/c0e974/32.png) [@Bob\_Brander](https://www.ruby-forum.com/u/Bob_Brander)\
**Post date:** [May 26, 2006, 2:03pm UTC](https://www.ruby-forum.com/t/making-1-8-4-default/95279/2 "2006-05-26T14:03:43Z")

</div>

Bob Brander wrote:

> I’ve tried installing ruby 1.8.4 on my Mac OS X, but ruby 1.8.2 remains  
> my default. How do I make 1.8.4 my default?

Ruby 1.8.2 is installed in /usr/bin. Probably (if you took the defaults)  
you installed Ruby 1.8.4 in /usr/local/bin. OS X uses the $PATH  
environment variable to establish a list of directories to search for  
commands. It searches the list in order. It will use the first ruby  
executable that it finds in that list. So, you need to change your $PATH  
to put /usr/local/bin (or whatever directory you installed Ruby 1.8.4  
in) in front of /usr/bin. To see what your current $PATH is, open a  
terminal window and type

echo $PATH

To put /usr/local/bin in front of /usr/bin, type

export PATH=/usr/local/bin:$PATH

Now type “ruby -v” to make sure that you get 1.8.4.

To make the change permanent you’ll have to add the “export” command  
above to a startup file like .bashrc. You can read about .bashrc by  
reading the bash man page.
