【问题标题】:settings env variables on travis and ruby (Gem::LoadError)在 travis 和 ruby​​ 上设置环境变量 (Gem::LoadError)
【发布时间】:2013-08-21 09:31:53
【问题描述】:

我正在为我的一个网络应用程序使用 travis,但我有一些密钥,所以我需要通过关注 here 将它们存储为 travis 环境变量。

但是当我尝试以下命令时:

travis encrypt -r travis_username/app_name EMAIL_HOST=localhost.com

我遇到了奇怪的错误:

/usr/lib/ruby/vendor_ruby/1.8/rubygems/dependency.rb:247:in `to_specs': Could not find travis (>= 0) amongst [addressable-2.3.5, backports-3.3.3, bundler-1.3.5, bundler-unload-1.0.1, coderay-1.0.9, ethon-0.6.0, faraday-0.8.8, faraday_middleware-0.9.0, ffi-1.9.0, gh-0.11.3, highline-1.6.19, launchy-2.3.0, method_source-0.8.2, mime-types-1.24, multi_json-1.7.9, multipart-post-1.2.0, net-http-persistent-2.9, net-http-pipeline-1.0.1, netrc-0.7.7, pry-0.9.12.2, pusher-client-0.3.1, rake-10.1.0, ruby-hmac-0.4.0, rubygems-bundler-1.2.2, rubygems-update-2.0.7, rvm-1.11.3.8, slop-3.4.6, typhoeus-0.6.4, websocket-1.0.7, websocket-native-1.0.0] (Gem::LoadError)
    from /usr/lib/ruby/vendor_ruby/1.8/rubygems/dependency.rb:256:in `to_spec'
    from /usr/lib/ruby/vendor_ruby/1.8/rubygems.rb:1208:in `gem'
    from /usr/local/bin/travis:18

任何人都可以请我朝正确的方向移动并完成上述安装工作吗?

【问题讨论】:

    标签: ruby rubygems environment-variables travis-ci


    【解决方案1】:

    您需要安装travis gem:

    gem install travis

    或将其添加到您当前正在使用的项目的 gemfile 中:

    gem "travis", "~> 1.5.2"

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-09-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多