当我运行bundle exec rake jasmine然后浏览到时,我会看到以下错误消息:
No data received
Unable to load the web page because the server sent no data.
Error 324 (net::ERR_EMPTY_RESPONSE): The server closed the connection without sending any data.
在控制台里,我看到:
[2012-02-08 07:54:08] INFO WEBrick 1.3.1
[2012-02-08 07:54:08] INFO
我对Jest和还比较陌生,正在尝试在我的GitLab CI上为Rails应用程序运行它。当我在本地运行测试时,它们运行得很好。我使用以下命令来运行它们: yarn run test AFAIK,这等同于运行: npm run test 当我在CI上运行时,测试通过了,但它也在Gems等中运行各种示例测试。请参阅下面的日志。 为什么我要运行样本测试,我如何停止它? $ yarn run test
yarn run v1.22.4
$ jest
FAIL vendor/ruby/2.7.0/gems/capybara-3.14.0/lib/capybara/spec/public/test.js
我有一个Backbone收集规范(当然是todos),它使用Sinon用fixture数据伪造服务器响应。这通过了独立的Jasmine,但在我的Jasmine Headless Webkit设置下失败了。
失败的原因是:
Todos collection when fetching models from the server should parse todos from the response.
Expected 0 to equal 2. (line ~58)
expect(this.todos.length).toEqual(this.fixture.response.
我将此作为对有同样问题的其他人的参考。
$ rake
rake aborted!
No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb, Rakefile.rb)
/home/travis/.rvm/gems/ruby-1.9.3-p551/bin/ruby_executable_hooks:15:in `eval'
/home/travis/.rvm/gems/ruby-1.9.3-p551/bin/ruby_executable_hooks:15:in `<main>'
(See full
我想应用这个主题,但是在构建它时出现了一个错误。它在当地工作,但它不建造。 --我通过这个链接看到了它,但是我不知道如何匹配它,因为服务器还说使用一个固定版本的绑定器是解决方案。
Error: The process '/opt/hostedtoolcache/Ruby/3.1.2/x64/bin/bundle' failed with exit code 16
at ExecState._setResult (/home/runner/work/_actions/ruby/setup-ruby/v1/dist/index.js:6023:25)
at Exec
我试图将rubocop与原子连接起来,但收到了以下错误:
linter-registry.js [sm]:144 [Linter] Error running RuboCop Error: /usr/lib/ruby/2.3.0/rubygems/dependency.rb:319:in `to_specs': Could not find 'rubocop' (>= 0.a) among 16 total gem(s) (Gem::LoadError)
Checked in 'GEM_PATH=/home/kurilovichay/.rvm/gems/r
突然间,我遇到了一个我无法调试的错误。
JS_Parse_Error.get ((execjs):3538:621): SyntaxError: Invalid assignment (ExecJS::RuntimeError)
from (execjs):4060:47
from (execjs):1:102
from Object.<anonymous> ((execjs):1:120)
from Module._compile (module.js:569:30)
from Object.Module._extensions..js (module.js:580:10)
fr
Rails 4允许在.JS视图中使用ruby代码吗?在rails 3中,需要在文件名中包含.erb.js
def test
respond_to do |format|
format.js { Rails.logger.info "in JS handler" }
end
end
/app/views/users/test.erb.js <== no longer works in rails 4
和
/app/views/users/test.js <== still works in rails 4 but does i