与travis ci和ruby 1.8.7的gem路径问题

时间:2014-04-30 04:23:53

标签: ruby bundler travis-ci

我第一次使用travis,并试图理解为什么我的捆绑安装的宝石不适用于ruby 1.8.7

的Gemfile

source 'https://rubygems.org'
gem 'rspec'

.travis.yml

language: ruby
script: bundle exec rspec
rvm:
- 1.8.7
- 1.9.3
- 2.0.0

travis输出

$ rvm use 1.8.7 --install --binary --fuzzy
Using /home/travis/.rvm/gems/ree-1.8.7-2012.02
$ export BUNDLE_GEMFILE=$PWD/Gemfile
$ ruby --version
ruby 1.8.7 (2013-06-27 MBARI 8/0x6770 on patchlevel 374) [x86_64-linux], MBARI 0x6770, Ruby Enterprise Edition 2012.02
$ rvm --version
rvm 1.25.20 (version) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/]
$ gem --version
2.0.14
$ bundle --version
Bundler version 1.6.1
$ bundle install --deployment
Fetching gem metadata from https://rubygems.org/...
Fetching additional metadata from https://rubygems.org/..
Installing diff-lcs 1.2.5
Installing rspec-core 2.14.8
Installing rspec-expectations 2.14.5
Installing rspec-mocks 2.14.6
Installing rspec 2.14.1
Using bundler 1.6.1
Your bundle is complete!
It was installed into ./vendor/bundle
$ bundle exec rspec
Could not find diff-lcs-1.2.5 in any of the sources
Run `bundle install` to install missing gems.

2 个答案:

答案 0 :(得分:1)

根据其他参考资料,建议的.yml文件为:

language: ruby
script: "bundle exec rspec"
rvm:
- 1.8.7
- 1.9.3
- 2.0.0

请参阅:https://coderwall.com/p/x8exja

答案 1 :(得分:0)

看起来像Travis-ci中的错误:https://github.com/travis-ci/travis-ci/issues/2253

似乎有一种解决方法,但它没有尝试过。