atom-rspec icon indicating copy to clipboard operation
atom-rspec copied to clipboard

Issue where bundle exec seems to not be respected

Open Aupajo opened this issue 10 years ago • 7 comments

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.

Aupajo avatar Jun 16 '14 22:06 Aupajo

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 

Aupajo avatar Jun 16 '14 22:06 Aupajo

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 avatar Jun 16 '14 22:06 Aupajo

@Aupajo although this is a duplicate of #33 I am closing that one, since yours has more info. Thanks.

exalted avatar Jun 22 '14 19:06 exalted

+1 @Aupajo's method worked on fresh install just now.

nickmerwin avatar Jun 30 '14 20:06 nickmerwin

Would be happy to submit a PR to fix this. Would need to know which key was correct though – rspec or atom-rspec?

Aupajo avatar Jul 01 '14 03:07 Aupajo

+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)

yacc avatar Nov 17 '14 21:11 yacc

Changing the key name to 'atom-rspec' worked for me as a quick fix. Definitely confusing at the moment.

audionerd avatar Jan 20 '15 19:01 audionerd