rspec spec给出"无法加载/home/searching/.gemrc,因为它不包含有效的YAML /"

时间:2014-10-15 12:03:55

标签: ruby-on-rails

无法加载/home/searching/.gemrc,因为它不包含有效的YAML

当我执行此命令时,rspec spec /

将出现上述错误,无法使用规范

执行测试用例

1 个答案:

答案 0 :(得分:1)

.gemrc不是Gemfile

.gemrc是具有以下YAML键的YAML文件:

:sources: A YAML array of remote gem repositories to install gems from
:verbose: Verbosity of the gem command. false, true, and :really are the
          levels
:update_sources: Enable/disable automatic updating of repository metadata
:backtrace: Print backtrace when RubyGems encounters an error
:gempath: The paths in which to look for gems
:disable_default_gem_server: Force specification of gem server host on push
<gem_command>: A string containing arguments for the specified gem command

示例:

:verbose: false
install: --no-wrappers
update: --no-wrappers
:disable_default_gem_server: true

此处详细介绍:http://guides.rubygems.org/command-reference/