[TxMt] Ruby question on TextMate
Marc Chanliau
marc.chanliau at gmail.com
Tue Nov 9 20:01:01 UTC 2010
I'm a Ruby newbie. I'm using TexMate Version 1.5.9 (1510) on Mac OS X
Version 10.6.4. I'm trying to write a small Ruby snippet to get keyboard
input as follows:
puts "What is your name? "
name = gets.chomp
puts "Hello #{name}"
I get the following TextMate error:
*NoMethodError:* private method ‘chomp’ called for nil:NilClass
*at top level*<txmt://open?line=2&url=file:///Users/marcc/Documents/marccTechnical/Ruby/myRubyPrograms/sayhello.rb>
in *sayhello.rb* at line 2
Program exited with code #1 after 0.02 seconds.
I've googled pretty much every piece of information on Ruby keyboard input,
changed that little snippet many times accordingly, but I could never get it
to work.
I realize that this question is not directly related to TextMate, but I'm
hoping somebody can help me.
Thanks in advance,
Marc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macromates.com/textmate/attachments/20101109/0b9d39f0/attachment.html>
More information about the textmate
mailing list