捆绑包配置中的URI :: InvalidURIError

时间:2019-11-20 14:37:18

标签: ruby bundler

运行包配置时出现以下错误 捆绑软件安装中出现类似错误


[ec2-user@683b415616c8 platform-bootstrap-omnibus]$ bundle config
Settings are listed in order of priority. The top value will be used.
mirror.https://rubygems.org/: "https://ehteshaam.kazi/
/home/ec2-user/.rvm/rubies/ruby-2.4.2/lib/ruby/2.4.0/uri/rfc3986_parser.rb:67:in `split': bad URI(is not URI?): https://rubygems.org/: "https://ehteshaam.kazi/ (URI::InvalidURIError)
    from /home/ec2-user/.rvm/rubies/ruby-2.4.2/lib/ruby/2.4.0/uri/rfc3986_parser.rb:73:in `parse'
    from /home/ec2-user/.rvm/rubies/ruby-2.4.2/lib/ruby/2.4.0/uri/common.rb:231:in `parse'
    from /home/ec2-user/.rvm/rubies/ruby-2.4.2/lib/ruby/2.4.0/uri/common.rb:737:in `URI'
    from /home/ec2-user/.rvm/gems/ruby-2.4.2/gems/bundler-1.17.1/lib/bundler/settings.rb:456:in `normalize_uri'
    from /home/ec2-user/.rvm/gems/ruby-2.4.2/gems/bundler-1.17.1/lib/bundler/settings.rb:307:in `key_for'
    from /home/ec2-user/.rvm/gems/ruby-2.4.2/gems/bundler-1.17.1/lib/bundler/settings.rb:199:in `pretty_values_for'
    from /home/ec2-user/.rvm/gems/ruby-2.4.2/gems/bundler-1.17.1/lib/bundler/cli/config.rb:109:in `block in show_pretty_values_for'
    from /home/ec2-user/.rvm/gems/ruby-2.4.2/gems/bundler-1.17.1/lib/bundler/vendor/thor/lib/thor/shell.rb:68:in `with_padding'
    from /home/ec2-user/.rvm/gems/ruby-2.4.2/gems/bundler-1.17.1/lib/bundler/cli/config.rb:108:in `show_pretty_values_for'
    from /home/ec2-user/.rvm/gems/ruby-2.4.2/gems/bundler-1.17.1/lib/bundler/cli/config.rb:66:in `block in confirm_all'
    from /home/ec2-user/.rvm/gems/ruby-2.4.2/gems/bundler-1.17.1/lib/bundler/cli/config.rb:64:in `each'
    from /home/ec2-user/.rvm/gems/ruby-2.4.2/gems/bundler-1.17.1/lib/bundler/cli/config.rb:64:in `confirm_all'
    from /home/ec2-user/.rvm/gems/ruby-2.4.2/gems/bundler-1.17.1/lib/bundler/cli/config.rb:21:in `run'
    from /home/ec2-user/.rvm/gems/ruby-2.4.2/gems/bundler-1.17.1/lib/bundler/cli.rb:481:in `config'
    from /home/ec2-user/.rvm/gems/ruby-2.4.2/gems/bundler-1.17.1/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
    from /home/ec2-user/.rvm/gems/ruby-2.4.2/gems/bundler-1.17.1/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
    from /home/ec2-user/.rvm/gems/ruby-2.4.2/gems/bundler-1.17.1/lib/bundler/vendor/thor/lib/thor.rb:387:in `dispatch'
    from /home/ec2-user/.rvm/gems/ruby-2.4.2/gems/bundler-1.17.1/lib/bundler/cli.rb:27:in `dispatch'
    from /home/ec2-user/.rvm/gems/ruby-2.4.2/gems/bundler-1.17.1/lib/bundler/vendor/thor/lib/thor/base.rb:466:in `start'
    from /home/ec2-user/.rvm/gems/ruby-2.4.2/gems/bundler-1.17.1/lib/bundler/cli.rb:18:in `start'
    from /home/ec2-user/.rvm/gems/ruby-2.4.2/gems/bundler-1.17.1/exe/bundle:30:in `block in <top (required)>'
    from /home/ec2-user/.rvm/gems/ruby-2.4.2/gems/bundler-1.17.1/lib/bundler/friendly_errors.rb:124:in `with_friendly_errors'
    from /home/ec2-user/.rvm/gems/ruby-2.4.2/gems/bundler-1.17.1/exe/bundle:22:in `<top (required)>'
    from /home/ec2-user/.rvm/gems/ruby-2.4.2/bin/bundle:23:in `load'
    from /home/ec2-user/.rvm/gems/ruby-2.4.2/bin/bundle:23:in `<main>'
    from /home/ec2-user/.rvm/gems/ruby-2.4.2/bin/ruby_executable_hooks:15:in `eval'
    from /home/ec2-user/.rvm/gems/ruby-2.4.2/bin/ruby_executable_hooks:15:in `<main>'

镜子似乎设置正确


[ec2-user@683b415616c8 platform-bootstrap-omnibus]$ bundle config mirror
Settings for `mirror` in order of priority. The top value will be used
Set for the current user (/home/ec2-user/.bundle/config): "https://rubygems.org https://xyzusername:pqrpassword@artifactory.someenvironmenbt.platform.somecompany.com/artifactory/api/gems/virtual-rubygems"

问题是其中存在多个带​​有错误的镜像集。 清理〜/ .bundle / config并再次设置镜像。这解决了问题。

1 个答案:

答案 0 :(得分:1)

在〜/ .bundle / config中查找镜像 清理。 再次设置镜子。 运行捆绑安装。