Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/64.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 在RubyMine中运行规范会导致;无法加载这样的文件--teamcity/spec/runner/formatter/teamcity/formatter(LoadError)";_Ruby On Rails_Ruby_Ruby On Rails 4_Rspec_Rubymine - Fatal编程技术网

Ruby on rails 在RubyMine中运行规范会导致;无法加载这样的文件--teamcity/spec/runner/formatter/teamcity/formatter(LoadError)";

Ruby on rails 在RubyMine中运行规范会导致;无法加载这样的文件--teamcity/spec/runner/formatter/teamcity/formatter(LoadError)";,ruby-on-rails,ruby,ruby-on-rails-4,rspec,rubymine,Ruby On Rails,Ruby,Ruby On Rails 4,Rspec,Rubymine,操作系统:ArchLinux,Rails版本:4,RubyMine:6.3 当我从Tools-run Rake Task-spec运行规范时,我总是会遇到以下错误: /home/chyli/.rvm/gems/ruby-2.1。2@rails4/gems/rspec-core-3.0.2/lib/rspec/core/configuration.rb:1024:在'require'中:无法加载这样的文件--teamcity/spec/runner/formatter/teamcity/forma

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

当我从Tools-run Rake Task-spec运行规范时,我总是会遇到以下错误:

/home/chyli/.rvm/gems/ruby-2.1。2@rails4/gems/rspec-core-3.0.2/lib/rspec/core/configuration.rb:1024:在'require'中:无法加载这样的文件--teamcity/spec/runner/formatter/teamcity/formatter(LoadError)

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

我尝试的内容:我在运行-编辑配置下添加了“ruby参数”:

-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的操作来启动spring的。从RubyMine切换回命令行时,也不需要
弹簧停止


这是因为当您运行rake或RubyMine之外的任何东西时,如果spring没有运行,spring将启动并预加载您的代码,但不会加载RubyMine特定的代码。显然,spring不知道如何在启动后加载丢失的代码。

我花了时间修复了这个问题,而不需要重新启动spring

我在我的弹簧叉命令rspec gem中制作了一个

但repo看起来不是活动的,所以您可以通过将spring命令rspec条目切换到GEM文件来使用我的修复:

gem 'spring-commands-rspec', git: 'https://github.com/thewoolleyman/spring-commands-rspec.git'
嗯,:)
--乍得

就在今天遇到了同样的问题,我不得不采取不同的行动:

spring stop
会告诉我
spring没有运行

所以我不得不

1。手动杀死它们

ps aux | grep spring
会给我

thomasromera     27841   [...] | spring app    | started 23 hours ago | development mode
thomasromera     38931   [...] | spring app    | started 18 hours ago | development mode
thomasromera     54661   [...] | spring app    | started 4 mins ago | development mode
thomasromera     27840   [...] | spring server | started 23 hours ago
然后杀死所有服务器+应用程序

kill 27840
kill 38931
...
2。关闭RubyMine:

在RubyMine:CMD+Shift+A type
spring-pre-loader
中,将其关闭,然后重新运行规格


如果你需要的话,别忘了再打开它

这个答案应该被接受,这正是在我的环境中发生的事情(OSX不像Linux那样适用于OP)。在OSX小牛身上对我起了作用。在我身上,RubyMine 7.0+Ubuntu 14.10Sweet也起了作用!感谢您对一个愚蠢错误的伟大修复。如果RubyMine在将spring添加到您的项目之前已经启动并运行,它仍然无法工作-但在完全关闭RubyMine并重新启动之后,它确实可以工作。(Linux上的RM7.0.2)这正是我想要的,并且解决了我这边的问题,而无需重新启动Spring。我不明白你为什么被否决。