Rspec 排错

1. uninitialized constant Dependencies
条件:
在windows下以gem的方式安装rspec和rspec-rails。但在ruby script/spec_server下做测试时spec your_spec.rb -X 会出现
uninitialized constant Dependencies (NameError) 
script/spec_server:33:in `run'

解决:
打开script/spec_server文件,把
::Dependencies.mechanism = :load

改成
ActiveSupport::Dependencies.mechanism = :load

再启动spec_server就OK了

你可能感兴趣的:(java,windows,Ruby,Rails,rspec)