我在试着让Guard和Spork和Cucumber一起工作。我正在创建一个带有rspec.I的Rails应用程序。我尝试了许多不同的方法,但都无济于事,我感到很失败。
我假设问题要么在Gemfile中,要么在Guardfile中。我是一个正在学习的新手,所以如果你在我的设置中看到一些我可以改进和/或没有的东西,请随时让我知道,我希望得到一些反馈。
但有一件事,据我所知,黄瓜似乎在起作用。但是,每次我尝试运行Guard时,它都会显示:
ERROR - Could not load 'guard/spork-rails' or find class Guard::Sporkrail
我从rails-4.2.7.1升级到5.0.1,现在运行guard时,它出于某种原因重新启动。这会导致它尝试启动Rails的第二个实例,但由于已经有一个实例正在运行而终止。
» bundle exec guard
Expected string default value for '--listen-on'; got false (boolean)
17:57:54 - INFO - Bundle already up-to-date
17:57:54 - INFO - [Guard::Rails] will start the default web server on po
在我的Rails应用程序中,运行guard init rspec时会收到此警告
Warning: you have a Gemfile, but you're not using bundler or
RUBYGEMS_GEMDEPS
14:54:15 - INFO - Writing new Guardfile to
/home/ubuntu/railsprojects/sillyfish/Guardfile 14:54:16 - INFO - rspec
guard added to Guardfile, feel free to edit it
我不明白它为什么会出现。无视这个警
我正在遵循ROR教程,我用rspec规范/请求/静态_pages_spec.rb进行测试,错误发生了“No DRb server is running. Running in local process instead"‘我做了一些研究,他们说是因为Spork.each_run do服务器没有运行,所以我将Spork.each_run do添加到spc文件中,这没有帮助,我还将gem文件从gem 'guard-spork'修改为gem 'guard-spork', :github => 'guard/guard-spork',还有人
我正在尝试在一个新的Rails 4项目中使用Minitest设置Guard。我用以下内容更新了我的Gemfile:
group :development do
gem 'guard'
gem 'guard-minitest'
end
然后运行了bundle exec guard init minitest。
我有一个非常简单的测试,如下所示:
require 'test_helper'
describe ClassToBeTested do
describe "#initialize" do
it "
Michael Hartl的精彩现在可以在Rails3.2上使用。他继续使用rspec和spork概述TDD和BDD,就像他在3.0版本中所做的那样,并在3.2中添加了guard。在3.0版本中,Hartl包含了有关自动测试的信息,并且我能够让美妙的咆哮通知工作。然而,在3.2版本中,他不再包含自动测试或大量的咆哮信息。Guard和spork合作得很好,但没有通知。在过去的几个小时里,我一直在尝试使用Hartl3.0和一些博客文章进行测试,但试图让autotest正常工作仍然会产生一个"LoadError“和一个”own‘t run tests“的咆哮通知。非常感谢你的任何想法。我使用
解决方案:取出guardfile中的spork代码,从我的另一个使用spork和guard的应用程序中复制并粘贴一个工作的guardfile。
我在我的应用中安装了Guard和Spork。Guard工作得很好,但当我运行Spork时,Spork加载并说准备好并正在侦听。只要我打开一个新的终端并启动rspec,Spork就会在第一个终端中被杀死,下面显示...
jason@jason:~/ror/blog$ guard
14:57:44 - INFO - Guard here! It looks like your project has a Gemfile, yet you are
runn
我想知道如何在运行一个简单的测试时关闭所有这些警告:
[1] guard(main)>
16:59:46 - INFO - Run all
16:59:46 - INFO - Running all specs
/Users/esjd/.rvm/gems/ruby-2.1.2/gems/rspec-rails-3.0.1/lib/rspec/rails/adapters.rb:124: warning: instance variable @example not initialized
/Users/esjd/.rvm/gems/ruby-2.1.2/gems/rspec-rails
我正在尝试用JRuby在Windows上设置Guard,我得到了这个输出:
$ guard
You must 'gem install win32console' to use color on Windows
WARNING: You are using Guard outside of Bundler, this is dangerous and could not
work. Using `bundle exec guard` is safer.
Guard uses Notifu to send notifications.
Guard is now watching
我刚刚安装了factory_bot_rails gem,这从一开始就给我带来了一个问题:
$ bundle exec rspec spec/models/scan_spec.rb
bundler: failed to load command: rspec (/Users/me/.rbenv/versions/2.4.3/bin/rspec)
Bundler::GemRequireError: There was an error while trying to load the gem 'factory_bot_rails'.
Gem Load Err