2016-12-14 69 views
0

我在Ubuntu 14.04 Linux上運行的Ruby V 2.3 ...「包安裝」不斷要求我安裝單獨的寶石

[email protected]:~$ ruby -v 
ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-linux] 

最近似乎每當我跑「包安裝」從遠程腳本,我總是要求單獨安裝寶石。當我在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 [email protected]: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) 

錯誤信息,我需要進行配置,以便「包安裝」只是工作,因爲它在我的本地機器上還有什麼呢?

+0

你可以顯示你的Gemfile和/ opt/scripts/pushrt嗎?我懷疑你的Gemfile中定義的組或者傳遞給bundler的選項可能存在問題。 – Brian

回答

1

開始時它告訴你gemfile是由較早版本的bundler創建的。嘗試更新捆綁因爲它表明:

gem install bundler 

您還分別具有與小豆寶石的問題。它說它可能已損壞。嘗試並重新安裝:

gem install roo -v '2.5.1' 

然後再次運行bundle install。

+0

我嘗試使用「gem install bundler」升級捆綁軟件,但沒有解決問題。我意識到我可以運行命令「gem install roo -v'2.5.1'」,但每當我添加一個新的gem(roo只是一個示例)時,我都會要求單獨安裝它。我沒有要求在我的Mac上執行此操作。這是爲什麼? – Dave

+0

可能是一個權限問題。你得到的另一個錯誤是這行:「遠程:sudo:沒有tty禮物,沒有指定askpass程序」。顯然這意味着你需要輸入一個密碼來安裝,但bundler不會輸入密碼,所以它只是跳轉。試試你的遠程命令行「sudo visudo」並將其內容更改爲「username ALL = NOPASSWD:」。這應該阻止它要求輸入密碼,捆綁器應該能夠通過。 –

+0

visudo命令打開sudoers的配置文件,並允許您更改權限和密碼。通常它會設置爲始終詢問密碼,但由於bundler存在問題,因此可以將其關閉。 –