小编yak*_*nur的帖子

“git push heroku master”预编译资产失败

当我运行命令“git push heroku master”时,出现以下问题:

远程:耙子中止!

远程:JSON::GeneratorError:源序列非法/格式错误的 utf-8

remote:        Bundle complete! 17 Gemfile dependencies, 57 gems now installed.
remote:        Gems in the groups development and test were not installed.
remote:        Bundled gems are installed into ./vendor/bundle.
remote:        Post-install message from rdoc:
remote:        Depending on your version of ruby, you may need to install ruby rdoc/ri data:
remote:        <= 1.8.6 : unsupported
remote:        = 1.8.7 : gem install rdoc-data; rdoc-data --install
remote:        = 1.9.1 : gem install rdoc-data; rdoc-data --install
remote:        >= …
Run Code Online (Sandbox Code Playgroud)

ruby ruby-on-rails heroku

5
推荐指数
1
解决办法
989
查看次数

在JSON树中按ID查找节点

我想将children数组添加到节点所在的位置id = 52126f7d(或其他位置)。我该怎么做?

var children = [
  { name: 'great-granchild3',
    id: '2a12a10h'
  },
  { name: 'great-granchild4',
    id: 'bpme7qw0'
  }
]

// json tree
var objects = {
  name: 'all objects',
  id:"2e6ca1c3",      
  children: [
     {
         name: 'child',
         id: "6c03cfbe",
         children: [                 
             { name: 'grandchild1',
               id: "2790f59c"
             },
             { name: 'grandchild2',
               id: "52126f7d"
             },
             { name: 'grandchild3',
               id: "b402f14b" 
             },
             {
               name: 'grandchild4',
               id: "6c03cff0",
               children: [
                 { name: 'great-grandchild1',
                   id: "ce90ffa6"
                 },
                 { name: 'great-grandchild2',
                   id: "52f95f28" …
Run Code Online (Sandbox Code Playgroud)

javascript json javascript-objects

2
推荐指数
1
解决办法
3308
查看次数