Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Help! Window user needs help installing ruby 1.9 on mac

Reply
Thread Tools

Help! Window user needs help installing ruby 1.9 on mac

 
 
Zayd Connor
Guest
Posts: n/a
 
      04-04-2009
I just purchased a new macbook pro and would like to install ruby 1.9,
but I'm having trouble installing, can someone please provide the
easiest steps to install ruby 1.9 please?

Thanks
--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
 
 
 
Ben Lovell
Guest
Posts: n/a
 
      04-04-2009
[Note: parts of this message were removed to make it a legal post.]

Install macports. Then:
sudo port install ruby19

Should do it.

Ben

On Sat, Apr 4, 2009 at 6:55 AM, Zayd Connor <(E-Mail Removed)> wrote:

> I just purchased a new macbook pro and would like to install ruby 1.9,
> but I'm having trouble installing, can someone please provide the
> easiest steps to install ruby 1.9 please?
>
> Thanks
> --
> Posted via http://www.ruby-forum.com/.
>
>


 
Reply With Quote
 
 
 
 
Zayd Connor
Guest
Posts: n/a
 
      04-04-2009
Ben Lovell wrote:
> Install macports. Then:
> sudo port install ruby19
>
> Should do it.
>
> Ben


Thanks Ben, that helped a great deal, 1.9 is installed successfully on
my machine.

Kindest Regards
--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
Ben Lovell
Guest
Posts: n/a
 
      04-04-2009
[Note: parts of this message were removed to make it a legal post.]

Great. You'll find macports pretty handy for installing many things.

On Sat, Apr 4, 2009 at 4:31 PM, Zayd Connor <(E-Mail Removed)> wrote:

> Ben Lovell wrote:
> > Install macports. Then:
> > sudo port install ruby19
> >
> > Should do it.
> >
> > Ben

>
> Thanks Ben, that helped a great deal, 1.9 is installed successfully on
> my machine.
>
> Kindest Regards
> --
> Posted via http://www.ruby-forum.com/.
>
>


 
Reply With Quote
 
Zayd Connor
Guest
Posts: n/a
 
      04-04-2009
Ben Lovell wrote:
> Great. You'll find macports pretty handy for installing many things.


Cool. One thing I'm noticing is when I type /usr/bin/ruby -v it is
giving me version 1.8, when I'm compiling my code how do I know which
version of ruby I'm using? 1.9 is installed in my /opt/local/lib
directory.
Should I uninstall 1.8?

Thanks
--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
Ben Lovell
Guest
Posts: n/a
 
      04-04-2009
[Note: parts of this message were removed to make it a legal post.]

On Sat, Apr 4, 2009 at 5:32 PM, Zayd Connor <(E-Mail Removed)> wrote:

>
> Cool. One thing I'm noticing is when I type /usr/bin/ruby -v it is
> giving me version 1.8, when I'm compiling my code how do I know which
> version of ruby I'm using? 1.9 is installed in my /opt/local/lib
> directory.
> Should I uninstall 1.8?
>


Take a look at this article:

http://www.metaskills.net/2009/1/20/...-with-ruby-1-9

Although it is a little hackish I'm not sure of any easier method.

Ben

 
Reply With Quote
 
Dom
Guest
Posts: n/a
 
      04-04-2009

On Apr 4, 2009, at 12:32 PM, Zayd Connor wrote:

> Ben Lovell wrote:
>> Great. You'll find macports pretty handy for installing many things.

>
> Cool. One thing I'm noticing is when I type /usr/bin/ruby -v it is
> giving me version 1.8, when I'm compiling my code how do I know which
> version of ruby I'm using? 1.9 is installed in my /opt/local/lib


at the prompt, type which ruby <return> and that will give you the
path to the executable

also, you might want to check your PATH env variable to make sure it's
finding the right one first, although I think OSX has a mechanism for
switching that's kind of a half baked version of the Linux
alternatives mechanism for switching between various versions of
"stuff". Although, in fairness this seems to work quite well for java
on the mac. Anyway, check your path with either echo $PATH of env
commands and see what it says. You may have to force it by modifying
the path in .bash_profile in your home directory (assuming bash) or
some other file that's modifying your path variable. Hope that helps.
>
> directory.
> Should I uninstall 1.8?
>
> Thanks
> --
> Posted via http://www.ruby-forum.com/.
>



 
Reply With Quote
 
Hassan Schroeder
Guest
Posts: n/a
 
      04-04-2009
On Sat, Apr 4, 2009 at 9:49 AM, Ben Lovell <(E-Mail Removed)> wrote:

> Although it is a little hackish I'm not sure of any easier method.


I always install alternative versions of any software into different
directories, e.g.
/usr/local/ruby-1.8.6
/usr/local/ruby-1.8.7
/usr/local/ruby-1.9.1

set the default path in your .bashrc.local or equiv, and then use a
file like, say "r187"
------------
export RUBY_HOME=/usr/local/ruby-1.8.7
export PATH=$RUBY_HOME/bin:$PATH
------------
for each version. Then in any window you can type
prompt> . r187

and set the version for that particular shell.

FWIW,
--
Hassan Schroeder ------------------------ http://www.velocityreviews.com/forums/(E-Mail Removed)

 
Reply With Quote
 
Zayd Connor
Guest
Posts: n/a
 
      04-06-2009
Dom wrote:
> On Apr 4, 2009, at 12:32 PM, Zayd Connor wrote:
>
>> Ben Lovell wrote:
>>> Great. You'll find macports pretty handy for installing many things.

>>
>> Cool. One thing I'm noticing is when I type /usr/bin/ruby -v it is
>> giving me version 1.8, when I'm compiling my code how do I know which
>> version of ruby I'm using? 1.9 is installed in my /opt/local/lib

>
> at the prompt, type which ruby <return> and that will give you the
> path to the executable
>
> also, you might want to check your PATH env variable to make sure it's
> finding the right one first, although I think OSX has a mechanism for
> switching that's kind of a half baked version of the Linux
> alternatives mechanism for switching between various versions of
> "stuff". Although, in fairness this seems to work quite well for java
> on the mac. Anyway, check your path with either echo $PATH of env
> commands and see what it says. You may have to force it by modifying
> the path in .bash_profile in your home directory (assuming bash) or
> some other file that's modifying your path variable. Hope that helps.


Sorry but I cannot find the file to modify my path env variable.

Thanks
--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Newbi needs help installing Rubygems in XP Peter Vanderhaden Ruby 2 09-30-2007 01:43 PM
Installing Ruby from Source, README needs the command 'make install-doc' documented Micah Cochran Ruby 0 09-22-2006 04:32 PM
Non-programmer needs help on Mac/Wx installation Tony Clarke Python 0 06-28-2004 02:44 PM
Newbie needs help re: installing DVD burner John Computer Support 5 05-06-2004 12:40 PM
server needs to know when user closes browser window feng ASP .Net 1 12-03-2003 06:54 PM



Advertisments