Ruby on rails 捆绑程序:未找到阻止弹性beanstalk部署的Gemfile

Ruby on rails 捆绑程序:未找到阻止弹性beanstalk部署的Gemfile,ruby-on-rails,amazon-web-services,amazon-elastic-beanstalk,Ruby On Rails,Amazon Web Services,Amazon Elastic Beanstalk,我试图部署到elastic beanstalk,但我遇到了一个对我来说没有多大意义的错误。下面是我的日志文件中的错误,它抱怨缺少一个文件;但是,gemfile确实存在: 2014-08-27 13:45:33,639 [INFO] (708 MainThread) [directoryHooksExecutor.py-29] [root directoryHooksExecutor info] Script succeeded. 2014-08-27 13:45:33,639 [INFO] (7

我试图部署到elastic beanstalk,但我遇到了一个对我来说没有多大意义的错误。下面是我的日志文件中的错误,它抱怨缺少一个文件;但是,gemfile确实存在:

2014-08-27 13:45:33,639 [INFO] (708 MainThread) [directoryHooksExecutor.py-29] [root directoryHooksExecutor info] Script succeeded.
2014-08-27 13:45:33,639 [INFO] (708 MainThread) [directoryHooksExecutor.py-29] [root directoryHooksExecutor info] Executing script: /opt/elasticbeanstalk/hooks/appdeploy/pre/11_asset_compilation.sh
2014-08-27 13:45:33,675 [INFO] (708 MainThread) [directoryHooksExecutor.py-29] [root directoryHooksExecutor info] Output from script: Skipping asset compilation (RAILS_SKIP_ASSET_COMPILATION=true).

2014-08-27 13:45:33,676 [INFO] (708 MainThread) [directoryHooksExecutor.py-29] [root directoryHooksExecutor info] Script succeeded.
2014-08-27 13:45:33,676 [INFO] (708 MainThread) [directoryHooksExecutor.py-29] [root directoryHooksExecutor info] Executing script: /opt/elasticbeanstalk/hooks/appdeploy/pre/12_db_migration.sh
2014-08-27 13:45:33,711 [INFO] (708 MainThread) [directoryHooksExecutor.py-29] [root directoryHooksExecutor info] Output from script: Skipping database migrations (RAILS_SKIP_MIGRATIONS=true).

2014-08-27 13:45:33,712 [INFO] (708 MainThread) [directoryHooksExecutor.py-29] [root directoryHooksExecutor info] Script succeeded.
2014-08-27 13:45:33,712 [INFO] (708 MainThread) [directoryHooksExecutor.py-29] [root directoryHooksExecutor info] Executing script: /opt/elasticbeanstalk/hooks/appdeploy/pre/13_test_for_puma.rb
2014-08-27 13:45:33,766 [INFO] (708 MainThread) [directoryHooksExecutor.py-29] [root directoryHooksExecutor info] Output from script: /opt/rubies/ruby-2.1.2/lib/ruby/gems/2.1.0/gems/bundler-1.3.5/lib/bundler/shared_helpers.rb:22:in `default_gemfile': Could not locate Gemfile (Bundler::GemfileNotFound)
    from /opt/rubies/ruby-2.1.2/lib/ruby/gems/2.1.0/gems/bundler-1.3.5/lib/bundler.rb:231:in `default_gemfile'
    from /opt/rubies/ruby-2.1.2/lib/ruby/gems/2.1.0/gems/bundler-1.3.5/lib/bundler.rb:177:in `root'
    from /opt/rubies/ruby-2.1.2/lib/ruby/gems/2.1.0/gems/bundler-1.3.5/lib/bundler.rb:99:in `bundle_path'
    from /opt/rubies/ruby-2.1.2/lib/ruby/gems/2.1.0/gems/bundler-1.3.5/lib/bundler.rb:378:in `configure_gem_home'
    from /opt/rubies/ruby-2.1.2/lib/ruby/gems/2.1.0/gems/bundler-1.3.5/lib/bundler.rb:367:in `configure_gem_home_and_path'
    from /opt/rubies/ruby-2.1.2/lib/ruby/gems/2.1.0/gems/bundler-1.3.5/lib/bundler.rb:90:in `configure'
    from /opt/rubies/ruby-2.1.2/lib/ruby/gems/2.1.0/gems/bundler-1.3.5/lib/bundler.rb:146:in `definition'
    from /opt/elasticbeanstalk/hooks/appdeploy/pre/13_test_for_puma.rb:5:in `<main>'

2014-08-27 13:45:33,766 [ERROR] (708 MainThread) [directoryHooksExecutor.py-33] [root directoryHooksExecutor error] Script /opt/elasticbeanstalk/hooks/appdeploy/pre/13_test_for_puma.rb failed with returncode 1
2014-08-27 13:45:33639[INFO](708主线程)[directoryhookseecutor.py-29][root directoryhookseecutor-INFO]脚本成功。
2014-08-27 13:45:33639[信息](708主线程)[directoryHooksExecutor.py-29][root directoryHooksExecutor信息]执行脚本:/opt/elasticbeanstalk/hooks/appdeploy/pre/11_asset_compilation.sh
2014-08-27 13:45:33675[信息](708主线程)[directoryHookeSecutor.py-29][root directoryHookeSecutor信息]脚本输出:跳过资产编译(RAILS\u SKIP\u asset\u compilation=true)。
2014-08-27 13:45:33676[信息](708主线程)[directoryHookeSecutor.py-29][root directoryHookeSecutor信息]脚本成功。
2014-08-27 13:45:33676[信息](708主线程)[directoryHookeSecutor.py-29][root directoryHookeSecutor信息]执行脚本:/opt/elasticbeanstalk/hooks/appdeploy/pre/12_db_migration.sh
2014-08-27 13:45:33711[信息](708主线程)[directoryHookeSecutor.py-29][root directoryHookeSecutor信息]脚本输出:跳过数据库迁移(RAILS\u SKIP\u migrations=true)。
2014-08-27 13:45:33712[信息](708主线程)[directoryHookeSecutor.py-29][root directoryHookeSecutor信息]脚本成功。
2014-08-27 13:45:33712[信息](708主线程)[directoryHookeSecutor.py-29][root directoryHookeSecutor信息]执行脚本:/opt/elasticbeanstalk/hooks/appdeploy/pre/13_test_for_puma.rb
2014-08-27 13:45:33766[信息](708主线程)[directoryHookeSecutor.py-29][root directoryHookeSecutor信息]从脚本输出:/opt/rubies/ruby-2.1.2/lib/ruby/gems/2.1.0/gems/bundler-1.3.5/lib/bundler/shared\u helpers.rb:22:“default\u gemfile”:找不到gemfile(bundler::GemfileNotFound)
from/opt/rubies/ruby-2.1.2/lib/ruby/gems/2.1.0/gems/bundler-1.3.5/lib/bundler.rb:231:在“default_gemfile”中
from/opt/rubies/ruby-2.1.2/lib/ruby/gems/2.1.0/gems/bundler-1.3.5/lib/bundler.rb:177:in'root'
from/opt/rubies/ruby-2.1.2/lib/ruby/gems/2.1.0/gems/bundler-1.3.5/lib/bundler.rb:99:in'bundle_path'
从/opt/rubies/ruby-2.1.2/lib/ruby/gems/2.1.0/gems/bundler-1.3.5/lib/bundler.rb:378:in“configure_gem_home”
from/opt/rubies/ruby-2.1.2/lib/ruby/gems/2.1.0/gems/bundler-1.3.5/lib/bundler.rb:367:in“configure_gem_home_和_path”
来自/opt/rubies/ruby-2.1.2/lib/ruby/gems/2.1.0/gems/bundler-1.3.5/lib/bundler.rb:90:in“configure”
from/opt/rubies/ruby-2.1.2/lib/ruby/gems/2.1.0/gems/bundler-1.3.5/lib/bundler.rb:146:在“定义”中
来自/opt/elasticbeanstalk/hooks/appdeploy/pre/13_test_for_puma.rb:5:in`'
2014-08-27 13:45:33766[错误](708主线程)[directoryHookeSecutor.py-33][root directoryHookeSecutor ERROR]Script/opt/elasticbeanstalk/hooks/appdeploy/pre/13_test_for_puma.rb失败,返回代码为1

这是我使用Mac OSX Yosemite的结果。当使用Yosemite压缩时,它使用的是Darwin二进制zip文件,而elastic beanstalk不支持该文件。尝试下载Keka并用该工具压缩它。

你的应用程序有文件吗?你能试着在你的应用程序中创建一个空的Gemfile,看看是否成功吗?Gemfile不是问题所在。