Hri*_*dar 5 amazon-web-services ruby-on-rails-3 asset-pipeline amazon-elastic-beanstalk
2013-11-03 20:30:48,342 [INFO] (30173 MainThread) [directoryHooksExecutor.py-29] [root directoryHooksExecutor info] Output from script: /usr/bin/ruby1.9 /usr/bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets
rake aborted!
Command failed with status (): [/usr/bin/ruby1.9 /usr/bin/rake assets:prec...]
Tasks: TOP => assets:precompile
(See full trace by running task with --trace)
Rake task failed to run, skipping asset compilation.
Run Code Online (Sandbox Code Playgroud)
如何在 AWS Elastic Beanstalk 上预编译资产?
我收到以下错误
您可以通过在应用程序部署之前或之后运行脚本来自定义系统。基本上,您需要.ebextensions在源代码中创建一个目录,并以 YAML 语法插入命令和自定义步骤。
该文档解释了详细信息。
请注意,这些命令以“root”身份运行,没有环境变量设置。如果您需要类似PATH或其他变量,则由您来定位它们。
这是我为需要从源安装 NodeJS 模块的应用程序编写的示例。
packages:
yum:
gcc: []
gcc-c++: []
container_commands:
10_pre_install_sqlite3:
command: "/opt/elasticbeanstalk/node-install/node-v0.10.21-linux-x64/bin/npm install sqlite3@2.1.16 --build-from-source"
cwd: "/tmp/deployment/application"
env:
HOME: "/root"
PATH: "/sbin:/bin:/usr/sbin:/usr/bin:/opt/aws/bin"
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3061 次 |
| 最近记录: |