经过近三周的尝试后,我无法将我的应用程序部署到rails。我正在使用运行Ruby 2.0(Puma)和Ruby 2.0.0的64位Amazon Linux 2014.03 v1.0.5。
我在部署阶段没有错误消息:
当我访问该网址时,我没有收到任何错误消息:
这是我的/var/log/directory-hooks-executor.log
Using declarative_authorization (0.5.7)
Using orm_adapter (0.5.0)
Using warden (1.2.3)
Using devise (3.2.4)
Using exception_notification (4.0.1)
Using exception_notification-rake (0.1.2)
Using excon (0.37.0)
Using multipart-post (2.0.0)
Using faraday (0.9.0)
Using httpclient (2.4.0)
Using rack-oauth2 (1.0.8)
Using fb_graph (2.7.15)
Using hashie (2.1.2)
Using heroku-api (0.3.18)
Using launchy (2.4.2)
Using netrc (0.7.7)
Using rest-client (1.6.7)
Using rubyzip (1.1.6)
Using heroku (3.9.0)
Using hike (1.2.3)
Using httpauth (0.2.1)
Using jbuilder (1.5.3)
Using jquery-rails (3.1.1)
Using jwt (0.1.13)
Using libv8 (3.16.14.3)
Using mysql2 (0.3.16)
Using newrelic_rpm (3.9.0.229)
Using oauth2 (0.8.1)
Using omniauth (1.2.1)
Using omniauth-oauth2 (1.0.3)
Using omniauth-facebook (1.4.0)
Using paper_trail (3.0.3)
Using paperclip (4.1.1)
Using puma (2.9.0)
Using bundler (1.3.5)
Using tilt (1.4.1)
Using sprockets (2.11.0)
Using sprockets-rails (2.0.1)
Using rails (4.0.0)
Using rails_serve_static_assets (0.0.2)
Using rails_stdout_logging (0.0.3)
Using rails_12factor (0.0.2)
Using rdoc (4.1.1)
Using ref (1.0.5)
Using sass (3.2.19)
Using sass-rails (4.0.3)
Using sdoc (0.4.0)
Using therubyracer (0.12.1)
Using turbolinks (2.2.2)
Using uglifier (2.5.1)
Using will_paginate (3.0.7)
Using will_paginate-bootstrap (1.0.1)
Using youtube_search (0.1.9)
Updating files in vendor/cache
Your bundle is complete!
Gems in the groups test and development were not installed.
It was installed into ./vendor/bundle
+ '[' 0 '!=' 0 ']'
+ echo 'bundle install --deployment --deployment succeeded'
bundle install --deployment --deployment succeeded
+ '[' -f Gemfile.lock ']'
+ echo 'encountered a Gemfile.lock, setting proper permissions'
encountered a Gemfile.lock, setting proper permissions
+ chown webapp:webapp Gemfile.lock
+ '[' '' = 1 ']'
+ true
2014-07-31 13:10:05,023 [INFO] (18794 MainThread) [directoryHooksExecutor.py-29] [root directoryHooksExecutor info] Script succeeded.
2014-07-31 13:10:05,023 [INFO] (18794 MainThread) [directoryHooksExecutor.py-29] [root directoryHooksExecutor info] Executing script: /opt/elasticbeanstalk/hooks/appdeploy/pre/11_asset_compilation.sh
2014-07-31 13:10:05,537 [INFO] (18794 MainThread) [directoryHooksExecutor.py-29] [root directoryHooksExecutor info] Output from script: running 'bundle exec bundle exec rake assets:precompile'...
bundler: command not found: bundle
Install missing gem executables with `bundle install`
Rake task failed to run, skipping asset compilation.
2014-07-31 13:10:05,538 [INFO] (18794 MainThread) [directoryHooksExecutor.py-29] [root directoryHooksExecutor info] Script succeeded.
2014-07-31 13:10:05,538 [INFO] (18794 MainThread) [directoryHooksExecutor.py-29] [root directoryHooksExecutor info] Executing script: /opt/elasticbeanstalk/hooks/appdeploy/pre/12_db_migration.sh
2014-07-31 13:10:06,041 [INFO] (18794 MainThread) [directoryHooksExecutor.py-29] [root directoryHooksExecutor info] Output from script: bundler: command not found: bundle
Install missing gem executables with `bundle install`
Rake task failed to run, skipping database migrations.
2014-07-31 13:10:06,041 [INFO] (18794 MainThread) [directoryHooksExecutor.py-29] [root directoryHooksExecutor info] Script succeeded.
2014-07-31 13:10:06,186 [INFO] (18857 MainThread) [directoryHooksExecutor.py-29] [root directoryHooksExecutor info] Executing directory: /opt/elasticbeanstalk/hooks/appdeploy/enact/
2014-07-31 13:10:06,186 [INFO] (18857 MainThread) [directoryHooksExecutor.py-29] [root directoryHooksExecutor info] Executing script: /opt/elasticbeanstalk/hooks/appdeploy/enact/01_flip.sh
2014-07-31 13:10:06,304 [INFO] (18857 MainThread) [directoryHooksExecutor.py-29] [root directoryHooksExecutor info] Output from script: + '[' -d /var/app/current ']'
+ rm -rf /var/app/current.old
+ mv /var/app/current /var/app/current.old
+ mv /var/app/ondeck /var/app/current
+ rm -rf /var/app/current.old
+ su -c 'mkdir -p /var/app/current/{tmp,public}' webapp
2014-07-31 13:10:06,305 [INFO] (18857 MainThread) [directoryHooksExecutor.py-29] [root directoryHooksExecutor info] Script succeeded.
2014-07-31 13:10:06,305 [INFO] (18857 MainThread) [directoryHooksExecutor.py-29] [root directoryHooksExecutor info] Executing script: /opt/elasticbeanstalk/hooks/appdeploy/enact/02_restart_app_server.sh
2014-07-31 13:10:08,333 [INFO] (18857 MainThread) [directoryHooksExecutor.py-29] [root directoryHooksExecutor info] Output from script: puma start/running, process 18871
2014-07-31 13:10:08,334 [INFO] (18857 MainThread) [directoryHooksExecutor.py-29] [root directoryHooksExecutor info] Script succeeded.
2014-07-31 13:10:08,334 [INFO] (18857 MainThread) [directoryHooksExecutor.py-29] [root directoryHooksExecutor info] Executing script: /opt/elasticbeanstalk/hooks/appdeploy/enact/09clean.sh
2014-07-31 13:10:08,358 [INFO] (18857 MainThread) [directoryHooksExecutor.py-29] [root directoryHooksExecutor info] Output from script:
2014-07-31 13:10:08,359 [INFO] (18857 MainThread) [directoryHooksExecutor.py-29] [root directoryHooksExecutor info] Script succeeded.
2014-07-31 13:10:08,647 [INFO] (18879 MainThread) [directoryHooksExecutor.py-29] [root directoryHooksExecutor info] Executing directory: /opt/elasticbeanstalk/hooks/appdeploy/post/
2014-07-31 13:10:08,647 [INFO] (18879 MainThread) [directoryHooksExecutor.py-29] [root directoryHooksExecutor info] No files found to execute.
我有一个数据库,实例类型是t1.micro。
有谁知道我遇到的问题或如何修复错误?谢谢。
答案 0 :(得分:0)
正如日志中所写:
执行脚本:
/opt/elasticbeanstalk/hooks/appdeploy/pre/11_asset_compilation.sh
2014-07-31 13:10:05,537 [INFO](18794 MainThread) [directoryHooksExecutor.py-29] [根目录挂钩执行者信息]Output from script: running 'bundle exec bundle exec rake assets:precompile'...
bundler: command not found: bundle
脚本:opt/elasticbeanstalk/hooks/appdeploy/pre/11_asset_compilation.sh
正在尝试运行bundle exec bundle exec...
- 某些内容配置不正确,请检查配置文件。
答案 1 :(得分:0)
我和Rails和Puma有同样的问题。所有EB Hook都运行没有错误,但服务器没有响应任何东西,也没有在/var/log/puma/puma.log中抛出错误
现在你的脚本可能在.ebextensions / * .config中被覆盖了。 你需要先修复那个。
答案 2 :(得分:0)
我遇到了同样的问题,而在Elastic Beanstalk仪表板中,在加载URL时检查监视CPU使用情况。如果它达到接近100%的任何位置,则意味着您需要更高层的实例,因为需要安装宝石和依赖项。