【发布时间】:2014-06-05 15:09:14
【问题描述】:
我设法将应用程序部署到 Openshift,设置端口/主机/数据库。但是我的应用程序仍然无法运行,而且我的 Gruntfile 似乎运行不正常。
我在openshift/action_hooks 内部创建了名为pre_start_nodejs 的钩子,内容如下:
#!/bin/bash
export NODE_ENV=production
# If there is a grunt file, run $ grunt prod
if [ -f "${OPENSHIFT_REPO_DIR}"/Gruntfile.js ]; then
(cd "${OPENSHIFT_REPO_DIR}"; node_modules/grunt-cli/bin/grunt prod)
fi
但是当我将代码推送到 openshift 时,它会这样说
remote: Git Post-Receive Result: failure
remote: Activation status: failure
remote: Activation failed for the following gears:
remote: 539077bd5973caf0320000d0 (Error activating gear: CLIENT_ERROR: Failed to execute: 'control start' for /var/lib/openshift/539077bd5973caf0320000d0/nodejs)
remote: Deployment completed with status: failure
remote: postreceive failed
我也收到了关于 Sass 的警告:
remote: Warning:
remote: You need to have Ruby and Sass installed and in your PATH for this task to work.
尝试仅使用 gem install sass 安装 Sass,但似乎没有帮助。
有什么想法吗?
【问题讨论】:
标签: node.js sass openshift sails.js