项目

一般

简介

Bitnami执行bundle install出错。ArgumentError: wrong number of arguments (given 4, expected 1)如何解决?

1

小 龙
3 个月 之前增加

ArgumentError: wrong number of arguments (given 4, expected 1)
D:/Bitnami/bitnami/ruby/lib/ruby/gems/2.5.0/gems/psych-4.0.1/lib/psych.rb:323:in `safe_load’
D:/Bitnami/bitnami/ruby/lib/ruby/site_ruby/2.5.0/rubygems/safe_yaml.rb:31:in `safe_load’
D:/Bitnami/bitnami/ruby/lib/ruby/site_ruby/2.5.0/rubygems/package.rb:504:in `block (2 levels) in read_checksums’
D:/Bitnami/bitnami/ruby/lib/ruby/site_ruby/2.5.0/rubygems/package.rb:503:in `wrap’
D:/Bitnami/bitnami/ruby/lib/ruby/site_ruby/2.5.0/rubygems/package.rb:503:in `block in read_checksums’
D:/Bitnami/bitnami/ruby/lib/ruby/site_ruby/2.5.0/rubygems/package/tar_reader.rb:116:in `seek’
D:/Bitnami/bitnami/ruby/lib/ruby/site_ruby/2.5.0/rubygems/package.rb:502:in `read_checksums’
D:/Bitnami/bitnami/ruby/lib/ruby/site_ruby/2.5.0/rubygems/package.rb:555:in `block (2 levels) in verify’
D:/Bitnami/bitnami/ruby/lib/ruby/site_ruby/2.5.0/rubygems/package/tar_reader.rb:29:in `new’
D:/Bitnami/bitnami/ruby/lib/ruby/site_ruby/2.5.0/rubygems/package.rb:554:in `block in verify’
D:/Bitnami/bitnami/ruby/lib/ruby/site_ruby/2.5.0/rubygems/package/file_source.rb:30:in `open’
D:/Bitnami/bitnami/ruby/lib/ruby/site_ruby/2.5.0/rubygems/package/file_source.rb:30:in `with_read_io’
D:/Bitnami/bitnami/ruby/lib/ruby/site_ruby/2.5.0/rubygems/package.rb:553:in `verify’
D:/Bitnami/bitnami/ruby/lib/ruby/site_ruby/2.5.0/rubygems/package.rb:534:in `spec’
D:/Bitnami/bitnami/ruby/lib/ruby/site_ruby/2.5.0/bundler/rubygems_integration.rb:307:in `spec_from_gem’
D:/Bitnami/bitnami/ruby/lib/ruby/site_ruby/2.5.0/bundler/source/rubygems.rb:368:in `block in cached_specs’
D:/Bitnami/bitnami/ruby/lib/ruby/site_ruby/2.5.0/bundler/source/rubygems.rb:366:in `each’
D:/Bitnami/bitnami/ruby/lib/ruby/site_ruby/2.5.0/bundler/source/rubygems.rb:366:in `cached_specs’
D:/Bitnami/bitnami/ruby/lib/ruby/site_ruby/2.5.0/bundler/source/rubygems.rb:90:in `specs’
D:/Bitnami/bitnami/ruby/lib/ruby/site_ruby/2.5.0/bundler/definition.rb:274:in `block (2 levels) in index’
D:/Bitnami/bitnami/ruby/lib/ruby/site_ruby/2.5.0/bundler/definition.rb:272:in `each’
D:/Bitnami/bitnami/ruby/lib/ruby/site_ruby/2.5.0/bundler/definition.rb:272:in `block in index’
D:/Bitnami/bitnami/ruby/lib/ruby/site_ruby/2.5.0/bundler/index.rb:11:in `build’
D:/Bitnami/bitnami/ruby/lib/ruby/site_ruby/2.5.0/bundler/definition.rb:269:in `index’
D:/Bitnami/bitnami/ruby/lib/ruby/site_ruby/2.5.0/bundler/definition.rb:259:in `resolve’
D:/Bitnami/bitnami/ruby/lib/ruby/site_ruby/2.5.0/bundler/definition.rb:171:in `specs’
D:/Bitnami/bitnami/ruby/lib/ruby/site_ruby/2.5.0/bundler/definition.rb:159:in `resolve_remotely!'
D:/Bitnami/bitnami/ruby/lib/ruby/site_ruby/2.5.0/bundler/installer.rb:287:in `resolve_if_needed’
D:/Bitnami/bitnami/ruby/lib/ruby/site_ruby/2.5.0/bundler/installer.rb:83:in `block in run’
D:/Bitnami/bitnami/ruby/lib/ruby/site_ruby/2.5.0/bundler/process_lock.rb:12:in `block in lock’
D:/Bitnami/bitnami/ruby/lib/ruby/site_ruby/2.5.0/bundler/process_lock.rb:9:in `open’
D:/Bitnami/bitnami/ruby/lib/ruby/site_ruby/2.5.0/bundler/process_lock.rb:9:in `lock’
D:/Bitnami/bitnami/ruby/lib/ruby/site_ruby/2.5.0/bundler/installer.rb:72:in `run’
D:/Bitnami/bitnami/ruby/lib/ruby/site_ruby/2.5.0/bundler/installer.rb:25:in `install’
D:/Bitnami/bitnami/ruby/lib/ruby/site_ruby/2.5.0/bundler/cli/install.rb:65:in `run’
D:/Bitnami/bitnami/ruby/lib/ruby/site_ruby/2.5.0/bundler/cli.rb:224:in `block in install’
D:/Bitnami/bitnami/ruby/lib/ruby/site_ruby/2.5.0/bundler/settings.rb:136:in `temporary’
D:/Bitnami/bitnami/ruby/lib/ruby/site_ruby/2.5.0/bundler/cli.rb:223:in `install’
D:/Bitnami/bitnami/ruby/lib/ruby/site_ruby/2.5.0/bundler/vendor/thor/lib/thor/command.rb:27:in `run’
D:/Bitnami/bitnami/ruby/lib/ruby/site_ruby/2.5.0/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command’
D:/Bitnami/bitnami/ruby/lib/ruby/site_ruby/2.5.0/bundler/vendor/thor/lib/thor.rb:387:in `dispatch’
D:/Bitnami/bitnami/ruby/lib/ruby/site_ruby/2.5.0/bundler/cli.rb:27:in `dispatch’
D:/Bitnami/bitnami/ruby/lib/ruby/site_ruby/2.5.0/bundler/vendor/thor/lib/thor/base.rb:466:in `start’
D:/Bitnami/bitnami/ruby/lib/ruby/site_ruby/2.5.0/bundler/cli.rb:18:in `start’
D:/Bitnami/bitnami/ruby/lib/ruby/gems/2.5.0/gems/bundler-1.16.6/exe/bundle:30:in `block in <top (required)>'
D:/Bitnami/bitnami/ruby/lib/ruby/site_ruby/2.5.0/bundler/friendly_errors.rb:124:in `with_friendly_errors’
D:/Bitnami/bitnami/ruby/lib/ruby/gems/2.5.0/gems/bundler-1.16.6/exe/bundle:22:in `<top (required)>'
D:/Bitnami/bitnami/ruby/bin/bundle:23:in `load’
D:/Bitnami/bitnami/ruby/bin/bundle:23:in `<main>'

gem更新配置出错导致,应在国内源的情况下执行更新,不会出现此问题。

解答 (1)

0

Chen Snowman
3 个月 之前增加

这是个语法错误,说明你的命令敲错了。

肯定不是命令的问题,因为我执行gem操作也是这么显示的
D:\Bitnami\bitnami\apps\redmine\htdocs>gem update
Updating installed gems
Updating bundler
ERROR: While executing gem ... (ArgumentError)
wrong number of arguments (given 4, expected 1)

D:\Bitnami\bitnami\apps\redmine\htdocs>gem check
Checking gems...

ERROR: While executing gem ... (ArgumentError)
wrong number of arguments (given 4, expected 1)

D:\Bitnami\bitnami\apps\redmine\htdocs>

尝试备份下Gemfile.lock ,然后删除它。重新bundle install呢

    (1-1/1)