Unable to run 'ruby script/console'
Ryan Schmidt
ryandesign at macports.org
Wed Jun 27 15:29:21 PDT 2007
On Jun 27, 2007, at 17:02, Frederick C. Lee wrote:
> On Jun 27, 2007, at 3:19 PM, Steve Rogers wrote:
>
>> 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.
>
>
> ... then tried again.
>
> [/Users/Ric/workarea/ruby/shovell]ruby script/console
> Loading development environment.
> >>
>
> Moral to this story... avoid duplication.
You should not have needed to delete part of Mac OS X... Or, where
else did you find irb?
What is your PATH variable set to? Does it list /opt/local/bin first,
before /usr/bin? If not, that could have been the problem...
More information about the macports-users
mailing list