Unable to run 'ruby script/console'

paul beard paulbeard at gmail.com
Wed Jun 27 15:43:31 PDT 2007


>> On Jun 27, 2007, at 3:36 PM, Frederick C. Lee wrote:
> >>
> >>> This is what I get when I attempt to run the console per Patrick
> >>> Lenz's book:
> >>> [/Users/Ric/workarea/ruby/shovell]ruby script/console
> >>> Loading development environment.
> >>> /opt/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/
> >>> console.rb:25:in `exec': No such file or directory - irb  -r irb/
> >>> completion -r script/../config/../config/environment
> >>
> >> I'd guess that one of these things is missing.  Try "which irb"
> >> and see if you have a config/environment.rb
> >
> > One the hassles of installing software via MacPorts and independent
> > sites is having duplicate applications installed.
> > I started to look for all the ruby parts and found them distributed
> > about the HD:
> >
> > [/Users/Ric/workarea/ruby/shovell]which irb
> > /usr/bin/irb
>
> I have that on my system too, and I don't use Ruby. Presumably Apple
> provided it with Mac OS X.
>
> > [/Users/Ric/workarea/ruby/shovell]which ruby
> > /opt/local/bin/ruby
> >
> > [/Users/Ric/workarea/ruby/shovell]which rails
> > /opt/local/bin/rails
> >
> > [/Users/Ric/workarea/ruby/shovell]ls /opt/local/bin/irb
> > /opt/local/bin/irb*
> >
> > Here we see multiple occurrences of irb; also found elsewhere.
> > So I deleted the others, keeping the one in /opt/local/bin where
> > 'ruby' is located.
>

Um, yeah, what Ryan said. Don't remove parts of the vendor-supplied system
unless you have a good reason to. You can choose between identically named
binaries with your PATH, as you are already doing with the ruby version you
built from MacPorts. You shouldn't be running out of disk space or have any
other reason to delete binaries: the irb provided by ruby 1.8.6 is 379
bytes.
You're on your own if some future Apple-supplied upgrade requires their ruby
binaries ;-)

I think what you see as a hassle -- multiple versions -- is more a feature
than a bug.

-- 
Paul Beard / www.paulbeard.org/
<paulbeard at gmail.com/paulbeard at mac.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-users/attachments/20070627/2b1ba8ec/attachment.html


More information about the macports-users mailing list