我試圖用rspec和guard在一個Rails 3.2.16項目上使用spring。`春天RSpec`只顯示春天幫助..爲什麼?
安裝春春的命令-rspec的後,我創建了binstubs有:
> bundle exec spring binstub --all
* bin/rake: spring inserted
* bin/rspec: spring inserted
* bin/rails: spring inserted
現在試圖用簧運行規範失敗(subtituted易於識別的寶石路徑和項目路徑):
> bin/rspec spec/
Version: 1.1.0
Usage: spring COMMAND [ARGS]
Commands for spring itself:
binstub Generate spring based binstubs. Use --all to generate a binstub for all known commands.
help Print available commands.
status Show current status.
stop Stop all spring processes for this project.
Commands for your application:
rails Run a rails command. The following sub commands will use spring: console, runner, generate, destroy.
rake Runs the rake command
rspec Runs the rspec command
rspec binstub
No DRb server is running. Running in local process instead ...
gemspath/rspec-core-2.14.7/lib/rspec/core/configuration.rb:896:in `load': cannot load such file -- [PROJECT_PATH]/rspec (LoadError)
from gemspath/rspec-core-2.14.7/lib/rspec/core/configuration.rb:896:in `block in load_spec_files'
from gemspath/rspec-core-2.14.7/lib/rspec/core/configuration.rb:896:in `each'
from gemspath/rspec-core-2.14.7/lib/rspec/core/configuration.rb:896:in `load_spec_files'
from gemspath/rspec-core-2.14.7/lib/rspec/core/command_line.rb:22:in `run'
from gemspath/rspec-core-2.14.7/lib/rspec/core/runner.rb:77:in `rescue in run'
from gemspath/rspec-core-2.14.7/lib/rspec/core/runner.rb:73:in `run'
from gemspath/rspec-core-2.14.7/lib/rspec/core/runner.rb:17:in `block in autorun'
其他嘗試:
> spring rspec
僅顯示彈簧幫助
也是一樣
> spring rspec spec/
這裏是RSpec的binstub(BIN/rspec的):
#!/usr/bin/env ruby
begin
load File.expand_path("../spring", __FILE__)
rescue LoadError
end
require 'bundler/setup'
load Gem.bin_path('rspec', 'rspec')
任何想法?
我有完全相同的問題。我希望有人會回答! –
'bundle exec spring stop'然後'bundle exec spring start'爲我解決了它。 –
@DarshanSawardekar它沒有解決我的問題,'春天開始'不存在。你正在運行哪個rspec版本?我有3.0.0-beta1。可能是因爲這個原因。 –