Why isn't 'gets' working in my Ruby script when I run from TextMate?

前端 未结 2 1437
感动是毒
感动是毒 2021-01-15 10:36

When running the following ruby script:

puts gets.inspect

On the terminal I am prompted for input and then the inspect output is sh

相关标签:
2条回答
  • 2021-01-15 10:57

    See this blog entry; presumably you're on Snow Leopard?

    From the comments, some users say that this file has worked for them on Snow Leopard. Per @dmarkow's answer, copy this file to:
    /Applications/TextMate.app/Contents/SharedSupport/Support/lib/
    You may want to keep a copy of the file around as updates to TextMate may replace it.

    0 讨论(0)
  • 2021-01-15 11:17

    Specifically, you need to copy the tm_interactive_input.dylib file linked to by Phrogz in the following path:

    /Applications/TextMate.app/Contents/SharedSupport/Support/lib/tm_interactive_input.dylib
    

    Keep in mind that it's possible any TextMate updates will overwrite or delete this file.

    0 讨论(0)
提交回复
热议问题