Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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"

like image 920
Telmo Dias Avatar asked Dec 20 '13 16:12

Telmo Dias


2 Answers

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.

like image 95
stepmuel Avatar answered Nov 02 '22 10:11

stepmuel


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 .

like image 23
Telmo Dias Avatar answered Nov 02 '22 10:11

Telmo Dias