- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
这是有问题的公共(public)存储库:https://travis-ci.org/agerwick/raw-sinatra-boilerplate
我按照此处的建议集成了 codeclimate 的测试报告程序 gem:http://docs.travis-ci.com/user/code-climate/
我不断收到的错误是:/home/travis/.rvm/rubies/ruby-2.0.0-p594/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:54 :in 'require': 无法加载此类文件 -- codeclimate-test-reporter (LoadError)
从下面的日志中可以看到,Travis CI 正在安装 codeclimate-test-reporter gem。我尝试使用 CODECLIMATE_REPO_TOKEN 环境变量集从本地计算机运行测试,这里它工作得很好,更新了代码气候测试覆盖率状态。因此,问题仅出现在 travis 上。
关于下一步如何尝试以使 Travis CI 正确要求 codeclimate-test-reporter 有什么建议吗?
出于历史目的,以下是 Travis CI 的日志:
Using worker: worker-linux-9-1.bb.travis-ci.org:travis-linux-16
system_info
Build system information
Build language: ruby
git.checkout
0.06s$ git clone --depth=50 --branch=master git://github.com/agerwick/raw-sinatra-boilerplate.git agerwick/raw-sinatra-boilerplate
Cloning into 'agerwick/raw-sinatra-boilerplate'...
remote: Counting objects: 223, done.
remote: Compressing objects: 100% (51/51), done.
remote: Total 223 (delta 27), reused 0 (delta 0)
Receiving objects: 100% (223/223), 45.36 KiB | 0 bytes/s, done.
Resolving deltas: 100% (89/89), done.
Checking connectivity... done.
$ cd agerwick/raw-sinatra-boilerplate
$ git checkout -qf d659d86167d5c60f52e4013190ee5fd45dbb4b00
rvm
0.47s$ rvm use 2.0.0 --install --binary --fuzzy
Using /home/travis/.rvm/gems/ruby-2.0.0-p594
$ export BUNDLE_GEMFILE=$PWD/Gemfile
$ ruby --version
ruby 2.0.0p594 (2014-10-27 revision 48167) [x86_64-linux]
$ rvm --version
rvm 1.26.0 (master) by Wayne E. Seguin <wayneeseg<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="54213d3a143339353d387a373b39" rel="noreferrer noopener nofollow">[email protected]</a>>, Michal Papis <<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="563b2637263f2516313b373f3a7835393b" rel="noreferrer noopener nofollow">[email protected]</a>> [https://rvm.io/]
$ bundle --version
Bundler version 1.7.4
$ gem --version
2.4.2
before_install.1
0.01s$ export DISPLAY=:99.0
before_install.2
0.01s$ sh -e /etc/init.d/xvfb start
Starting virtual X frame buffer: Xvfb.
install.bundler
143.23s$ bundle install --jobs=3 --retry=3 --deployment
Fetching gem metadata from https://rubygems.org/.........
Fetching git://github.com/agerwick/rack-minitest.git
Installing mini_portile 0.6.1
Installing mime-types 2.4.3
Installing rack 1.5.2
Installing minitest 5.4.3
Installing docile 1.1.5
Installing json 1.8.1
Installing multi_json 1.10.1
Installing tilt 1.4.1
Using bundler 1.7.4
Installing simplecov-html 0.8.0
Installing rack-test 0.6.2
Installing rack-protection 1.5.3
Installing shotgun 0.9
Installing travis-lint 2.0.0
Installing haml 4.0.5
Installing simplecov 0.9.1
Using rack-minitest 0.0.9 from git://github.com/agerwick/rack-minitest.git (at master)
Installing sinatra 1.4.5
Installing codeclimate-test-reporter 0.4.1
Installing nokogiri 1.6.4.1
Installing xpath 2.0.0
Installing capybara 2.4.4
Installing capybara_minitest_spec 1.0.5
Installing capybara-webkit 1.3.1
Your bundle is complete!
It was installed into ./vendor/bundle
Post-install message from haml:
HEADS UP! Haml 4.0 has many improvements, but also has changes that may break
your application:Installing docile 1.1.5
Installing json 1.8.1
Installing multi_json 1.10.1
Installing tilt 1.4.1
Using bundler 1.7.4
Installing simplecov-html 0.8.0
Installing rack-test 0.6.2
Installing rack-protection 1.5.3
Installing shotgun 0.9
Installing travis-lint 2.0.0
Installing haml 4.0.5
Installing simplecov 0.9.1
Using rack-minitest 0.0.9 from git://github.com/agerwick/rack-minitest.git (at master)
Installing sinatra 1.4.5
Installing codeclimate-test-reporter 0.4.1
Installing nokogiri 1.6.4.1
Installing xpath 2.0.0
Installing capybara 2.4.4
Installing capybara_minitest_spec 1.0.5
Installing capybara-webkit 1.3.1
Your bundle is complete!
It was installed into ./vendor/bundle
Post-install message from haml:
HEADS UP! Haml 4.0 has many improvements, but also has changes that may break
your application:
* Support for Ruby 1.8.6 dropped
* Support for Rails 2 dropped
* Sass filter now always outputs <style> tags
* Data attributes are now hyphenated, not underscored
* html2haml utility moved to the html2haml gem
* Textile and Maruku filters moved to the haml-contrib gem
For more info see:
http://rubydoc.info/github/haml/haml/file/CHANGELOG.md
0.30s$ rake all
/home/travis/.rvm/rubies/ruby-2.0.0-p594/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- codeclimate-test-reporter (LoadError)
from /home/travis/.rvm/rubies/ruby-2.0.0-p594/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /home/travis/build/agerwick/raw-sinatra-boilerplate/test/spec_helper.rb:5:in `<top (required)>'
from /home/travis/build/agerwick/raw-sinatra-boilerplate/test/business_logic_test_helper.rb:2:in `require_relative'
from /home/travis/build/agerwick/raw-sinatra-boilerplate/test/business_logic_test_helper.rb:2:in `<top (required)>'
from /home/travis/build/agerwick/raw-sinatra-boilerplate/test/business_logic/test_lib_core.rb:1:in `require_relative'
from /home/travis/build/agerwick/raw-sinatra-boilerplate/test/business_logic/test_lib_core.rb:1:in `<top (required)>'
from /home/travis/.rvm/rubies/ruby-2.0.0-p594/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /home/travis/.rvm/rubies/ruby-2.0.0-p594/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /home/travis/.rvm/gems/ruby-2.0.0-p594/gems/rake-10.2.2/lib/rake/rake_test_loader.rb:15:in `block in <main>'
from /home/travis/.rvm/gems/ruby-2.0.0-p594/gems/rake-10.2.2/lib/rake/rake_test_loader.rb:4:in `select'
from /home/travis/.rvm/gems/ruby-2.0.0-p594/gems/rake-10.2.2/lib/rake/rake_test_loader.rb:4:in `<main>'
rake aborted!
Command failed with status (1): [ruby -I"lib" -I"/home/travis/.rvm/gems/ruby-2.0.0-p594/gems/rake-10.2.2/lib" "/home/travis/.rvm/gems/ruby-2.0.0-p594/gems/rake-10.2.2/lib/rake/rake_test_loader.rb" "test/business_logic/test_lib_core.rb" "test/database_calls/test_availability.rb" "test/acceptance/test_hello.rb" "test/acceptance/test_welcome.rb" "test/requests/test_index.rb" ]
/home/travis/.rvm/gems/ruby-2.0.0-p594/bin/ruby_executable_hooks:15:in `eval'
/home/travis/.rvm/gems/ruby-2.0.0-p594/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => all
(See full trace by running task with --trace)
The command "rake all" exited with 1.
Done. Your build exited with 1.
最佳答案
看起来 codeclimate-test-reporter
gem 无法在运行时加载,这似乎是捆绑程序问题。
您应该尝试将 rake all
更改为 bundle exec rake all
关于travis-ci - 将 codeclimate 与 travis-ci 集成,travis 始终无法加载 codeclimate-test-reporter,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26953315/
这是有问题的公共(public)存储库:https://travis-ci.org/agerwick/raw-sinatra-boilerplate 我按照此处的建议集成了 codeclimate 的
我尝试通过阅读 Codeclimate readme docs 通过 docker 安装 Codeclimate . 为了在本地测试Codeclimate。我创建了一个新文件夹并放入了 hello.p
我们正在将 CodeClimate 添加到项目中,但我们的 React 组件中的 render 函数遇到了许多方法行错误, 示例:- Function render has 78 lines of c
我使用 React 和 Flux 来开发我的前端 Web 应用程序: 所以我这样定义常量: /js/constants/AppConstants.js const KeyMirror = requir
我正面临以下问题,试图在 .travis.yml 上执行代码气候记者: Code Climate encountered an exception: CodeClimate::TestReporter
这是第一次失败 build .我忘记配置文件了。所以我再次添加它并重新提交。现在它不会再开火了。 我是否必须首先获得 CI(使用 Travis CI)才能成功测试它? 最佳答案 您可以按存储库右上角的
Codeclimate docs 中无处可寻写了如何指定覆盖格式化程序。但是当我试图将报道发送到 Codeclimate 时: ./cc-test-reporter before-build ./cc
我正在尝试为 GitLab 中的合并请求管道激活代码环境报告。 CodeClimate 分析器正在运行,但当我添加一些错误代码时没有显示任何警告。可能有一些我遗漏的配置。 我已将以下内容添加到项目 r
我在新项目中遇到 codeclimate-test-reporter 和 Travis CI 的问题。 Travis CI 上的覆盖率分析与本地完全不同。具体来说,本地的 LOC 是 56(这是准确的
寻找一些关于这些 codeclimate ESLINT 问题的清晰度。他们缺少有关 http://eslint.org/docs/rules/ 的文档. 我对是否将它们“排除”或从 .eslintrc
在我的 stylelintrc.js 中 模块. 导出 = { “延伸”:[ “stylelint-配置-标准”, “stylelint-config-css-modules”, ], “插件”:[
我试图让我的 Travis CI 将测试覆盖率数据发送到 Code Climate 服务,但有关 Code Climate 和 Travis CI 的文档没有详细描述如何使用 Python 执行此操作
我是一名优秀的程序员,十分优秀!