atom-rspec
atom-rspec copied to clipboard
Issue where bundle exec seems to not be respected
My config:
'rspec':
'command': 'bundle exec rspec'
Running Rspec: Run or Rspec: Run All:
/Users/pete/.gem/ruby/2.0.0/gems/bundler-1.6.2/lib/bundler/runtime.rb:34:in `block in setup': You have already activated rspec-core 2.14.7, but your Gemfile requires rspec-core 2.10.0. Prepending `bundle exec` to your command may solve this. (Gem::LoadError)
Using Chruby on OS X.
With the developer tools, the log output is:
RUN rspec.coffee:70
[RSpec] running: rspec --tty --color /Users/pete/Workspace/project/spec/models/account_statistics/observer_spec.rb rspec-view.coffee:82
[RSpec] exit with code: 1
Digging into rspec-view.coffee, I noticed this line:
specCommand = atom.config.get("atom-rspec.command")
I changed my config to:
'atom-rspec':
'command': 'bundle exec rspec'
And that fixed the issue.
This is really confusing; the README explicitly states using rspec as the key, and using the visual configuration editor also changes the value of rspec, not atom-rspec.
@Aupajo although this is a duplicate of #33 I am closing that one, since yours has more info. Thanks.
+1 @Aupajo's method worked on fresh install just now.
Would be happy to submit a PR to fix this. Would need to know which key was correct though – rspec or atom-rspec?
+1 @Aupajo atom-rspec works with Atom Version 0.144.0 and atom-rspec 0.1.9 (rspec doesn't work and changing the rspec command on the Settings ui page doesnt work neither)
Changing the key name to 'atom-rspec' worked for me as a quick fix. Definitely confusing at the moment.