在Rails上做出反应 - ! [远程拒绝]主人 - >主人(预先接收挂钩拒绝)

时间:2017-01-24 16:18:39

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

我正在使用rails 4.2.5,最近我在我的应用中添加了react_on_rails。当我尝试在Heroku上部署代码时,我收到错误(mkdir:无法创建目录)。 App使用一对webpacks一个用于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)

非常感谢任何帮助。

1 个答案:

答案 0 :(得分:2)

Heroku团队帮助解决了这个问题 - 来自Heroku团队的回答:

  

看起来这个项目的根目录中有一个“.heroku”文件   目录,与用于安装的“.heroku”目录冲突   运行时如node,php等。您可以防止此文件被推送   通过将它添加到您的.slugignore文件到Heroku:

public static string GetPropertyDisplayName(object descriptor)
{
   var propertyDescriptor = descriptor as PropertyDescriptor;
   if (propertyDescriptor != null)
   {
      var displayName = propertyDescriptor.Attributes[typeof(DisplayNameAttribute)] as DisplayNameAttribute;
      if (displayName != null && !Equals(displayName, DisplayNameAttribute.Default))
      {
         return displayName.DisplayName;
      }
   }
   else
   {
      var propertyInfo = descriptor as PropertyInfo;
      if (propertyInfo != null)
      {
         var attributes = propertyInfo.GetCustomAttributes(typeof(DisplayNameAttribute), true);
         foreach (object attribute in attributes)
         {
            var displayName = attribute as DisplayNameAttribute;
            if (displayName != null && !Equals(displayName, DisplayNameAttribute.Default))
            {
               return displayName.DisplayName;
            }
         }
      }
   }
   return null;
}