[TxMt] Ruby 1.9

Jeff LaMarche jeff_lamarche at mac.com
Wed Dec 26 20:35:56 UTC 2007


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



More information about the textmate mailing list