Having a problem with the Rspec textmate bundle and having quizzed
the guys in #textmate to no success about the errors, I’ve been
suggested to try you guys!
When I run the “Run Behaviour Description” command, I get the
following errors:
/Users/alastair/Library/Application Support/TextMate/Bundles/
RSpec.tmbundle/Support/lib/spec/…/spec/mate/runner.rb:34:in run': undefined method parse’ for Spec::OptionParser:Class
(NoMethodError) from /Users/alastair/Library/Application Support/
TextMate/Bundles/RSpec.tmbundle/Support/lib/spec/…/spec/mate/
runner.rb:33:in chdir' from /Users/alastair/Library/Application Support/TextMate/Bundles/RSpec.tmbundle/Support/lib/spec/../spec/mate/ runner.rb:33:in run’ from /Users/alastair/Library/Application
Support/TextMate/Bundles/RSpec.tmbundle/Support/lib/spec/…/spec/mate/
runner.rb:12:in `run_file’ from /tmp/temp_textmate.YtFHjY:4
Would anyone have any ideas what the problem might be? All the paths
are correct as I can run ruby scripts from within textmate.
Cheers in advance!
Alastair
Alastair M.
Freelance web design, development and consultancy
RSpec.tmbundle/Support/lib/spec/…/spec/mate/runner.rb:34:in `run’:
are correct as I can run ruby scripts from within textmate.
We’ve been making some changes in trunk, so if you’re using trunk make
sure that you have the same revision of rspec and the textmate bundle.
Seems like your textmate bundle is newer than your version of rspec.
from trunk and built a new rspec gem (rspec-1.0.9 r2715) and
Application Support/TextMate/Pristine Copy/Bundles/RSpec.tmbundle/
Support/lib/spec/mate.rb:4 from /tmp/temp_textmate.jLcyE7:3:in
`require’ from /tmp/temp_textmate.jLcyE7:3
Any ideas what might be up with this? At least there are less errors!
I’m guessing that ENV[‘TM_PROJECT_DIRECTORY’] is coming up nil, so I’m
guessing that you’re opening a single file, yes? Try opening up a
directory with your file in it and running it from a project window.
We’ve been making some changes in trunk, so if you’re using trunk make
sure that you have the same revision of rspec and the textmate bundle.
Seems like your textmate bundle is newer than your version of rspec.
Hi David,
Thanks for your reply. I’ve uninstalled my rspec gem, checked out
from trunk and built a new rspec gem (rspec-1.0.9 r2715) and
installed this. I noticed that an rspec bundle was also downloaded
from trunk and so I removed the rspec bundle from textmate and
installed this one.
Opening a simple spec file and running the run behaviour description,
I get a new error:
/Users/alastair/Library/Application Support/TextMate/Pristine Copy/
Bundles/RSpec.tmbundle/Support/lib/spec/mate.rb:4:in join': can't convert nil into String (TypeError) from /Users/alastair/Library/ Application Support/TextMate/Pristine Copy/Bundles/RSpec.tmbundle/ Support/lib/spec/mate.rb:4 from /tmp/temp_textmate.jLcyE7:3:inrequire’ from /tmp/temp_textmate.jLcyE7:3
Any ideas what might be up with this? At least there are less errors!
Hi David,
/Users/alastair/Library/Application Support/TextMate/Pristine Copy/
rspec_rails_plugin =
File.join(ENV
[‘TM_PROJECT_DIRECTORY’],‘vendor’,‘plugins’,‘rspec’,‘lib’)
I’m guessing that ENV[‘TM_PROJECT_DIRECTORY’] is coming up nil, so I’m
guessing that you’re opening a single file, yes? Try opening up a
directory with your file in it and running it from a project window.
I can also confirm issues with the RSpec TextMate bundle as of this
week. The error I’m getting is different though:
/Applications/TextMate.app/Contents/SharedSupport/Support/lib/
builder.rb:86:in blank_slate_method_added': stack level too deep (SystemStackError) from /Applications/TextMate.app/Contents/SharedSupport/Support/lib/ builder.rb:86:inblank_slate_method_added’
from /opt/local/lib/ruby/gems/1.8/gems/builder-2.1.2/lib/
blankslate.rb:84:in method_added' from /opt/local/lib/ruby/gems/1.8/gems/builder-2.1.2/lib/ blankslate.rb:104 from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb: 27:ingem_original_require’
from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
27:in require' from /opt/local/lib/ruby/gems/1.8/gems/builder-2.1.2/lib/builder/ blankslate.rb:11 from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb: 32:ingem_original_require’
from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
32:in require' ... 17 levels... from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb: 27:inrequire’
from /Users/brandon/projects/dealerflow/spec/controllers/…/
spec_helper.rb:5
from /Users/brandon/projects/dealerflow/spec/controllers/
workspaces_controller_spec.rb:1:in require' from /Users/brandon/projects/dealerflow/spec/controllers/ workspaces_controller_spec.rb:1 /Applications/TextMate.app/Contents/SharedSupport/Support/lib/ builder.rb:86:inblank_slate_method_added’: stack level too deep
(SystemStackError)
from /Applications/TextMate.app/Contents/SharedSupport/Support/lib/
builder.rb:86:in blank_slate_method_added' from /opt/local/lib/ruby/gems/1.8/gems/builder-2.1.2/lib/ blankslate.rb:84:inmethod_added’
from /opt/local/lib/ruby/gems/1.8/gems/builder-2.1.2/lib/
blankslate.rb:104
from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
27:in gem_original_require' from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb: 27:inrequire’
from /opt/local/lib/ruby/gems/1.8/gems/builder-2.1.2/lib/builder/
blankslate.rb:11
from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
32:in gem_original_require' from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb: 32:inrequire’
… 17 levels…
from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
27:in require' from /Users/brandon/projects/dealerflow/spec/controllers/../ spec_helper.rb:5 from /Users/brandon/projects/dealerflow/spec/controllers/ workspaces_controller_spec.rb:1:inrequire’
from /Users/brandon/projects/dealerflow/spec/controllers/
workspaces_controller_spec.rb:1
I am using rspec trunk and have updated the textmate bundle to the
latest revision. I haven’t investigated this, but I know edge rails
is now bundling it’s own version of Builder, in which it renamed the
BlankSlate class to BasicObject. Given the stack trace, I’m guessing
that might have something to do with it.
bundle.
Opening a simple spec file and running the run behaviour description,
I can also confirm issues with the RSpec TextMate bundle as of this
from /opt/local/lib/ruby/gems/1.8/gems/builder-2.1.2/lib/
32:in gem_original_require' workspaces_controller_spec.rb:1 27:in gem_original_require’
27:in `require’
latest revision. I haven’t investigated this, but I know edge rails
is now bundling it’s own version of Builder, in which it renamed the
BlankSlate class to BasicObject. Given the stack trace, I’m guessing
that might have something to do with it.
Also - I don’t see ‘RSpec’ or ‘rspec’ anywhere in that stack trace.
It’s all SharedSupport, rails and the app.
Unfortunately, I’m not able to duplicate this. Anybody else having a
similar problem?
I’m having the same problem:
/Users/davidcurrin/Library/Application Support/TextMate/Pristine
Copy/Bundles/RSpec.tmbundle/Support/lib/spec_mate.rb:2:in require': No such file to load -- rubygems (LoadError) from /Users/davidcurrin/Library/Application Support/TextMate/Pristine Copy/Bundles/RSpec.tmbundle/Support/lib/spec_mate.rb:2 from /tmp/temp_textmate.OqOjcI:3:in require’ from
/tmp/temp_textmate.OqOjcI:3
bundle.
Opening a simple spec file and running the run behaviour description,
I can also confirm issues with the RSpec TextMate bundle as of this
from /opt/local/lib/ruby/gems/1.8/gems/builder-2.1.2/lib/
32:in gem_original_require' workspaces_controller_spec.rb:1 27:in gem_original_require’
27:in `require’
latest revision. I haven’t investigated this, but I know edge rails
is now bundling it’s own version of Builder, in which it renamed the
BlankSlate class to BasicObject. Given the stack trace, I’m guessing
that might have something to do with it.
Also - I don’t see ‘RSpec’ or ‘rspec’ anywhere in that stack trace.
It’s all SharedSupport, rails and the app.
Unfortunately, I’m not able to duplicate this. Anybody else having a
similar problem?
I then installed the RSpec Bundle with the following SVN URL:
svn co …/tags/CURRENT/RSpec.tmbundle
Reloaded the Bundles
ran the same model spec from within TM.
Digging up an old thread here.
I’ve done the above (and am at r3317). But getting a strange error when
I run the example with the TextMate bundle (from within a project
directory in TM):
System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in gem_original_require': no such file to load -- image_science (MissingSourceFile) from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:27:inrequire’ from
/myapp/vendor/rails/activerecord/lib/…/…/activesupport/lib/active_support/dependencies.rb:496:in require' from /myapp/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:342:innew_constants_in’ from
/myapp/vendor/rails/activerecord/lib/…/…/activesupport/lib/active_support/dependencies.rb:496:in require' from /myapp/app/models/custom.rb:1 from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:27:ingem_original_require’ from
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in require' from /myapp/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:496:inrequire’ … 14 levels… from /Users/user/Library/Application
Support/TextMate/Bundles/RSpec.tmbundle/Support/lib/spec/…/spec/mate/runner.rb:31:in chdir' from /Users/user/Library/Application Support/TextMate/Bundles/RSpec.tmbundle/Support/lib/spec/../spec/mate/runner.rb:31:inrun’ from /Users/user/Library/Application
Support/TextMate/Bundles/RSpec.tmbundle/Support/lib/spec/…/spec/mate/runner.rb:14:in
`run_file’ from /tmp/temp_textmate.eFFxZt:4
The line generating that error is a simple: require ‘image_science’.
Doing gem which image_science returns the correct value and running
the spec from the command line works fine too.
Strange?
Dave
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.