请添加包含“ /Users/me/.rvm/bin/rvm-auto-ruby

时间:2019-06-13 17:41:53

标签: ruby rvm textmate2

我正在尝试在TextMate中使用红宝石代码,并且打算将特定的gem与我的捆绑包一起使用。当我尝试使用命令+ R运行红宝石代码时,出现以下错误。

我的路线出了什么问题?

当前PATH是:

/usr/bin
/bin
/usr/sbin
/sbin
/Users/me/Library/Application Support/TextMate/Managed/Bundles/Bundle Support.tmbundle/Support/shared/bin
/Users/me/.rvm/bin/rvm-auto-ruby

Please add the directory containing “/Users/me/.rvm/bin/rvm-auto-ruby
/Users/me/.rvm/bin/rvm-auto-ruby” to PATH in TextMate's Shell Variables preferences.

但是,如您所见,已添加/Users/me/.rvm/bin/rvm-auto-ruby

如果我仅添加目录,而不是rvm-auto-ruby文件

当前PATH是:

/usr/bin
/bin
/usr/sbin
/sbin
/Users/me/Library/Application Support/TextMate/Managed/Bundles/Bundle Support.tmbundle/Support/shared/bin
/Users/me/.rvm/bin

Please add the directory containing “/Users/me/.rvm/bin/rvm-auto-ruby” to PATH in TextMate's Shell Variables preferences.

我遇到同样的错误。

解决方案:(需要更改顺序)

/Users/me/.rvm/bin/rvm-auto-ruby:/Users/me/.rvm/bin:$PATH

1 个答案:

答案 0 :(得分:1)

设置您的路径以包括:

/Users/me/.rvm/bin

不是:

/Users/me/.rvm/bin/rvm-auto-ruby

前者是包含可执行文件的目录的路径。后者是二进制文件的完整路径。您的$ PATH应该包含目录,而不是文件。