无法安装gem文件

时间:2017-10-13 20:48:28

标签: ruby rubygems

我已经在这几个小时已经谷歌搜索了一切。尝试了大量的答案,即时通讯使用ruby x64和devkit x64(原来是incorect one x32,但我只是将其删除并安装了正确的x64) 无法安装json或(我的实际目标)ruby-debug-ide -v 0.4.32 宝石版= 2.4.7 ruby version = ruby​​ 2.4.2p198(2017-09-14修订版59899)[x64-mingw32]

// callback when all your Rating.find() are complete
function done(movies) {
  res.json(movies);
}

// get the movies
Movie.find({}, function (err, movies) {
  // loop over the results
  movies.forEach(function(movie, i) {
    // get the Rating for this Movie
    Rating.find({'tt_number': movie.tt_number}, function (err, ratings) {
      // add the rating
      movie.rating = ratings.reduce(function(total, rating) {
        total += rating;
        return total;
      }, 0) / ratings.length;

      // this is the last one, call done()
      if (movies.length-1 === i) {
        done(movies);
      }
    });
  }
});

1 个答案:

答案 0 :(得分:0)

您可能想尝试使用cloud9编辑器,并按照本教程https://www.railstutorial.org/book/beginning 它将为您节省设置rails环境的痛苦。