- xml - AJAX/Jquery XML 解析
- 具有多重继承的 XML 模式
- .net - 枚举序列化 Json 与 XML
- XML 简单类型、简单内容、复杂类型、复杂内容
我按照 Michael Hartl 的 Rails 教程使用 Spork 运行 Guard,我遇到了这个问题。以下是错误信息:
20:45:58 - INFO - Starting Spork for RSpec, Test::Unit
20:45:58 - ERROR - Guard::Spork failed to achieve its <start>, exception was:
> [#B57790298EE3] ChildProcess::LaunchError: No such file or directory - bundle exec spork -p 8989
> [#B57790298EE3] /home/us/.rvm/gems/ruby-2.0.0-p0/gems/childprocess-0.3.9/lib/childprocess/unix/fork_exec_process.rb:54:in `l\aunch_process'
> [#B57790298EE3] /home/us/.rvm/gems/ruby-2.0.0-p0/gems/childprocess-0.3.9/lib/childprocess/abstract_process.rb:72:in `start'
> [#B57790298EE3] /home/us/.rvm/gems/ruby-2.0.0-p0/gems/guard-spork-1.2.0/lib/guard/spork/spork_instance.rb:38:in `start'
> [#B57790298EE3] /home/us/.rvm/gems/ruby-2.0.0-p0/gems/guard-spork-1.2.0/lib/guard/spork/runner.rb:33:in `each'
> [#B57790298EE3] /home/us/.rvm/gems/ruby-2.0.0-p0/gems/guard-spork-1.2.0/lib/guard/spork/runner.rb:33:in `launch_sporks'
> [#B57790298EE3] /home/us/.rvm/gems/ruby-2.0.0-p0/gems/guard-spork-1.2.0/lib/guard/spork.rb:21:in `start'
> [#B57790298EE3] /home/us/.rvm/gems/ruby-2.0.0-p0/gems/guard-1.7.0/lib/guard/runner.rb:99:in `block in run_supervised_task'
> [#B57790298EE3] /home/us/.rvm/gems/ruby-2.0.0-p0/gems/guard-1.7.0/lib/guard/runner.rb:97:in `catch'
> [#B57790298EE3] /home/us/.rvm/gems/ruby-2.0.0-p0/gems/guard-1.7.0/lib/guard/runner.rb:97:in `run_supervised_task'
> [#B57790298EE3] /home/us/.rvm/gems/ruby-2.0.0-p0/gems/guard-1.7.0/lib/guard/runner.rb:54:in `block (2 levels) in run'
> [#B57790298EE3] /home/us/.rvm/gems/ruby-2.0.0-p0/gems/guard-1.7.0/lib/guard/runner.rb:175:in `block (3 levels) in scoped_gua\rds'
> [#B57790298EE3] /home/us/.rvm/gems/ruby-2.0.0-p0/gems/guard-1.7.0/lib/guard/runner.rb:174:in `each'
> [#B57790298EE3] /home/us/.rvm/gems/ruby-2.0.0-p0/gems/guard-1.7.0/lib/guard/runner.rb:174:in `block (2 levels) in scoped_gua\rds'
> [#B57790298EE3] /home/us/.rvm/gems/ruby-2.0.0-p0/gems/guard-1.7.0/lib/guard/runner.rb:173:in `catch'
> [#B57790298EE3] /home/us/.rvm/gems/ruby-2.0.0-p0/gems/guard-1.7.0/lib/guard/runner.rb:173:in `block in scoped_guards'
> [#B57790298EE3] /home/us/.rvm/gems/ruby-2.0.0-p0/gems/guard-1.7.0/lib/guard/runner.rb:172:in `each'
> [#B57790298EE3] /home/us/.rvm/gems/ruby-2.0.0-p0/gems/guard-1.7.0/lib/guard/runner.rb:172:in `scoped_guards'
> [#B57790298EE3] /home/us/.rvm/gems/ruby-2.0.0-p0/gems/guard-1.7.0/lib/guard/runner.rb:53:in `block in run'
> [#B57790298EE3] /home/us/.rvm/gems/ruby-2.0.0-p0/gems/lumberjack-1.0.3/lib/lumberjack.rb:27:in `unit_of_work'
> [#B57790298EE3] /home/us/.rvm/gems/ruby-2.0.0-p0/gems/guard-1.7.0/lib/guard/runner.rb:52:in `run'
> [#B57790298EE3] /home/us/.rvm/gems/ruby-2.0.0-p0/gems/guard-1.7.0/lib/guard.rb:189:in `block in start'
> [#B57790298EE3] /home/us/.rvm/gems/ruby-2.0.0-p0/gems/guard-1.7.0/lib/guard.rb:365:in `block in within_preserved_state'
> [#B57790298EE3] /home/us/.rvm/gems/ruby-2.0.0-p0/gems/guard-1.7.0/lib/guard.rb:362:in `synchronize'
> [#B57790298EE3] /home/us/.rvm/gems/ruby-2.0.0-p0/gems/guard-1.7.0/lib/guard.rb:362:in `within_preserved_state'
> [#B57790298EE3] /home/us/.rvm/gems/ruby-2.0.0-p0/gems/guard-1.7.0/lib/guard.rb:187:in `start'
> [#B57790298EE3] /home/us/.rvm/gems/ruby-2.0.0-p0/gems/guard-1.7.0/lib/guard/cli.rb:110:in `start'
> [#B57790298EE3] /home/us/.rvm/gems/ruby-2.0.0-p0/gems/thor-0.18.1/lib/thor/command.rb:27:in `run'
> [#B57790298EE3] /home/us/.rvm/gems/ruby-2.0.0-p0/gems/thor-0.18.1/lib/thor/invocation.rb:120:in `invoke_command'
> [#B57790298EE3] /home/us/.rvm/gems/ruby-2.0.0-p0/gems/thor-0.18.1/lib/thor.rb:363:in `dispatch'
> [#B57790298EE3] /home/us/.rvm/gems/ruby-2.0.0-p0/gems/thor-0.18.1/lib/thor/base.rb:439:in `start'
> [#B57790298EE3] /home/us/.rvm/gems/ruby-2.0.0-p0/gems/guard-1.7.0/bin/guard:6:in `<top (required)>'
> [#B57790298EE3] ./bundler_stubs/guard:16:in `load'
> [#B57790298EE3] ./bundler_stubs/guard:16:in `<main>'
20:45:58 - INFO - Guard::Spork has just been fired
Spork 可以毫无问题地执行:
Using RSpec
Preloading Rails environment
Loading Spork.prefork block...
Spork is ready and listening on 8989!
似乎是什么问题? childprocess-0.3.9 有错误吗?还是我的 Guardfile?下面是我的 Guardfile:
# A sample Guardfile
# More info at https://github.com/guard/guard#readme
guard 'rspec', :version => 2, :all_after_pass => false, :cli => '--drb' do
watch(%r{^spec/.+_spec\.rb$})
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
watch('spec/spec_helper.rb') { "spec" }
# Rails example
watch(%r{^app/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
watch(%r{^app/(.*)(\.erb|\.haml)$}) { |m| "spec/#{m[1]}#{m[2]}_spec.rb" }
watch(%r{^app/controllers/(.+)_(controller)\.rb$}) { |m| ["spec/routing/#{m[1]}_routing_spec.rb", "spec/#{m[2]}s/#{m[1]}_#{\m[2]}_spec.rb", "spec/acceptance/#{m[1]}_spec.rb", (m[1][/_pages/] ? "spec/requests/#{m[1]}_spec.rb" : "spec/requests/#{m[1].s\ingularize}_pages_spec.rb")] }
watch(%r{^spec/support/(.+)\.rb$}) { "spec" }
watch('config/routes.rb') { "spec/routing" }
watch('app/controllers/application_controller.rb') { "spec/controllers" }
# Capybara request specs
watch(%r{^app/views/(.+)/}) do |m|
(m[1][/_pages/] ? "spec/requests/#{m[1]}_spec.rb" :
"spec/requests/#{m[1].singularize}_pages_spec.rb")
end
# Turnip features and steps
watch(%r{^spec/acceptance/(.+)\.feature$})
watch(%r{^spec/acceptance/steps/(.+)_steps\.rb$}) { |m| Dir[File.join("**/#{m[1]}.feature")][0] || 'spec/acceptance' }
end
guard 'spork', :rspec_env => { 'RAILS_ENV' => 'test' } do
watch('config/application.rb')
watch('config/environment.rb')
watch('config/environments/test.rb')
watch(%r{^config/environments/.+\.rb$})
watch(%r{^config/initializers/.+\.rb$})
watch('Gemfile')
watch('Gemfile.lock')
watch('spec/spec_helper.rb')
watch('test/test_helper.rb')
watch('spec/support/')
end
最佳答案
引自Error on start when using Spork and Guard
"That's a known issue in guard-spork and you can either use the previous
version of ChildProcess by adding
gem 'childprocess', '0.3.6'
to your Gemfile or try the guard-spork master branch, which has fixed
the issue by adding
gem 'guard-spork', :github => 'guard/guard-spork'
to your Gemfile."
我采用了 :github => 'guard/guard-spork' 方法,现在一切正常
关于ruby-on-rails - Guard+Spork 问题(Guard::Spork 未能实现其 <start>,),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15987553/
每当我运行 spork 时,我都会得到 $ spork Using RSpec Preloading Rails environment Loading Spork.prefork block...
我关注了 "How I Test" screencast at RailsCasts ,但是我遇到了 spork 的问题 $ guard Guard is now watching at '/User
当我用 spork 运行我的 rspec 测试时,每次我使用 capybara 的 save_and_open_page 时,spork 都会丢失测试套件......或者可能不再输出任何东西.....
我按照 Michael Hartl 的 Rails 教程使用 Spork 运行 Guard,我遇到了这个问题。以下是错误信息: 20:45:58 - INFO - Starting Spork for
如果我在我的 rails 项目中使用 spork 并且有一个像这样的 spec_helper.rb 文件 require 'spork' Spork.prefork do ... end Spor
我现有的 rspecs 和 Cucumber 功能都运行良好。 我正在安装 spork(实际上是 spork-rails)以提高重新运行速度。 我有 spork 的 rspec 运行良好。 我刚刚按照
我花了好几个小时试图配置 spork,以便它适用于 RSpec,适用于 Cucumber,重新加载模型,以便它不必一直重新启动并且不会抛出错误。 我花了很多时间研究其怪癖的解决方案,以至于我可能只是等
我有一个 spork gem 问题。每次运行 spork 命令时,都会出现这个长错误: evan@TheBeast-Computer:~/rails_projects/sample_app$ spor
我正在使用以下 gem 和 ruby-1.9.3-p194 : rails 3.2.3 rspec-rails 2.9.0 spork 1.0.0rc2 guard - pig 肉 0.6.1 此 G
我使用 spork 作为我的 DRB 和 autotest 作为我的观察者来加速我的 Rails 应用程序中的测试。目前,autotest 会在目录结构中的文件 发生更改时重新启动测试。 有没有办法在
我整天都在使用spork,在大多数情况下,这确实很棒。 但是,我经常遇到一些问题,需要重新启动Spork才能通过测试...现在,我想知道这是否比它值得的麻烦更多。我是ruby的新手,所以有时我无法预测
我正在使用 RSpec 进行 Rails 3 测试并尝试使用 Spork。 我遵循了几个教程,Spork 似乎没有错误地运行,但是我的测试在打开和关闭 Spork 的情况下仍然需要相同的时间来运行(4
我使用 spork 和 guard 来加速我的 Rails 3.2 应用程序中的测试套件。然而,在添加新迁移后,guard 中的测试表现得很奇怪:它们的行为就像它们不知道架构中的变化一样,即使我之前运
谁能解释一下如何将 Spork 与 Minitest 一起使用。我看到有一个 spork-minitest gem , 但不清楚如何使用它。 最佳答案 将其添加到 Gemfile 后,您可以使用 ht
因此,在 Rails 3.0.9 应用程序上,我在 1.9.2 上使用了 Spork/Guard/RSpec/FactoryGirl。 我想知道如何让 Spork/Guard 自动更新我的工厂和语言环
我正在按照 http://ruby.railstutorial.org/ 上的教程开发我的第一个 Rails 应用程序.我已经完全按照教程中的说明设置了我的开发环境(我正在使用带有 Lion 的 Ma
我正在使用以下技巧(来自 http://mikbe.tk/2011/02/10/blazingly-fast-tests/ )来确保在每次使用 Spork 运行 RSpec 时重新加载模型: Spor
使用Spork时如何加载Machinist的蓝图? gem : mongoid (2.0.0.rc.6) capybara (0.4.1.1) 牛排 (1.1.0) spork (0.9.0.rc2)
我正在尝试使用 spork 加速 Rails 2.3.8 应用程序中的“rspecing”。当我在项目的根目录中运行 spork 时,我得到: (...stuff...) No server is r
我在命令行上运行 spork --bootstrap 并收到错误 -bash: spork: command not found 我知道我已经安装了 spork,因为当我运行 bundle show
我是一名优秀的程序员,十分优秀!