Texmate

C

Charles L. Snyder

Hi

I installed ruby 1.8.5 and rails on mac osX 10.4.9 via darwinports.
Ever since, using the run command (cmd-R) for ruby programs from
textmate gives me:

"/bin/bash: line 4: Sat Apr 21 17:18:00 CDT 2007 /usr/local/bin/ruby:
No such file or directory"


Interestingly, I get the same message if I try to run a python program
from textmate as well.

There is a file 'ruby' in /usr/local/bin/ and a file 'ruby' in /usr/
bin/ruby
From the command line, "whereis ruby" gives me /usr/bin/ruby


Since I am currently looking at a book on my desk called "Textmate -
Power editing for the Mac", I thought someone in this group might
have a suggestion....


TIA

C L Snyder
 
J

James Edward Gray II

I installed ruby 1.8.5 and rails on mac osX 10.4.9 via darwinports.

DarwinPorts, now called MacPorts, would have installed Ruby in it's
directory. I believe that's something like /opt/bin/ruby.

Try going into TM's preferences, over to the Advanced section, and
setting a variable called TM_RUBY to /opt/bin/ruby (double-check me
on the location though).

Hope that helps.

James Edward Gray II
 
C

Craig Demyanovich

Hi

I installed ruby 1.8.5 and rails on mac osX 10.4.9 via darwinports.
Ever since, using the run command (cmd-R) for ruby programs from
textmate gives me:

"/bin/bash: line 4: Sat Apr 21 17:18:00 CDT 2007 /usr/local/bin/ruby:
No such file or directory"


Interestingly, I get the same message if I try to run a python program
from textmate as well.

There is a file 'ruby' in /usr/local/bin/ and a file 'ruby' in /usr/
bin/ruby

The whereis command searches only the standard binary directories.
Instead try the which command. Here's how things looks on my machine,
where I have left Apple's Ruby install untouched and installed a
newer Ruby via MacPorts:

$ which ruby
/opt/local/bin/ruby
$

The MacPorts one is found because the binary directories from
MacPorts appear first on my path:

$ echo $PATH
/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/local/sbin:/bin:/
sbin:/usr/bin:/usr/sbin
$

Maybe you just need to modify your PATH environment variable so that /
usr/local/bin (and perhaps /usr/local/sbin) appear before /usr/bin.
Let us know if that helps.

Craig
 
J

John Joyce

The whereis command searches only the standard binary directories.
Instead try the which command. Here's how things looks on my
machine, where I have left Apple's Ruby install untouched and
installed a newer Ruby via MacPorts:

$ which ruby
/opt/local/bin/ruby
$

The MacPorts one is found because the binary directories from
MacPorts appear first on my path:

$ echo $PATH
/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/local/sbin:/bin:/
sbin:/usr/bin:/usr/sbin
$

Maybe you just need to modify your PATH environment variable so
that /usr/local/bin (and perhaps /usr/local/sbin) appear before /
usr/bin. Let us know if that helps.

Craig

Modifying the PATH variable is probably the best solution. If you are
not sure about doing that, and chose DarwinPorts/MacPorts as a way to
escape such Unix trouble, well, it's never so clean and easy. (not
until the next version of OS X later in the year)
I recommend you pick up UNIX in a Nutshell from OReilly press,
because it covers exactly how to set PATH and other such things in
the Bash shell. It covers OS X, Linux and Unix in general, so if you
build some great Rails app, or port your Ruby code to another
machine, you won't have trouble.
Working with Ruby and Rails does mean you need to know a little Unix,
not a lot. But keep a reference handy!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,240
Messages
2,571,211
Members
47,849
Latest member
RoseannKoz

Latest Threads

Top