1

I am setting up RubyTest in Sublime Text 2. I installed RubyTest with Package Control and then created a dummy class in a ruby file and a rspec file as a dummy test. I opened the files in Sublime from the terminal. I ran Command-Shift-R, Command-Shift-T, and Command-Shift-E, but received the same error for each "[Errno 20] Not a directory":

Traceback (most recent call last):
  File "./sublime_plugin.py", line 337, in run_
  File "./exec.py", line 146, in run
OSError: [Errno 20] Not a directory: '/Users/holly/github/testing 123/person_spec.rb'
reloading /Users/holly/Library/Application Support/Sublime Text 2/Packages/User/RubyTest.last-run

I googled this error, but I could not find any site that had an answer for this exact error. Many people had a problem with encoding or rvm not loading, but I don't have those issues.

I found the Michael Hartl tutorial and decided to try his installation. I removed RubyTest using Package Control and then installed it with git:

$ git clone https://github.com/maltize/sublime-text-2-ruby-tests.git RubyTest

It installed fine, but when I opened my files and tried running the test commands, I received the same error.

It seems that Sublime is looking for a directory when the commands run. Is there somewhere I need to specify the directory that my files are in?

BTW: this is my first question on Stack Overflow. If I didn't include enough information or too much, please let me know. Cheers!

JJJ
  • 32,902
  • 20
  • 89
  • 102
hollyglot
  • 13
  • 2
  • Maybe this link [RubyTest#165](https://github.com/maltize/sublime-text-2-ruby-tests/issues/165#issuecomment-19444455) will fix the error. – user2744492 Sep 03 '13 at 21:18
  • You should paste the part that solves the problem from the linked site, otherwise if the site goes down your answer is useless. – totymedli Sep 03 '13 at 21:37
  • Thank you. I was able to get RubyTest working with your solution and a couple others I found online. I will add all the solutions as the answer. – hollyglot Oct 25 '13 at 20:03

1 Answers1

0

It took three things to get Sublime to run RubyTest correctly.

  1. The solution shared by user744492. RubyTest requires the spec file to be in a spec folder.

  2. The solution here https://stackoverflow.com/a/15439785/2632354. Make sure RubyTest's sublime-settings: check_for_rvm: true.

  3. Bundle install :).

Tests all passed. We are good to go!

Community
  • 1
  • 1
hollyglot
  • 13
  • 2