Installing ruby on MacOS X

I installed the latest stable release (1.8.2) a couple days ago on my
mac. I had previously installed it via darwinports, but that installed
version 1.8.1, and I wanted the most recent one.

So I downloaded the source code, typed './configure; make; sudo make
install' to install ruby, then downloaded rubygems, then went from
there. Not terribly complicated.

···

-----Original Message-----
From: Robert [mailto:sigzero@gmail.com]
Sent: Wednesday, November 03, 2004 6:34 AM
To: ruby-talk ML
Subject: Re: installing ruby on MacOS X

Steven Marcus <steven.marcus@gmail.com> wrote in message
news:<281148e704110203477ed14630@mail.gmail.com>...
> Hi all!
>
> Ruby newbie here.
>
> I'd like to install and work with Ruby 1.8.x on MacOS X.
> I have found
> http://www.rubygarden.org/ruby?RubyOnMacintosh
> and
> http://www.loudthinking.com/arc/000199.html
> to be helpful.
>
> It appears that my options are
> 1) download the source and compile it myself
> 2) download a binary and install it
> 3) install via darwinports
> 4) install via fink
>
> After installation I believe I can add ruby libraries
> 1) manually
> 2) as Ruby Gems
> 3) from the RAA
> 4) via darwinports if using 3 above
> 5) via fink if using 4 above
>
> I imagine there are a number of trade offs to the above approaches.
> Also, there appears to be overlap between
(darwinports|fink) and gems
> and RAA. As I write this darwinports appears to have a more active
> ruby community, judging from the fact that it offers 58
ports versus
> 16 for fink.

>
> I'd like things to be painless and relatively automatic. By
automatic,
> I mean that installing and especially upgrading libraries should be
> quick and painless.
>
> Can someone share their experience?
>
> TIA
> Steven Marcus

Van Dyk, Joe wrote:

I installed the latest stable release (1.8.2) a couple days ago on my
mac. I had previously installed it via darwinports, but that installed
version 1.8.1, and I wanted the most recent one.

Not much point in me telling this, as you already installed it, but anyways: There is only a preview release of 1.8.2 AFAIK, which you can install in darwinports by doing sudo port install ruby +preview Rubygems is installable by doing sudo port install rb-rubygems

I went with darwinports and things worked fairly smoothly. It
downloads and installs the readline library automatically -- which if
you download the sources and attempt a manual install you might omit.

I had a little glitch because I had installed darwinports months ago
and then did an incomplete uninstall. Note, that darwinports installs
files in
/Library/Tcl/darwinports1.0
/etc/ports
/opt/local
by default. I had previously only deleted my /opt/local dir which
caused a hiccup after installing the latest version in a new location.

thanks again!
Steven Marcus

···

On Thu, 4 Nov 2004 08:13:31 +0900, Van Dyk, Joe <joe.vandyk@boeing.com> wrote:

> -----Original Message-----
> From: Robert [mailto:sigzero@gmail.com]
> Sent: Wednesday, November 03, 2004 6:34 AM
> To: ruby-talk ML
> Subject: Re: installing ruby on MacOS X
>
>
> Steven Marcus <steven.marcus@gmail.com> wrote in message
> news:<281148e704110203477ed14630@mail.gmail.com>...
> > Hi all!
> >
> > Ruby newbie here.
> >
> > I'd like to install and work with Ruby 1.8.x on MacOS X.
> > I have found
> > http://www.rubygarden.org/ruby?RubyOnMacintosh
> > and
> > http://www.loudthinking.com/arc/000199.html
> > to be helpful.
> >
> > It appears that my options are
> > 1) download the source and compile it myself
> > 2) download a binary and install it
> > 3) install via darwinports
> > 4) install via fink
> >
> > After installation I believe I can add ruby libraries
> > 1) manually
> > 2) as Ruby Gems
> > 3) from the RAA
> > 4) via darwinports if using 3 above
> > 5) via fink if using 4 above
> >
> > I imagine there are a number of trade offs to the above approaches.
> > Also, there appears to be overlap between
> (darwinports|fink) and gems
> > and RAA. As I write this darwinports appears to have a more active
> > ruby community, judging from the fact that it offers 58
> ports versus
> > 16 for fink.
>
> >
> > I'd like things to be painless and relatively automatic. By
> automatic,
> > I mean that installing and especially upgrading libraries should be
> > quick and painless.
> >
> > Can someone share their experience?
> >
> > TIA
> > Steven Marcus
>

I installed the latest stable release (1.8.2) a couple days ago on my
mac. I had previously installed it via darwinports, but that installed
version 1.8.1, and I wanted the most recent one.

So I downloaded the source code, typed './configure; make; sudo make
install' to install ruby, then downloaded rubygems, then went from
there. Not terribly complicated.

Does IRB work? I thought readline had to be installed...

Robert

···

On 11/3/04 6:13 PM, in article 67B3A7DA6591BE439001F27362333512038C8C27@xch-nw-28.nw.nos.boeing.com, "Van Dyk, Joe" <joe.vandyk@boeing.com> wrote:

-----Original Message-----
From: Robert [mailto:sigzero@gmail.com]
Sent: Wednesday, November 03, 2004 6:34 AM
To: ruby-talk ML
Subject: Re: installing ruby on MacOS X

Steven Marcus <steven.marcus@gmail.com> wrote in message
news:<281148e704110203477ed14630@mail.gmail.com>...

Hi all!

Ruby newbie here.

I'd like to install and work with Ruby 1.8.x on MacOS X.
I have found
http://www.rubygarden.org/ruby?RubyOnMacintosh
and
http://www.loudthinking.com/arc/000199.html
to be helpful.

It appears that my options are
1) download the source and compile it myself
2) download a binary and install it
3) install via darwinports
4) install via fink

After installation I believe I can add ruby libraries
1) manually
2) as Ruby Gems
3) from the RAA
4) via darwinports if using 3 above
5) via fink if using 4 above

I imagine there are a number of trade offs to the above approaches.
Also, there appears to be overlap between

(darwinports|fink) and gems

and RAA. As I write this darwinports appears to have a more active
ruby community, judging from the fact that it offers 58

ports versus

16 for fink.

I'd like things to be painless and relatively automatic. By

automatic,

I mean that installing and especially upgrading libraries should be
quick and painless.

Can someone share their experience?

TIA
Steven Marcus

I installed the latest stable release (1.8.2) a couple days ago on my
mac. I had previously installed it via darwinports, but that installed
version 1.8.1, and I wanted the most recent one.

So I downloaded the source code, typed './configure; make; sudo make
install' to install ruby, then downloaded rubygems, then went from
there. Not terribly complicated.

Not sure if this is a darwinports or a rubygems problem:

After an install of darwinports, I installed ruby +preview and rb-rubygems.

Unfortunately,
$ gem help
did not work, complaining about an invalid path to the ruby interpreter.

I found that the path to the ruby interpreter specified in

/opt/local/bin/gem
/opt/local/bin/gem_server
/opt/local/bin/update_rubygems

were all bogus. Instead of pointing to /opt/local/bin/ruby, they were
pointing to my somewhere deep inside the original darwinports source
installation directory outside the /opt/local subtree.

I manually patched the files and things appear to be working.
Anyone know how to go about getting the fix in?

TIA
Steven Marcus

Not sure if this is a darwinports or a rubygems problem:

Looks like a darwinports problem to me....

After an install of darwinports, I installed ruby +preview and rb-rubygems.

Unfortunately,
$ gem help
did not work, complaining about an invalid path to the ruby interpreter.

I found that the path to the ruby interpreter specified in

/opt/local/bin/gem
/opt/local/bin/gem_server
/opt/local/bin/update_rubygems

Weird. I installed it with darwinports and it set the ruby
interpreter path correctly.

were all bogus. Instead of pointing to /opt/local/bin/ruby, they were
pointing to my somewhere deep inside the original darwinports source
installation directory outside the /opt/local subtree.

I manually patched the files and things appear to be working.
Anyone know how to go about getting the fix in?

This site lists the maintainer's email address. What did you have to fix?

http://darwinports.org/ports/?by=name&substr=gems&Search=Submit

Thanks,

Chad Fowler
http://chadfowler.com
http://rubycentral.org
http://rubygarden.org
http://rubygems.rubyforge.org (over 20,000 gems served!)

···

On Fri, 5 Nov 2004 11:49:02 +0900, Steven Marcus <steven.marcus@gmail.com> wrote:

Steven Marcus wrote:

Not sure if this is a darwinports or a rubygems problem:

After an install of darwinports, I installed ruby +preview and

rb-rubygems.

Unfortunately,
$ gem help
did not work, complaining about an invalid path to the ruby

interpreter.

I found that the path to the ruby interpreter specified in

/opt/local/bin/gem
/opt/local/bin/gem_server
/opt/local/bin/update_rubygems

were all bogus. Instead of pointing to /opt/local/bin/ruby, they were
pointing to my somewhere deep inside the original darwinports source
installation directory outside the /opt/local subtree.

This is very interesting. I just found the same error, when I tried to
install rubygems using darwinports. I made sure to synch up to the
darwinports tree before I tried installing

rb-rubygems

For those interested, the first line in each of those 3 files read:

#!/Users/arthur8/darwinports/dports/ruby/rb-rubygems/work/destroot/opt/local/bin/ruby

rather than the appropriate path:

#!/opt/local/bin/ruby

I manually patched the files and things appear to be working.
Anyone know how to go about getting the fix in?

I also editted each of thosee files to alter the ruby executable path,
but a then different problem appeared. Typing

gem

threw an exception:

/opt/local/lib/ruby/1.8/fileutils.rb:181:in `mkdir': Permission denied
- /opt/local/lib/ruby/gems/1.8/doc (Errno::EACCES)
from /opt/local/lib/ruby/1.8/fileutils.rb:181:in `mkdir_p'
from /opt/local/lib/ruby/1.8/fileutils.rb:179:in `reverse_each'
from /opt/local/lib/ruby/1.8/fileutils.rb:179:in `mkdir_p'
from /opt/local/lib/ruby/1.8/fileutils.rb:173:in `each'
from /opt/local/lib/ruby/1.8/fileutils.rb:173:in `mkdir_p'
from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems.rb:272:in
`ensure_gem_subdirectories'
from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems.rb:268:in
`each'
from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems.rb:268:in
`ensure_gem_subdirectories'
.... 17 levels...
from
/opt/local/lib/ruby/vendor_ruby/1.8/rubygems/loadpath_manager.rb:5:in
`require__'
from
/opt/local/lib/ruby/vendor_ruby/1.8/rubygems/loadpath_manager.rb:5:in
`require'
from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems.rb:58:in
`manage_gems'
from /opt/local/bin/gem:4

Evidently, the rb-rubygems darwinports fails to create the doc
directory in

/opt/local/lib/ruby/gems/1.8

Manually creating that doc directory seems to get gem working.

The version of rb-rubygems in darwinports is 0.8.1, but rubygems is now
at 0.8.3. Perhaps the lateset version of rubygems with these fixes in
place can be put into darwinports?

Arthur