我正在使用来自here的Gulp样板和来自here的buildpack。无论如何,我只想部署 clean 样板,而不是这样的代码。我认为只需通过heroku buildpacks:add ${url}
添加buildpack即可。它不起作用,给我输出:
C:\Users\Dawid\Desktop\Harvest>git push heroku master
Counting objects: 541, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (245/245), done.
Writing objects: 100% (541/541), 147.00 KiB | 0 bytes/s, done.
Total 541 (delta 261), reused 532 (delta 260)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Fetching custom git buildpack... done
remote: -----> Node.js app detected
remote:
remote: PRO TIP: Specify a node version in package.json
remote: See https://devcenter.heroku.com/articles/nodejs-support
remote:
remote: -----> Defaulting to latest stable node: 0.12.3
remote: -----> Downloading and installing node
remote: -----> Exporting config vars to environment
remote: -----> Installing dependencies
remote: npm WARN package.json YourProject@0.0.1 No repository field.
remote: -----> Cleaning up node-gyp and npm artifacts
remote: -----> Procfile not found and npm start script is undefined
remote:
remote: PRO TIP: Create a Procfile or specify a start script in package.j
son
remote: See https://devcenter.heroku.com/articles/nodejs-support
remote:
remote: -----> Installing Sass / Compass / Haml
remote: WARNING: You don't have /tmp/build_a4c003166016ef188ee84e9068b95aec/.ge
m/ruby/2.2.0/bin in your PATH,
remote: gem executables will not run.
remote: Successfully installed sass-3.4.14
remote: 1 gem installed
remote: WARNING: You don't have /tmp/build_a4c003166016ef188ee84e9068b95aec/.ge
m/ruby/2.2.0/bin in your PATH,
remote: gem executables will not run.
remote: Building native extensions. This could take a while...
remote: Successfully installed ffi-1.9.8
remote: Successfully installed rb-inotify-0.9.5
remote: Successfully installed rb-fsevent-0.9.5
remote: Successfully installed chunky_png-1.3.4
remote: Successfully installed sass-3.4.14
remote: Successfully installed compass-import-once-1.0.5
remote: Successfully installed compass-core-1.0.3
remote: Compass is charityware. If you love it, please donate on our behalf
at http://umdf.org/compass Thanks!
remote: Successfully installed compass-1.0.3
remote: 8 gems installed
remote: WARNING: You don't have /tmp/build_a4c003166016ef188ee84e9068b95aec/.ge
m/ruby/2.2.0/bin in your PATH,
remote: gem executables will not run.
remote: Successfully installed tilt-2.0.1
remote:
remote: HEADS UP! Haml 4.0 has many improvements, but also has changes that may
break
remote: your application:
remote:
remote: * Support for Ruby 1.8.6 dropped
remote: * Support for Rails 2 dropped
remote: * Sass filter now always outputs <style> tags
remote: * Data attributes are now hyphenated, not underscored
remote: * html2haml utility moved to the html2haml gem
remote: * Textile and Maruku filters moved to the haml-contrib gem
remote:
remote: For more info see:
remote:
remote: http://rubydoc.info/github/haml/haml/file/CHANGELOG.md
remote:
remote: Successfully installed haml-4.0.6
remote: 2 gems installed
remote: -----> Caching ruby gems directory for future builds
remote: -----> Found Gulpfile
remote: -----> Running gulp heroku: task
remote: /tmp/buildpack_a4c003166016ef188ee84e9068b95aec/bin/compile: line 168: /
tmp/build_a4c003166016ef188ee84e9068b95aec/node_modules/.bin/gulp: No such file
or directory
remote:
remote: ! Push rejected, failed to compile Node.js app
remote:
remote: Verifying deploy...
remote:
remote: ! Push rejected to calm-badlands-5771.
remote:
To https://git.heroku.com/calm-badlands-5771.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/calm-badlands-5771.gi
t'
答案 0 :(得分:2)
Heroku上的红宝石/指南针安装必须过时。我不得不将我的更新到2.2.0以便指南针工作,但我正在使用自定义buildpack以及Grunt-NodeJS-Compass https://github.com/devakone/heroku-buildpack-nodejs-grunt-compass
你可以看看 https://github.com/devakone/heroku-buildpack-nodejs-grunt-compass/blob/master/bin/compile 文件 第153行 export GEM_HOME = $ build_dir / .gem / ruby / 2.2.0
确保您的GEM_HOME变量指向ruby 2.2.0目录。