0

I am trying to my ruby code in TextMate and I am planning to use a specific gem with a bundle I have. When I try to run my ruby code with command + R, I get the following error.

What is wrong with my path?

The current PATH is:

/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.

However, as you can see, /Users/me/.rvm/bin/rvm-auto-ruby is added.

If I add just directory, not the rvm-auto-ruby file

The current PATH is:

/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.

I get same error.

SOLUTION: (needed to change the order)

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

user2012677
  • 5,465
  • 6
  • 51
  • 113

1 Answers1

1

Set your path to include:

/Users/me/.rvm/bin

Not:

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

The former is the path to the directory containing the executable. The latter is the complete path to the binary. Your $PATH should include directories, not files.

anothermh
  • 9,815
  • 3
  • 33
  • 52