"捆绑安装"一直要我安装个人宝石

时间:2016-12-14 16:22:27

标签: ruby-on-rails ruby-on-rails-4 rubygems install bundle

我在Ubuntu 14.04 Linux上运行Ruby v 2.3 ...

myusername@mymachine:~$ ruby -v
ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-linux]

最近似乎每当我从远程脚本运行“bundle install”时,我总是被要求单独安装gem。当我在Mac Sierra上本地开发时,这不会发生。请注意下面的错误消息

localhost:runtrax davea$ sh /opt/scripts/pushrt "Corrected processing with regards to RockNRoll site."
[master 0def218] Corrected processing with regards to RockNRoll site.
 11 files changed, 108 insertions(+), 46 deletions(-)
Counting objects: 21, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (21/21), done.
Writing objects: 100% (21/21), 3.80 KiB | 0 bytes/s, done.
Total 21 (delta 18), reused 0 (delta 0)
To git@gitlab.com:myusername/myproject.git
   891a010..0def218  master -> master
Counting objects: 21, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (21/21), done.
Writing objects: 100% (21/21), 3.80 KiB | 0 bytes/s, done.
Total 21 (delta 18), reused 0 (delta 0)
remote: Master ref received.  Deploying master branch to production...
remote: Warning: the running version of Bundler (1.13.5) is older than the version that created the lockfile (1.13.6). We suggest you upgrade to the latest version of Bundler by   running `gem install bundler`.
remote: Fetching gem metadata from https://rubygems.org/........
remote: Fetching version metadata from https://rubygems.org/..
remote: Fetching dependency metadata from https://rubygems.org/.
remote: Using rake 11.3.0
remote: Using Ascii85 1.0.2
remote: Using i18n 0.7.0
remote: Using json 1.8.3
remote: Using minitest 5.9.1
remote: Using thread_safe 0.3.5
remote: Using builder 3.2.2
remote: Using erubis 2.7.0
remote: Using mini_portile2 2.1.0
remote: Using rack 1.6.4
remote: Using mime-types-data 3.2016.0521
remote: Using arel 6.0.3
remote: Using addressable 2.4.0
remote: Using afm 0.2.2
remote: Using execjs 2.7.0
remote: Using sass 3.4.22
remote: Using byebug 9.0.6
remote: Using chronic 0.10.2
remote: Using chunky_png 1.3.7
remote: Using coffee-script-source 1.10.0
remote: Using thor 0.19.1
remote: Using multi_json 1.12.1
remote: Using rb-fsevent 0.9.7
remote: Using ffi 1.9.14
remote: Using concurrent-ruby 1.0.2
remote: Using tilt 2.0.5
remote: Using debug_inspector 0.0.2
remote: Using unf_ext 0.0.7.2
remote: Using multipart-post 2.0.0
remote: Using hashery 2.1.2
remote: Using hashie 3.4.6
remote: Using turbolinks-source 5.0.0
remote: Using jwt 1.5.6
remote: Using kgio 2.10.0
remote: Using net-http-digest_auth 1.4
remote: Using net-http-persistent 2.9.4
remote: Using ntlm-http 0.1.1
remote: Using webrobots 0.1.2
remote: Using multi_xml 0.5.5
remote: Using net-telnet 0.1.1
remote: Using oauth 0.5.1
remote: Using ruby-rc4 0.1.5
remote: Using ttfunk 1.4.0
remote: Using pg 0.19.0
remote: Using puma 3.6.0
remote: Using bundler 1.13.5
remote: Using raindrops 0.17.0
remote: Using rubyzip 1.2.0
remote: Using ruby-ole 1.2.12
remote: Using socksify 1.7.0
remote: Using tor 0.1.2
remote: Using will_paginate 3.1.5
remote: Using tzinfo 1.2.2
remote: Using nokogiri 1.6.8.1
remote: Using rack-test 0.6.3
remote: Using mime-types 3.1
remote: Using autoprefixer-rails 6.5.1
remote: Using uglifier 3.0.2
remote: Using compass-import-once 1.0.5
remote: Using whenever 0.9.7
remote: Using coffee-script 2.4.1
remote: Using compass-core 1.0.3
remote: Using rb-inotify 0.9.7
remote: Using sprockets 3.7.0
remote: Using unf 0.1.4
remote: Using faraday 0.9.2
remote: Using omniauth 1.3.1
remote: Using turbolinks 5.0.1
remote: Using pdf-reader 1.4.0
remote: Using postgresql 1.0.0
remote: Using unicorn 5.1.0
remote: Using spreadsheet 1.1.4
remote: Using tor_requests 0.6.0
remote: Using activesupport 4.2.7.1
remote: Using loofah 2.0.3
remote: sudo: no tty present and no askpass program specified
remote: Using w3c_validators 1.2
remote: Using mail 2.6.4
remote: Using bootstrap-sass 3.3.7
remote: Using compass 1.0.3
remote: Using listen 3.0.8
remote: Using domain_name 0.5.20160826
remote: Using oauth2 1.2.0
remote: Using omniauth-oauth 1.1.0
remote: Using rails-deprecated_sanitizer 1.0.3
remote: Using globalid 0.3.7
remote: Using activemodel 4.2.7.1
remote: Using jbuilder 2.6.0
remote: Using pundit 1.1.0
remote: Using spring 2.0.0
remote: Using rails-html-sanitizer 1.0.3
remote: Bundler::GemspecError: Could not read gem at
remote: /usr/local/rvm/gems/ruby-2.3.0/cache/roo-2.5.1.gem. It may be corrupted.
remote: An error occurred while installing roo (2.5.1), and Bundler cannot continue.
remote: Make sure that `gem install roo -v '2.5.1'` succeeds before bundling.
remote: rake aborted!
remote: Bundler::GemNotFound: Your bundle is locked to roo (2.5.1), but that version could not be found in any of the sources listed in your Gemfile. If you haven't changed    sources, that means the author of roo (2.5.1) has removed it. You'll need to update your bundle to a different version of roo (2.5.1) that hasn't been removed in order to  install.
remote: /usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.13.5/lib/bundler/definition.rb:179:in `rescue in specs'
remote: /usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.13.5/lib/bundler/definition.rb:173:in `specs'
remote: /usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.13.5/lib/bundler/definition.rb:233:in `specs_for'
remote: /usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.13.5/lib/bundler/definition.rb:222:in `requested_specs'
remote: /usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.13.5/lib/bundler/runtime.rb:118:in `block in definition_method'
remote: /usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.13.5/lib/bundler/runtime.rb:19:in `setup'
remote: /usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.13.5/lib/bundler.rb:99:in `setup'
remote: /usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.13.5/lib/bundler/setup.rb:20:in `<top (required)>'
remote: /home/rails/myproject/config/boot.rb:3:in `<top (required)>'
remote: /home/rails/myproject/config/application.rb:1:in `<top (required)>'
remote: /home/rails/myproject/Rakefile:4:in `<top (required)>'
remote: /usr/local/rvm/gems/ruby-2.3.0/gems/rake-11.3.0/exe/rake:27:in `<top (required)>'
remote: /usr/local/rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in `eval'
remote: /usr/local/rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in `<main>'
remote: Bundler::GemNotFound: Could not find roo-2.5.1 in any of the sources
remote: /usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.13.5/lib/bundler/spec_set.rb:95:in `block in materialize'
remote: /usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.13.5/lib/bundler/spec_set.rb:88:in `map!  
remote: /usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.13.5/lib/bundler/spec_set.rb:88:in `materialize'
remote: /usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.13.5/lib/bundler/definition.rb:174:in `specs'
remote: /usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.13.5/lib/bundler/definition.rb:233:in `specs_for'
remote: /usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.13.5/lib/bundler/definition.rb:222:in `requested_specs'
remote: /usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.13.5/lib/bundler/runtime.rb:118:in `block in definition_method'
remote: /usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.13.5/lib/bundler/runtime.rb:19:in `setup'
remote: /usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.13.5/lib/bundler.rb:99:in `setup'
remote: /usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.13.5/lib/bundler/setup.rb:20:in `<top (required)>'
remote: /home/rails/myproject/config/boot.rb:3:in `<top (required)>'
remote: /home/rails/myproject/config/application.rb:1:in `<top (required)>'
remote: /home/rails/myproject/Rakefile:4:in `<top (required)>'
remote: /usr/local/rvm/gems/ruby-2.3.0/gems/rake-11.3.0/exe/rake:27:in `<top (required)>'
remote: /usr/local/rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in `eval'
remote: /usr/local/rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in `<main>'
remote: (See full trace by running task with --trace)

我还需要配置什么才能使“捆绑安装”正常工作,就像在本地计算机上一样?

1 个答案:

答案 0 :(得分:1)

一开始它告诉你gemfile是由旧版本的bundler创建的。尝试按照它的建议更新bundler:

$USER_NAME

你也遇到了roo gem的问题。它说它可能已损坏。再次尝试安装:

s/…/…/

然后再次运行bundle install。