gpt4 book ai didi

ruby-on-rails - 在 RubyMine 中运行规范会导致 "cannot load such file -- teamcity/spec/runner/formatter/teamcity/formatter (LoadError)"

转载 作者:数据小太阳 更新时间:2023-10-29 06:21:13 28 4
gpt4 key购买 nike

操作系统:Arch Linux,Rails 版本:4,RubyMine:6.3

当我从 Tools - Run Rake Task - spec 运行规范时,我总是会收到此错误:

/home/chylli/.rvm/gems/ruby-2.1.2@rails4/gems/rspec-core-3.0.2/lib/rspec/core/configuration.rb:1024:in `require': cannot load such file -- teamcity/spec/runner/formatter/teamcity/formatter (LoadError)

但可以运行“调试规范:模型”。

我尝试了什么:我在运行 - 编辑配置下添加了“ruby arguments”:

-I$RUBYMINE_HOME/rb/testing/patch/bdd -I$RUBYMINE_HOME/rb/testing/patch/common

但它不起作用。

最佳答案

运行

spring stop

在从 RubyMine 运行 rake 之前在命令行上,或者直接运行 specs,或者做任何其他使用 spring 的事情。

您不需要每次在 RubyMine 中运行 rake 或 specs 或其他任何东西时都这样做,前提是您之前通过运行 rake 或执行其他在 RubyMine 之外启动 spring 的操作。当您从 RubyMine 切换回命令行时,您也不需要 spring stop

发生这种情况是因为如果在您运行 rake 或 RubyMine 之外的任何程序时 spring 未运行,spring 将启动并预加载您的代码,但不会预加载特定于 RubyMine 的代码。显然spring在启动后不知道如何加载丢失的代码。

关于ruby-on-rails - 在 RubyMine 中运行规范会导致 "cannot load such file -- teamcity/spec/runner/formatter/teamcity/formatter (LoadError)",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24525945/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com