耙子在多台机器上中止。 CompilationError?

时间:2015-08-16 16:48:55

标签: ruby-on-rails heroku passenger

我的Rails应用程序已经存在很长时间了。我终于有时间搞乱它,但我不明白问题是什么。在Phusion Passenger中我收到此错误,在我的Ubuntu服务器上我收到此错误,现在在Heroku我仍然看到此错误。

我已使用heroku login登录终端中的Heroku,然后运行rake命令:heroku run rake db:version --app tara-crammer-designs

这是我看到错误的地方:

Running `rake db:version` attached to terminal... up, run.4434
/app/.ruby_inline/ruby-2.2.0/Inline_FastImage_bbac2b6030874ea47494fd3952895412.c:2:16: fatal error: gd.h: No such file or directory
 #include "gd.h"
                ^
compilation terminated.
rake aborted!
CompilationError: error executing "gcc -shared   -fPIC  -O3 -fno-fast-math -g -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -Wdeprecated-declarations -Wno-packed-bitfield-compat -L. -fstack-protector -rdynamic -Wl,-export-dynamic -I /app/vendor/ruby-2.2.2/include/ruby-2.2.0 -I /app/vendor/ruby-2.2.2/include/ruby-2.2.0/x86_64-linux -I /app/vendor/ruby-2.2.2/include -L/app/vendor/ruby-2.2.2/lib -o \"/app/.ruby_inline/ruby-2.2.0/Inline_FastImage_bbac2b6030874ea47494fd3952895412.so\" \"/app/.ruby_inline/ruby-2.2.0/Inline_FastImage_bbac2b6030874ea47494fd3952895412.c\" -lgd ": pid 6 exit 1
Renamed /app/.ruby_inline/ruby-2.2.0/Inline_FastImage_bbac2b6030874ea47494fd3952895412.c to /app/.ruby_inline/ruby-2.2.0/Inline_FastImage_bbac2b6030874ea47494fd3952895412.c.bad
/app/vendor/bundle/ruby/2.2.0/gems/RubyInline-3.12.4/lib/inline.rb:618:in `build'
/app/vendor/bundle/ruby/2.2.0/gems/RubyInline-3.12.4/lib/inline.rb:856:in `inline'
/app/vendor/bundle/ruby/2.2.0/gems/fastimage_resize-2.0.3/lib/fastimage_resize.rb:116:in `<class:FastImage>'
/app/vendor/bundle/ruby/2.2.0/gems/fastimage_resize-2.0.3/lib/fastimage_resize.rb:34:in `<top (required)>'
/app/vendor/bundle/ruby/2.2.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:76:in `require'
/app/vendor/bundle/ruby/2.2.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
/app/vendor/bundle/ruby/2.2.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:72:in `each'
/app/vendor/bundle/ruby/2.2.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:72:in `block in require'
/app/vendor/bundle/ruby/2.2.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:61:in `each'
/app/vendor/bundle/ruby/2.2.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:61:in `require'
/app/vendor/bundle/ruby/2.2.0/gems/bundler-1.9.7/lib/bundler.rb:134:in `require'
/app/config/application.rb:7:in `<top (required)>'
/app/Rakefile:4:in `require'
/app/Rakefile:4:in `<top (required)>'
(See full trace by running task with --trace)

这是什么意思?如何解决此问题并运行迁移?

1 个答案:

答案 0 :(得分:0)

看起来您的某个宝石(fastimage_inline)需要本机库libgd,但heroku不提供它。来自谷歌的第一个链接&#39; libgd heroku&#39;可能会有所帮助:http://www.developwith.com/how-do-i/ruby/add-image-processing-heroku-buildpack.html