RSpec TextMate Bundle [spec / autorun (LoadError)]

So, I updated to the last RSpec TextMate Bundle , and I can no longer run the spec test with the "R" command.

  • I have a clean version of TextMate installed.
  • Rspec version 1.3.1 and the executable works
  • My project is a gem created by Mr. Bones.
  • No RVM installation

The project catalog is as follows

my_gem_project spec model_spec.rb spec_helper.rb 

When I run the “R” command from textmate to execute the spec, I get this spec / autorun LoadError

 /Users/jspooner/Library/Application Support/TextMate/Bundles/RSpec.tmbundle/Support/lib/rspec/mate.rb:43:in `require': no such file to load -- spec/autorun (LoadError) from /Users/jspooner/Library/Application Support/TextMate/Bundles/RSpec.tmbundle/Support/lib/rspec/mate.rb:43 from /tmp/textmate-command-767.rb:2:in `require' from /tmp/textmate-command-767.rb:2 

The problem is RSpec.tmbundle / Support / lib / spec / mate.rb because it requires a specification that causes a LoadError: no such file to load — spec error.

I am not sure why this error occurs. I can type spec on the command line, but I cannot require it in the file that textmate starts.

Here are my current gem versions.

 gem list --local | grep spec blue_light_special (0.2.0) rspec (1.3.1) rspec-rails (1.3.3) 
+4
source share
1 answer

I had the same problem because new versions of rspec package do not require rubygems - this works for people who use other package management systems (e.g. Bundler).

The easiest way to sort is to add a variable to textmate - the details are specified in the rspec-bundle github README - http://github.com/rspec/rspec-tmbundle

  • open TextMate settings
  • go to the "Advanced" tab
  • add a variable named RUBYOPT with a value of rubygems
+2
source

All Articles