ruby-on-rails - 在 Rails 上使用react - ! [远程拒绝] master -> master(预接收 Hook 被拒绝)

标签 ruby-on-rails node.js git heroku react-on-rails

我正在使用 Rails 4.2.5,最近我在我的应用程序中添加了 react_on_rails 。当我尝试在 Heroku 上部署代码时,出现错误(mkdir:无法创建目录)。应用程序使用几个 webpack,一个用于 Ruby,另一个用于 Node。

git push heroku master
Counting objects: 963, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (793/793), done.
Writing objects: 100% (963/963), 982.20 KiB | 0 bytes/s, done.
Total 963 (delta 384), reused 160 (delta 70)
remote: Compressing source files... done.
remote: Building source:
remote: 
remote: -----> Deleting 18 files matching .slugignore patterns.
remote: -----> Node.js app detected
remote: mkdir: cannot create directory ‘/tmp/build_2116c2c5be27b9852c9d716798b3bcf9/.heroku’: Not a directory
remote:  !     Push rejected, failed to compile Node.js app.
remote: 
remote:  !     Push failed
remote: Verifying deploy...
remote: 
remote: !   Push rejected to acceptance.
remote: 
To https://git.heroku.com/acceptance.git
 ! [remote rejected] master -> master (pre-receive hook declined)

非常感谢任何帮助。

最佳答案

Heroku 团队帮助解决了此问题 - Heroku 团队的答复:

It looks like this project has a ".heroku" file checked into its root directory, which collides with the ".heroku" directory used to install runtimes like node, php, etc. You can keep this file from being pushed to Heroku by adding it to your .slugignore file like this:

echo ".heroku" >> .slugignore

git commit -am 'ignore .heroku file'

关于ruby-on-rails - 在 Rails 上使用react - ! [远程拒绝] master -> master(预接收 Hook 被拒绝),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41833126/

相关文章:

git - 如何在 Git 中恢复多个 merge

git - git无法克隆:远端意外挂断

ruby-on-rails - Redis 比 Postgres 快多少?

ruby-on-rails - Rails 和 Postgres Hstore : Can you add an index in a migration?

ruby-on-rails - 获取有限 Mongoid 查询结果的最后一个文档和 .count()

javascript - 如何使 javascript 库在 Node js 中工作以进行服务器端操作

javascript - 如何在phoneGap应用程序中保护mysql密码?

git - 在 Git 中切换远程分支

ruby-on-rails - |f| 是什么意思在 Ruby 中做什么?

node.js - 如何在 Node 中使用 Axios 发布表单数据