On 2006-09-19 03:01:05 -0400, cryo@cyanite.org said:
Will I break things if I change the first line of the various ruby scripts from "#!/usr/bin/env ruby -s" to "#!/usr/bin/ruby -s"?
No, I believe the env command is used to select the correct ruby command at run-time (the first one in the PATH). So just providing the correct path manually, will work as well.
I guess the problem is that the older env command doesn't allow arguments for the commands following it, so it tries to start 'ruby -s' instead of 'ruby' with '-s' as argument.
-- Sune.
I use the latest TextMate version (1.5.4 (v1324)) in Panther (10.3.9) with Ruby 1.8.5. I have Installed ruby via MacPorts and I made a symbolic link from /opt/local/bin/ruby to /usr/bin/ruby (the old ruby version has been moved to /usr/bin/ruby-1.6.8). This works great for my TextMate use which is in fact to write some reports in LaTeX. Like Darryl Morrell, I can't used the snippets command like bold, italic or underline because the Panther env command don't accept command with options (You can try to add some ' or " or ` but it doesn't work ). So I modify the first line of /Applications/TextMate.app/Contents/SharedSupport/Bundles/Latex.tmbundle/Support/bin/toggle_style.rb to be now '#!/usr/bin/ruby -s'. I thinked I have to modify the ENV['TM_SUPPORT_PATH'] command because I didn't used the /usr/bin/env command but it wasn't necessary. The snippets works !
My short story is finished, but not my thought. Like I have just mentioned, it is not necessary to use the /usr/bin/env command (at list in the toggle_style.rb file), so how the ENV array is accessible? If I generalised my thought to all the snippets which start by '#!/usr/bin/env ruby -s', it is possible to replace this line by '#!/usr/bin/ruby -s? This modification would make it possible to use TextMate on Panther (with the last ruby version installed)
Maybe it is not important, because you are using Tiger and in some times Leopard, but I find the idea interessant to have a text editor which works on the different Mac OS version.
Regards,
Arnaud