Ошибка при выполнении пакета exec - PullRequest
0 голосов
/ 01 ноября 2011

Я получаю эту ошибку при запуске bundle exec

/usr/lib/ruby/gems/1.8/gems/bundler-1.0.20/lib/bundler/cli.rb:344:in `exec': wrong number of arguments (ArgumentError)
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.20/lib/bundler/cli.rb:344:in `exec'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.20/lib/bundler/vendor/thor/task.rb:22:in `send'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.20/lib/bundler/vendor/thor/task.rb:22:in `run'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.20/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.20/lib/bundler/vendor/thor.rb:263:in `dispatch'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.20/lib/bundler/vendor/thor/base.rb:386:in `start'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.20/bin/bundle:13
from /usr/bin/bundle:19:in `load'
from /usr/bin/bundle:19

Строка кода внутри usr / lib / ruby ​​/ gems / 1.8 / gems / bundler-1.0.20 / lib / bundler / cli.rb ~ 344 была задана следующим образом. Кажется, есть какой-то аргумент, который он ищет !!!

 def exec(*)
  ARGV.shift # remove "exec"

  Bundler.setup

  begin
    # Run
    Kernel.exec(*ARGV)
  rescue Errno::EACCES
    Bundler.ui.error "bundler: not executable: #{ARGV.first}"
    exit 126
  rescue Errno::ENOENT
    Bundler.ui.error "bundler: command not found: #{ARGV.first}"
    Bundler.ui.warn  "Install missing gem executables with `bundle install`"
    exit 127
  end
end

desc "config NAME [VALUE]", "retrieve or set a configuration value"
long_desc <<-D
  Retrieves or sets a configuration value. If only parameter is provided, retrieve the value. If two parameters are provided, replace the
  existing value with the newly provided one.

  By default, setting a configuration value sets it for all projects
  on the machine.

  If a global setting is superceded by local configuration, this command
  will show the current value, as well as any superceded values and
  where they were specified.
D

1 Ответ

2 голосов
/ 01 ноября 2011

Если вы просто запускаете голый bundle exec без других параметров, строка:

Kernel.exec(*ARGV)

не будет достаточно информации для выполнения чего-либо. Вам необходимо предоставить команду вашему bundle exec, как показано здесь .

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...