Ruby on rails 4 命令cron\u 01\u set\u leader输出:bash:/usr/local/bin/bundle:没有这样的文件或目录

Ruby on rails 4 命令cron\u 01\u set\u leader输出:bash:/usr/local/bin/bundle:没有这样的文件或目录,ruby-on-rails-4,amazon-elastic-beanstalk,whenever,Ruby On Rails 4,Amazon Elastic Beanstalk,Whenever,在安装/配置elasticbeanstalk gem之后,在从本地repo运行git aws.push之后,我在EC2实例的/var/log/cfn-init.log中看到以下错误。 Iam使用aws弹性benastalk和导轨4 2014-10-21 08:08:37,602 [DEBUG] Running test for command cron_01_set_leader 2014-10-21 08:08:37,744 [DEBUG] Test command output: 2014

在安装/配置elasticbeanstalk gem之后,在从本地repo运行git aws.push之后,我在EC2实例的/var/log/cfn-init.log中看到以下错误。 Iam使用aws弹性benastalk和导轨4

2014-10-21 08:08:37,602 [DEBUG] Running test for command cron_01_set_leader
2014-10-21 08:08:37,744 [DEBUG] Test command output: 
2014-10-21 08:08:37,745 [DEBUG] Test for command cron_01_set_leader passed
2014-10-21 08:08:38,085 [ERROR] Command cron_01_set_leader (su -c "/usr/local/bin/bundle exec create_cron_leader --no-update" $EB_CONFIG_APP_USER) failed
2014-10-21 08:08:38,086 [DEBUG] Command cron_01_set_leader output: bash: /usr/local/bin/bundle: No such file or directory
回溯(最近一次呼叫最后一次):

我添加了弹性豆茎 下面是我的cron.config文件内容。。 你知道我做错了什么吗

    files:
  # Reload the on deployment
  /opt/elasticbeanstalk/hooks/appdeploy/post/10_reload_cron.sh:
    mode: "00700"
    owner: root
    group: root
    content: |
      #!/usr/bin/env bash
      . /opt/elasticbeanstalk/containerfiles/envvars
      cd $EB_CONFIG_APP_CURRENT
      su -c "/usr/local/bin/bundle exec setup_cron" $EB_CONFIG_APP_USER
  # Add Bundle to the PATH
  "/etc/profile.d/bundle.sh":
    mode: "000755"
    owner: root
    group: root
    content: |
      #!/usr/bin/env bash
      export PATH=$PATH:/usr/local/bin
    encoding: plain
container_commands:
  cron_01_set_leader:
    test: test ! -f /opt/elasticbeanstalk/containerfiles/.cron-setup-complete
    leader_only: true
    cwd: /var/app/ondeck
    command: su -c "/usr/local/bin/bundle exec create_cron_leader --no-update" $EB_CONFIG_APP_USER
  cron_02_write_cron_setup_complete_file:
    cwd: /opt/elasticbeanstalk/containerfiles
    command: touch .cron-setup-complete

您正在使用哪个解决方案堆栈?您能否给出确切的名称,比如“运行Ruby 2.1(Puma)的64位Amazon Linux 2014.03 v1.0.9”

我认为您需要将“/usr/local/bin/bundle”替换为用于解决方案堆栈的bundle的实际版本


您是否可以尝试使用“/usr/local/bin/bundle”安装的“bundle”?

问题也在++处提出。此外,bundle尚未添加到本地环境变量,因此是bundle的完整路径。话虽如此,我们需要更多信息。我正在使用64位Amazon Linux 2014.03 v1.0.4,运行Ruby 2.0(独立乘客版)。。我确实用了“bundle”,但它不起作用!您是否可以使用最新版本“64位Amazon Linux 2014.03 v1.0.9运行Ruby 2.0(独立乘客版)”以及“bundle”进行测试。。。不是“/usr/local/bin/bundle”?您是否有可能按照上述要求执行?v1.0.4似乎不可用-我能看到的最接近的版本是“64位Amazon Linux 2014.03上的2.0(乘客单机版)”。对,通过上面的检查,AWS EB的旧实例类型似乎不符合后来AWS EB实例的惯例。您需要将对“/usr/local/bin/bundle”的任何引用更改为“/usr/bin/bundle”。它们存在于两个主要位置:#./.ebextensions/cron.config#./config/schedule.rb