Telmo Dias
Telmo Dias

Reputation: 4178

Textmate error duplicating lines "ruby: warning: -K is specified; it is for 1.8 compatibility and may cause odd behavior"

While using ctrl+shift+d to shortcut to duplicate lines in Textmate, I came to the following error:

"ruby: warning: -K is specified; it is for 1.8 compatibility and may cause odd behavior"

Upvotes: 6

Views: 492

Answers (2)

stepmuel
stepmuel

Reputation: 1228

This problem isn't limited to duplicating lines, but shows up in may other places where ruby is used. I solved it by changing PATH at Preferences… > Advanced > Shell Variables to /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin

After this change, TextMate will use the older version of ruby which doesn't output said warnings.

Upvotes: 4

Telmo Dias
Telmo Dias

Reputation: 4178

This is an output warning from ruby 2.0 .

The only way I could solve it was by going to

/System/Library/Frameworks/Ruby.framework/Versions and changing the symlink named Current to point to the folder 1.8 ( /System/Library/Frameworks/Ruby.framework/Versions/1.8 ) .

In other words, changed back to use ruby 1.8 instead of 2.0 .

Upvotes: 3

Related Questions