Travis-CI“命令" bundle exec rake"以1退出." +神秘404错误 [英] Travis-CI "The command "bundle exec rake" exited with 1." + mystery 404 error

查看:124
本文介绍了Travis-CI“命令" bundle exec rake"以1退出." +神秘404错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

bundle exec rake本地上可以很好地运行所有测试.但是,Travis CI一直对Problem accessing /authentication感到不快,没有提供更多信息.这是失败的构建之一: https://travis-ci.org/Nase00/Horizo​​n/builds/48094102 对于我一生,我无法弄清楚是什么原因导致Travis尝试运行bundle exec rake时出现身份验证错误.

bundle exec rake runs all tests perfectly fine locally. However, Travis CI keeps blowing up with Problem accessing /authentication without giving much more info to go on. Here's one of the failed builds: https://travis-ci.org/Nase00/Horizon/builds/48094102 For the life of me, I cannot figure out what is causing an authentication error when Travis tries to run bundle exec rake.

这是项目仓库: https://github.com/Nase00/Horizo​​n

推荐答案

我不确定Neo4j Travis使用哪个版本(更新:,他们使用1.9.4,不支持),但是我我会猜测它比Neo4j.rb支持的版本还旧.我是核心维护者之一,并建立了Neo4j 2.2 auth支持,这使您很烦恼,但是我使用不同的版本对其进行了测试,可以回溯到2.1早期的版本,也没有遇到任何麻烦.

I'm not sure what version of Neo4j Travis uses (UPDATE: they use 1.9.4, not supported) but I'm going to guess that it's a bit older than what Neo4j.rb supports. I'm one of the core maintainers and built the Neo4j 2.2 auth support that's fouling you up, but I tested it with different versions, going back to the early 2.1 subversions and had no trouble.

最佳做法是完全不使用Travis的Neo4j.而是将Travis配置为安装用于开发和生产的相同版本的数据库.另外,安装Neo的rake任务还会在2.2中禁用auth,因此您根本不必处理它.这并不是说我们反对auth,而是认为rake install和config任务是开发/测试环境(而非生产环境)的便捷功能,因此没有auth似乎是合理的默认设置.

The best practice is to not use Travis's Neo4j at all. Instead, configure Travis to install the same version of the database you're using for dev and production. As a bonus, the rake task that installs Neo also disables auth in 2.2, so you don't have to deal with that at all. It's not that we're against auth, it's that we think of the rake install and config tasks as convenient features for dev/test environment, not production, so no auth seems like a reasonable default.

在我们的.travis.yml文件中发挥最大作用,以了解我们如何进行安装. https://github.com/neo4jrb/neo4j/blob/master/.travis .yml .可以解决您问题的摘要:

Take a peak at our .travis.yml file to see how we do the installation. https://github.com/neo4jrb/neo4j/blob/master/.travis.yml. An abstract that'll solve your issue:

script:
  - "bundle exec rake neo4j:install['community-2.2.0-M02'] neo4j:start default --trace"
language: ruby
rvm:
  - 2.0.0

community-2.2.0-M02交换为要使用的任何版本.我不得不再次检查一下,但从我记得的情况来看,我们与2.1.2之前的版本兼容.对于未在我们的文档中发布此内容,我深表歉意.

Swap the community-2.2.0-M02 for whatever version you want to use. I'd have to check again but from what I remember, we are compatible with versions as far back as 2.1.2. I apologize for this not being posted in our docs -- it should be.

非常强烈建议将Ruby 2.2.0与Neo4j.rb结合使用.在Cypher查询期间,我们会生成很多符号,否则这些符号将不会被垃圾收集.

I very strongly recommend using Ruby 2.2.0 with Neo4j.rb. We generate a lot of symbols during Cypher queries that won't be garbage collected otherwise.

编辑以获取更多信息

auth模块要做的第一件事是检查身份验证REST端点的存在.在我测试过的所有Neo4j版本中,它都没有给出这样的错误,只是返回了一个空的正文,我们将其解释为不支持或禁用auth的标志.

The very first thing the auth module does is check for the presence of the authentication REST endpoint. In all of the versions of Neo4j I tested, it didn't give an error like that, it just returned an empty body, which we interpret as a sign that auth is either unsupported or disabled.

后果修改

Travis支持确认其提供的Neo4j版本是1.9.4.

Travis support confirmed their provided Neo4j version is 1.9.4.

这篇关于Travis-CI“命令" bundle exec rake"以1退出." +神秘404错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆