【发布时间】:2013-12-16 05:37:20
【问题描述】:
我正在尝试在我的 Heroku 应用程序上使用这个 https://github.com/mooktakim/image_optim_bin,但我真的不知道该怎么做。现在我有以下代码试图运行pngcrush
exec('pngcrush -rem gAMA -rem cHRM -rem iCCP -rem sRGB ' + file + ' ' + file, function(error, stdout, stderr) {
console.log('PNGCRUSH OUTPUT: ', error, stdout, stderr);
});
但这会导致我的heroku logs 输出出现以下错误:
PNGCRUSH OUTPUT: { [Error: Command failed: /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/rubygems/dependency.rb:296:in `to_specs': Could not find 'image_optim_bin' (>= 0) among 9 total gem(s) (Gem::LoadError)
这是我的Gemfile
gem 'image_optim_bin', :git => 'https://github.com/mooktakim/image_optim_bin.git'
这是我第一次尝试在 nodejs 应用程序中使用 ruby gems,所以我真的不知道该怎么做。是否有一个特定的目录需要我运行gem?
【问题讨论】: