I have started making use of the 'Run Script' feature for ruby files I'm editing. All works fine and then I start to get this error: /Applications/Tools/TextMate/TextMate.app/Contents/SharedSupport/Bundles/Ruby.tm bundle/Support/tmruby.rb:115:in `sub': wrong argument type nil (expected Regexp) (TypeError) from /Applications/Tools/TextMate/TextMate.app/Contents/SharedSupport/Bundles/Ruby.tm bundle/Support/tmruby.rb:115
Quitting and restarting TM bypasses the problem, but it would be good to have it fixed! I'm on OS X 10.4.5, I'm willing to provide more info if that helps...
Thanks in advance - Jonathan
On 24/2/2006, at 15:01, Jonathan Waddilove wrote:
/Applications/Tools/TextMate/TextMate.app/Contents/SharedSupport/ Bundles/Ruby.tm bundle/Support/tmruby.rb:115:in `sub': wrong argument type nil
What revision of RubyMate is this (it’s stated on the first line of the output)?
Quitting and restarting TM bypasses the problem, but it would be good to have it fixed! I'm on OS X 10.4.5, I'm willing to provide more info if that helps...
Relaunching TM fixes it? That’s rather strange, seeing how a new Ruby interpreter is started for each “Run”.
But at least a script that fails is needed, and how many times roughly you need to run it, before it fails.
Also, when it does fail, does running another script also fail? Try e.g. just New Document, switch to Ruby and cmd-R (to run an “empty” script).
Allan, Thanks for the response. I'm using: RubyMate r2496 running Ruby v1.8.2.
Once I get this problem it's solid for any script until I recycle TM. I'll try a few experiments and see if I can get a repeatable error... Jonathan
Allan Odgaard throw-away-1@macromates.com wrote:>On 24/2/2006, at 15:01, Jonathan Waddilove wrote:
=
/Applications/Tools/TextMate/TextMate.app/Contents/SharedSupport/=20
Bundles/Ruby.tm bundle/Support/tmruby.rb:115:in `sub': wrong =20 argument type nil
What revision of RubyMate is this (it=92s stated on the first line of =20=
the output)?
Quitting and restarting TM bypasses the problem, but it would be =20 good to have it fixed! I'm on OS X 10.4.5, I'm willing to provide more info if that helps...
Relaunching TM fixes it? That=92s rather strange, seeing how a new Ruby =20=
interpreter is started for each =93Run=94.
But at least a script that fails is needed, and how many times =20 roughly you need to run it, before it fails.
Also, when it does fail, does running another script also fail? Try =20 e.g. just New Document, switch to Ruby and cmd-R (to run an =93empty=94 =20=
script).
On 28/2/2006, at 17:47, Jonathan Waddilove wrote:
Thanks for the response. I'm using: RubyMate r2496 running Ruby v1.8.2.
Once I get this problem it's solid for any script until I recycle TM. I'll try a few experiments and see if I can get a repeatable error...
Okay, the problem is that for some reason, the HOME environment variable gets unset for the script environment.
I have updated the script to only conditionally use that variable. But why you lose it is a mystery.
When it happens, I would be interested to see the output of selecting the following two lines and pressing ctrl-R:
#!/bin/sh echo "$HOME, $USER"
Plus selecting just the last line, and again pressing ctrl-R:
echo "$HOME, $USER"