“包安装”不断要求我安装单独的宝石
我在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)
错误信息,我需要进行配置,以便“包安装”只是工作,因为它在我的本地机器上还有什么呢?
开始时它告诉你gemfile是由较早版本的bundler创建的。尝试更新捆绑因为它表明:
gem install bundler
您还分别具有与小豆宝石的问题。它说它可能已损坏。尝试并重新安装:
gem install roo -v '2.5.1'
然后再次运行bundle install。
我尝试使用“gem install bundler”升级捆绑软件,但没有解决问题。我意识到我可以运行命令“gem install roo -v'2.5.1'”,但每当我添加一个新的gem(roo只是一个示例)时,我都会要求单独安装它。我没有要求在我的Mac上执行此操作。这是为什么? – Dave
可能是一个权限问题。你得到的另一个错误是这行:“远程:sudo:没有tty礼物,没有指定askpass程序”。显然这意味着你需要输入一个密码来安装,但bundler不会输入密码,所以它只是跳转。试试你的远程命令行“sudo visudo”并将其内容更改为“username ALL = NOPASSWD:”。这应该阻止它要求输入密码,捆绑器应该能够通过。 –
visudo命令打开sudoers的配置文件,并允许您更改权限和密码。通常它会设置为始终询问密码,但由于bundler存在问题,因此可以将其关闭。 –
你可以显示你的Gemfile和/ opt/scripts/pushrt吗?我怀疑你的Gemfile中定义的组或者传递给bundler的选项可能存在问题。 – Brian