2017-01-31 11 views
0

私はRuby AppをBeanstalkで実行していますが、コマンドが以下のスクリプトを探しているためにrake tasksが実行されていません:Ruby AppとAWS Beanstalk rakeタスクがスクリプト "check-for-bundle"が見つからないため実行されません

/opt/elasticbeanstalk/support/scripts/check-for-bundle 

これは、エラーを示すログの一部である:

[2017-01-31T14:53:21.715Z] INFO [10750] - [Application update [email protected]/AppDeployStage0/AppDeployPreHook/12_db_migration.sh] : Starting activity... 
[2017-01-31T14:53:22.293Z] INFO [10750] - [Application update [email protected]/AppDeployStage0/AppDeployPreHook/12_db_migration.sh] : Completed activity. Result: 
    ++ /opt/elasticbeanstalk/bin/get-config container -k script_dir 
    + EB_SCRIPT_DIR=/opt/elasticbeanstalk/support/scripts 
    ++ /opt/elasticbeanstalk/bin/get-config container -k app_staging_dir 
    + EB_APP_STAGING_DIR=/var/app/ondeck 
    ++ /opt/elasticbeanstalk/bin/get-config container -k app_user 
    + EB_APP_USER=webapp 
    ++ /opt/elasticbeanstalk/bin/get-config container -k support_dir 
    + EB_SUPPORT_DIR=/opt/elasticbeanstalk/support 
    + . /opt/elasticbeanstalk/support/envvars 
    ++ export RACK_ENV=production 
    ++ RACK_ENV=production 
    ++ export RAILS_SKIP_ASSET_COMPILATION=false 
    ++ RAILS_SKIP_ASSET_COMPILATION=false 
    ++ export RAILS_SKIP_MIGRATIONS=false 
    ++ RAILS_SKIP_MIGRATIONS=false 
    ++ export BUNDLE_WITHOUT=test:development 
    ++ BUNDLE_WITHOUT=test:development 
    + RAKE_TASK=db:migrate 
    + . /opt/elasticbeanstalk/support/scripts/use-app-ruby.sh 
    ++ . /usr/local/share/chruby/chruby.sh 
    +++ CHRUBY_VERSION=0.3.9 
    +++ RUBIES=() 
    +++ for dir in '"$PREFIX/opt/rubies"' '"$HOME/.rubies"' 
    +++ [[ -d /opt/rubies ]] 
    ++++ ls -A /opt/rubies 
    +++ [[ -n ruby-1.9.3-p551 
    ruby-2.0.0-p648 
    ruby-2.1.10 
    ruby-2.2.5 
    ruby-2.3.1 
    ruby-current ]] 
    +++ RUBIES+=("$dir"/*) 
    +++ for dir in '"$PREFIX/opt/rubies"' '"$HOME/.rubies"' 
    +++ [[ -d /.rubies ]] 
    +++ unset dir 
    +++ cat /etc/elasticbeanstalk/.ruby_version 
    ++ chruby 2.3.1 
    ++ case "$1" in 
    ++ local dir match 
    ++ for dir in '"${RUBIES[@]}"' 
    ++ dir=/opt/rubies/ruby-1.9.3-p551 
    ++ case "${dir##*/}" in 
    ++ for dir in '"${RUBIES[@]}"' 
    ++ dir=/opt/rubies/ruby-2.0.0-p648 
    ++ case "${dir##*/}" in 
    ++ for dir in '"${RUBIES[@]}"' 
    ++ dir=/opt/rubies/ruby-2.1.10 
    ++ case "${dir##*/}" in 
    ++ for dir in '"${RUBIES[@]}"' 
    ++ dir=/opt/rubies/ruby-2.2.5 
    ++ case "${dir##*/}" in 
    ++ for dir in '"${RUBIES[@]}"' 
    ++ dir=/opt/rubies/ruby-2.3.1 
    ++ case "${dir##*/}" in 
    ++ match=/opt/rubies/ruby-2.3.1 
    ++ for dir in '"${RUBIES[@]}"' 
    ++ dir=/opt/rubies/ruby-current 
    ++ case "${dir##*/}" in 
    ++ [[ -z /opt/rubies/ruby-2.3.1 ]] 
    ++ shift 
    ++ chruby_use /opt/rubies/ruby-2.3.1 '' 
    ++ [[ ! -x /opt/rubies/ruby-2.3.1/bin/ruby ]] 
    ++ [[ -n '' ]] 
    ++ export RUBY_ROOT=/opt/rubies/ruby-2.3.1 
    ++ RUBY_ROOT=/opt/rubies/ruby-2.3.1 
    ++ export RUBYOPT= 
    ++ RUBYOPT= 
    ++ export PATH=/opt/rubies/ruby-2.3.1/bin:/opt/elasticbeanstalk/lib/ruby/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin 
    ++ PATH=/opt/rubies/ruby-2.3.1/bin:/opt/elasticbeanstalk/lib/ruby/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin 
    +++ /opt/rubies/ruby-2.3.1/bin/ruby - 
    ++ eval 'export RUBY_ENGINE=ruby; 
    export RUBY_VERSION=2.3.1; 
    export GEM_ROOT="/opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0";' 
    +++ export RUBY_ENGINE=ruby 
    +++ RUBY_ENGINE=ruby 
    +++ export RUBY_VERSION=2.3.1 
    +++ RUBY_VERSION=2.3.1 
    +++ export GEM_ROOT=/opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0 
    +++ GEM_ROOT=/opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0 
    ++ (( 0 != 0 )) 
    + cd /var/app/ondeck 
    + su -s /bin/bash -c 'bundle exec /opt/elasticbeanstalk/support/scripts/check-for-bundle exec rake-task.rb db:migrate' webapp 
    bundler: command not found: /opt/elasticbeanstalk/support/scripts/check-for-bundle 
    Install missing gem executables with `bundle install` 
    + echo 'No db:migrate task in Rakefile, skipping database migration.' 
    No db:migrate task in Rakefile, skipping database migration. 

答えて

0

マイ実際の解決策:

#/.ebextensions/02_app.config 
container_commands: 
    01_migrate: 
    command: bundle exec rake db:migrate 
    leader_only: true 
関連する問題