Textmate错误重复行“ruby:警告:-K指定;这是1.8兼容性,可能导致奇怪的行为“

时间:2021-12-24 07:37:28

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

使用ctrl + shift + d快捷方式重复Textmate中的行时,我遇到以下错误:

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

“ruby:警告:-K是指定的;它是1.8兼容性并可能导致奇怪的行为”

2 个解决方案

#1


4  

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

此问题不仅限于复制行,而是显示在使用ruby的其他地方。我通过在首选项中更改PATH来解决它...>高级> Shell变量到/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.

在此更改之后,TextMate将使用旧版本的ruby,它不会输出所述警告。

#2


3  

This is an output warning from ruby 2.0 .

这是来自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 ) .

/System/Library/Frameworks/Ruby.framework/Versions并将名为Current的符号链接更改为指向文件夹1.8(/System/Library/Frameworks/Ruby.framework/Versions/1.8)。

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

换句话说,改回使用ruby 1.8而不是2.0。

#1


4  

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

此问题不仅限于复制行,而是显示在使用ruby的其他地方。我通过在首选项中更改PATH来解决它...>高级> Shell变量到/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.

在此更改之后,TextMate将使用旧版本的ruby,它不会输出所述警告。

#2


3  

This is an output warning from ruby 2.0 .

这是来自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 ) .

/System/Library/Frameworks/Ruby.framework/Versions并将名为Current的符号链接更改为指向文件夹1.8(/System/Library/Frameworks/Ruby.framework/Versions/1.8)。

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

换句话说,改回使用ruby 1.8而不是2.0。