A typical problem is the bold command in the Latex bundle. Instead of inserting "textbf{}", it inserts "env: ruby -s: No such file or directory". The bold command seems to work if I replace the first line in toggle_style.rb with "#!/usr/bin/ruby -s". (I have created a link so that /usr/bin/ruby links to Ruby 1.8 installed from Fink.)
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"?
Thanks for your help,
Darryl
On Sep 17, 2006, at 1:09 AM, Darryl Morrell wrote:
I recently acquired TextMate 1.5.3, and am overall very pleased with it. However, I am running OS X 10.3.9, and several bundles do not work correctly. In particular, several commands in the Latex and TODO bundles do not work. Some of the problems were fixed by installing Ruby 1.8 from Fink, but many others remain. Any help would be appreciated.
A lot of bundle commands require Ruby 1.8, and as far as I know that's the only problem with 10.3.9, so if there are still commands you can't run, then you should probably tell us what they are and what error messages you get.
Darryl Morrell
Haris
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've installed ruby 1.8.1 using fink on 10.3.9 and when I try the command insert environment based upon current word (using equation as an example) I get the error,
dyld: ruby Undefined symbols: _rb_attr_get _rb_ll2inum _rb_num2ll _rb_string_value
Any ideas for how to fix this? Is there something I need to add to a config file somewhere?
Thanks,
Tim.
On 19/9/2006, at 20:34, Tim Lahey wrote:
I've installed ruby 1.8.1 using fink on 10.3.9 and when I try the command insert environment based upon current word (using equation as an example) I get the error,
dyld: ruby Undefined symbols: [...]
It would seem that Ruby got built to rely on some shared library which you do not have or similar.
Try run ruby from the shell and see if you do not get a similar error.
Using the simplest possible example script,
#!/usr/bin/env ruby print "Hello World\n"
from the command line I get no errors. I suspect that it is one of the libraries that TextMate is including when this line is run,
require "#{ENV['TM_SUPPORT_PATH']}/lib/plist"
Unfortunately, I don't know what this is doing since I'm not that familiar with Ruby or TextMate.
Ideas?
Thanks,
Tim.
On 9/19/06, Allan Odgaard throw-away-1@macromates.com wrote:
On 19/9/2006, at 20:34, Tim Lahey wrote:
I've installed ruby 1.8.1 using fink on 10.3.9 and when I try the command insert environment based upon current word (using equation as an example) I get the error,
dyld: ruby Undefined symbols: [...]
It would seem that Ruby got built to rely on some shared library which you do not have or similar.
Try run ruby from the shell and see if you do not get a similar error.
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
On 20/9/2006, at 1:49, Tim Lahey wrote:
Using the simplest possible example script,
#!/usr/bin/env ruby print "Hello World\n"
There is a chance this will load your default ruby.
Please try (from terminal):
/sw/bin/ruby -e 'p :hello'
[...] require "#{ENV['TM_SUPPORT_PATH']}/lib/plist"
This loads a ruby extension bundled with TM. It is not unlikely that this one is the one relying on the symbols, you can test that by adding the following to the line above:
-r/path/to/TextMate.app/Contents/SharedSupport/Support/lib/plist
If it is the plist extension, then that should give the same errors (where the previous line would have worked).
Hmmm, when I run this I get :hello
for everything I try. So I'm wondering what's happening. It certainly appears that everything is okay with the ruby installation.
Now I'm really not sure what is wrong.
Thanks,
Tim.
On 9/19/06, Allan Odgaard throw-away-1@macromates.com wrote:
There is a chance this will load your default ruby.
Please try (from terminal):
/sw/bin/ruby -e 'p :hello'
[...] require "#{ENV['TM_SUPPORT_PATH']}/lib/plist"
This loads a ruby extension bundled with TM. It is not unlikely that this one is the one relying on the symbols, you can test that by adding the following to the line above:
-r/path/to/TextMate.app/Contents/SharedSupport/Support/lib/plist
If it is the plist extension, then that should give the same errors (where the previous line would have worked).
On 20/9/2006, at 4:12, Tim Lahey wrote:
Hmmm, when I run this I get :hello
for everything I try. So I'm wondering what's happening. It certainly appears that everything is okay with the ruby installation.
Now I'm really not sure what is wrong.
Might be that TextMate then does not pick up your new ruby, and installing the new ruby broke the old one.
See http://macromates.com/wiki/Main/FAQ#commandnotfound for troubleshooting and more info.
Based upon some troubleshooting
Using type -p ruby gives /sw/bin/ruby
From the command line if I type
/usr/bin/env ruby --version
I get ruby 1.8.1 (2003-12-25) [powerpc-darwin]
The command will run correctly if I explicitly set the ruby executable to /sw/bin/ruby
but not if I use #!/usr/bin/env ruby
Checking the path as given on the wiki shows /sw/bin.
Oh well, I guess I'll manually change the commands in the bundles as I need them.
Thanks,
Tim.
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