Wayne Molina
2008-May-10 15:30 UTC
[rspec-users] Problems running RSpec from w/in TextMate
Hello everyone, I''m new to RSpec, and pretty much Ruby in general. I am trying to run RSpec from within TextMate to get the nice-looking GUI that lists my specs and whatnot. It runs fine from the command line, but when I run it from TextMate, I get the following error (I am working with a Rails application): RubyMate r8136 running Ruby r1.8.6 (/usr/local/bin/ruby)>>> event_spec.rb/Users/waynemolina/work/liberty_truth/vendor/plugins/rspec/lib/spec/runner/options.rb:195:in `files_to_load'': File or directory not found: [, (RuntimeError) from /Users/waynemolina/work/liberty_truth/vendor/plugins/rspec/lib/spec/runner/options.rb:187:in `each'' from /Users/waynemolina/work/liberty_truth/vendor/plugins/rspec/lib/spec/runner/options.rb:187:in `files_to_load'' from /Users/waynemolina/work/liberty_truth/vendor/plugins/rspec/lib/spec/runner/options.rb:85:in `run_examples'' from /Users/waynemolina/work/liberty_truth/vendor/plugins/rspec/lib/spec.rb:20:in `run'' from /Users/waynemolina/work/liberty_truth/vendor/plugins/rspec/lib/spec/runner.rb:192:in `register_at_exit_hook'' from /Users/waynemolina/work/liberty_truth/spec/models/event_spec.rb:75 RuntimeError: File or directory not found: [, I don''t know how to fix this.. I have tried to search Google but I can''t find anything that deals with it or how to fix it. I am using RSpec 1.1.3 - this is confirmed via gem list rspec. I''ve also installed the latest RSpec tmbundle, just to be on the safe side. It''s not a big deal, since as I said it works from the command line, but I would rather not switch out of TextMate so I''m really hoping that someone can give me some pointers on how to fix this error, since my own searches are turning up empty. Thanks to anyone who can offer some advice! -- Posted via http://www.ruby-forum.com/.
David Chelimsky
2008-May-10 15:41 UTC
[rspec-users] Problems running RSpec from w/in TextMate
On May 10, 2008, at 10:30 AM, Wayne Molina wrote:> Hello everyone, I''m new to RSpec, and pretty much Ruby in general. > I am > trying to run RSpec from within TextMate to get the nice-looking GUI > that lists my specs and whatnot. It runs fine from the command line, > but when I run it from TextMate, I get the following error (I am > working > with a Rails application): > > > RubyMate r8136 running Ruby r1.8.6 (/usr/local/bin/ruby) >>>> event_spec.rb > > /Users/waynemolina/work/liberty_truth/vendor/plugins/rspec/lib/spec/ > runner/options.rb:195:in > `files_to_load'': File or directory not found: [, (RuntimeError) > from > /Users/waynemolina/work/liberty_truth/vendor/plugins/rspec/lib/spec/ > runner/options.rb:187:in > `each'' > from > /Users/waynemolina/work/liberty_truth/vendor/plugins/rspec/lib/spec/ > runner/options.rb:187:in > `files_to_load'' > from > /Users/waynemolina/work/liberty_truth/vendor/plugins/rspec/lib/spec/ > runner/options.rb:85:in > `run_examples'' > from > /Users/waynemolina/work/liberty_truth/vendor/plugins/rspec/lib/ > spec.rb:20:in > `run'' > from > /Users/waynemolina/work/liberty_truth/vendor/plugins/rspec/lib/spec/ > runner.rb:192:in > `register_at_exit_hook'' > from > /Users/waynemolina/work/liberty_truth/spec/models/event_spec.rb:75 > > RuntimeError: File or directory not found: [, > > I don''t know how to fix this.. I have tried to search Google but I > can''t > find anything that deals with it or how to fix it. I am using RSpec > 1.1.3 - this is confirmed via gem list rspec. I''ve also installed the > latest RSpec tmbundle, just to be on the safe side.Actually, that is on the dangerous side. If you are using rspec 1.1.3, you should use the TextMate bundle from the same release. Try grabbing that and see if it works. http://rspec.rubyforge.org/svn/tags/REL_1_1_3/RSpec.tmbundle/ Cheers, David> > > It''s not a big deal, since as I said it works from the command line, > but > I would rather not switch out of TextMate so I''m really hoping that > someone can give me some pointers on how to fix this error, since my > own > searches are turning up empty. > > Thanks to anyone who can offer some advice! > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users
David Schmidt
2008-May-10 16:59 UTC
[rspec-users] Problems running RSpec from w/in TextMate
I also had problems with running RSpec from within TextMate where sometimes it would work and sometimes it would fail repeatedly and finally found my problem. At the bottom of the TextMate window look at the status line in the second box to see what type of file TextMate has the file set as. If it''s not "RSpec" then click on it and change it to "RSpec" and try running the test again. If it''s not set to RSpec then it may be trying to just run the file as a Ruby script, which doesn''t work from within TextMate. When using the RSpec TextMate bundle the window that opens when you run Command-R should be titled "Run Examples". If it just says "Run" then the file type probably isn''t set to RSpec. Hope that helps! David Schmidt On May 10, 2008, at 8:30 AM, Wayne Molina wrote:> Hello everyone, I''m new to RSpec, and pretty much Ruby in general. > I am > trying to run RSpec from within TextMate to get the nice-looking GUI > that lists my specs and whatnot. It runs fine from the command line, > but when I run it from TextMate, I get the following error (I am > working > with a Rails application): > > [...] > > I don''t know how to fix this.. I have tried to search Google but I > can''t > find anything that deals with it or how to fix it. I am using RSpec > 1.1.3 - this is confirmed via gem list rspec. I''ve also installed the > latest RSpec tmbundle, just to be on the safe side. > > It''s not a big deal, since as I said it works from the command line, > but > I would rather not switch out of TextMate so I''m really hoping that > someone can give me some pointers on how to fix this error, since my > own > searches are turning up empty. > > Thanks to anyone who can offer some advice!
Wayne Molina
2008-May-10 18:03 UTC
[rspec-users] Problems running RSpec from w/in TextMate
Okay the issue seems to have been that it wasn''t set to RSpec but Ruby on Rails. Changing it to RSpec seems to fix it... silly me, I guess :) -- Posted via http://www.ruby-forum.com/.
Steve Downey
2008-May-13 00:34 UTC
[rspec-users] Problems running RSpec from w/in TextMate
On Sat, May 10, 2008 at 11:03 AM, Wayne Molina <lists at ruby-forum.com> wrote:> Okay the issue seems to have been that it wasn''t set to RSpec but Ruby > on Rails. Changing it to RSpec seems to fix it... silly me, I guess :) >Same problem (and solution) for me, but ... when I''m in a spec file and switch to RSpec then switch to a non-spec .rb file it says "Ruby". When I switch it to "Ruby on Rails" and then go back to a spec file it says "Ruby on Rails" instead of RSpec. So is there some trick to getting *_spec.rb files to be RSpec and other *.rb files to be Ruby on Rails? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20080512/557173f7/attachment.html>