Greetings all. Been using TextMate for quite some time, but never had a problem before now. Allan Odgaard suggested I post this to the list.
I installed Ruby 1.9 this morning by doing a source install from the release tarball. I had to manually update the readline library and I also had to change my path so that /usr/local/lib is read before /usr/ lib because of the libreadline.dylib that is contained there.
I can run Ruby 1.9 programs from the command line just fine, but if I try to use command-R to run them from inside TextMate, I get:
------------------ BEGIN ERROR MESSAGE ----------------- /Applications/TextMate.app/Contents/SharedSupport/Support/lib/ scriptmate.rb:4:in `require': /Applications/TextMate.app/Contents/ SharedSupport/Support/lib/io.rb:40: syntax error, unexpected ':', expecting keyword_then or ',' or ';' or '\n' (SyntaxError) when 1: lines.each { |line| block.call(line) } ^ /Applications/TextMate.app/ Contents/SharedSupport/Support/lib/io.rb:41: syntax error, unexpected keyword_when, expecting keyword_end when 2: lines.each { |line| block.call(line, name) } ^ /Applications/TextMate.app/Contents/ SharedSupport/Support/lib/io.rb:47: syntax error, unexpected keyword_elsif, expecting keyword_end elsif sync? ^ /Applications/ TextMate.app/Contents/SharedSupport/Support/lib/io.rb:49: syntax error, unexpected ':', expecting keyword_then or ',' or ';' or '\n' when 1: block.call(data) ^ /Applications/TextMate.app/Contents/ SharedSupport/Support/lib/io.rb:50: syntax error, unexpected keyword_when, expecting keyword_end when 2: block.call(data, name) ^ / Applications/TextMate.app/Contents/SharedSupport/Support/lib/io.rb: 60: syntax error, unexpected ':', expecting keyword_then or ',' or ';' or '\n' when 1: leftovers.each_pair { |name,... ^ /Applications/ TextMate.app/Contents/SharedSupport/Support/lib/io.rb:61: syntax error, unexpected keyword_when, expecting keyword_end when 2: leftovers.each_pair { |na... ^ /Applications/TextMate.app/Contents/ SharedSupport/Support/lib/io.rb:67: syntax error, unexpected keyword_end, expecting $end from /Applications/TextMate.app/Contents/ SharedSupport/Support/lib/scriptmate.rb:4:in `' from /Applications/ TextMate.app/Contents/SharedSupport/Bundles/Ruby.tmbundle/Support/ RubyMate/run_script.rb:1:in `require' from /Applications/TextMate.app/ Contents/SharedSupport/Bundles/Ruby.tmbundle/Support/RubyMate/ run_script.rb:1:in `' ------------------ END ERROR MESSAGE -----------------
I also get errors running a shell script, but not quite the same, and it does then proceed to run the script after dumping the error message, unlike with the Ruby script:
------------------ BEGIN ERROR MESSAGE ----------------- (erb):29:in `concat': character encodings differ (ArgumentError) from (erb):29:in `html_head' from /usr/local/lib/ruby/1.9.0/erb.rb:743:in `eval' from /usr/local/lib/ruby/1.9.0/erb.rb:743:in `result' from / Applications/TextMate.app/Contents/SharedSupport/Support/lib/ web_preview.rb:116:in `html_head' from -:4:in `' Hello World Program exited with status 0. ------------------ END ERROR MESSAGE -----------------
As I said, I'm still able to run Ruby code from the command line, but it's obviously less convenient, so I was hoping somebody might have an idea what's going on. I'm still running Tiger and am on the latest version of TextMate (Version 1.5.7 (1436)). Any thoughts, information would be greatly appreciated.
Thanks, Jeff LaMarche
On Dec 26, 2007 3:35 PM, Jeff LaMarche jeff_lamarche@mac.com wrote:
Greetings all. Been using TextMate for quite some time, but never had a problem before now. Allan Odgaard suggested I post this to the list.
I installed Ruby 1.9 this morning by doing a source install from the release tarball. I had to manually update the readline library and I also had to change my path so that /usr/local/lib is read before /usr/ lib because of the libreadline.dylib that is contained there.
I can run Ruby 1.9 programs from the command line just fine, but if I try to use command-R to run them from inside TextMate, I get:
------------------ BEGIN ERROR MESSAGE ----------------- /Applications/TextMate.app/Contents/SharedSupport/Support/lib/ scriptmate.rb:4:in `require': /Applications/TextMate.app/Contents/ SharedSupport/Support/lib/io.rb:40: syntax error, unexpected ':', expecting keyword_then or ',' or ';' or '\n' (SyntaxError) when 1:
Ruby 1.9 is really a new language and is NOT a drop-in replacement for Ruby 1.8.
There are some incompatibilities in syntax, and you are running into one of those.
You need to get your 1.8 installation back, and install 1.9 after giving it a name suffix, e.g.
$ ./configure --program-suffix=1.9
to generate a make file which will give you executables with names like ruby1.9 irb1.9 etc.
That will let you have Ruby 1.9 installed and still let Textmate work when it uses internal ruby code.
Getting Ruby1.9 to execute under TextMate is another story.
I'm sure that it won't be long before James Gray or someone with more textmate knowledge than I starts working on proper textmate support for 1.9.
--- Rick DeNatale
My blog on Ruby http://talklikeaduck.denhaven2.com/
On Dec 26, 2007, at 2:35 PM, Jeff LaMarche wrote:
Greetings all. Been using TextMate for quite some time, but never had a problem before now. Allan Odgaard suggested I post this to the list.
I installed Ruby 1.9 this morning by doing a source install from the release tarball. I had to manually update the readline library and I also had to change my path so that /usr/local/lib is read before / usr/lib because of the libreadline.dylib that is contained there.
I can run Ruby 1.9 programs from the command line just fine, but if I try to use command-R to run them from inside TextMate, I get:
From the official Ruby 1.9 release announcement by language creator Yukihiro Matsumoto:
"We are happy to announce of the release of the 1.9.0 the development release."
The keyword in there is definitely "development." Ruby 1.9.0 is not a production/stable release and should not yet be counted on for mission critical stuff.
This is the beginning of a transition. The Ruby 1.9 branch will need at least one more release before it begins to get mass usage.
I'm following Ruby 1.9 very closely and will now begin to look at things we can do in TextMate to support it. That won't happen overnight though, so definitely give Ruby some time to firm up and us some time to get up to speed on where it lands.
For now, TextMate commands are definitely targeted against a Ruby 1.8 install.
James Edward Gray II
I couldn't live without my 'Execute and update markers' command in Ruby 1.9, so I threw some quick hacking on it: http://pastie.caboo.se/132561 Have a smooth and joyful transition!