部署SailsJS到Openshift
我设法将应用程序部署到Openshift,设置端口/主机/分贝。 但是我的应用程序仍然没有运行,看起来像我的Gruntfile没有正常运行。
我在openshift/action_hooks
里面创build了名为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
我也收到这个警告在萨斯:
remote: Warning: remote: You need to have Ruby and Sass installed and in your PATH for this task to work.
试图安装Sass只是gem install sass
,但看起来没有帮助。
有任何想法吗?
你当然使用grunt-contrib-sass
– 对吗? 那个咕噜模块需要安装在服务器上的ruby和sass。
尝试
grunt-sass
相反 – 这应该有所帮助。