Rake 在多台机器上中止。编译错误?
Rake aborted on multiple machines. CompilationError?
我的 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)
这是什么意思?我该如何解决这个问题以及 运行 我的迁移?
看起来您的一个 gem (fastimage_inline
) 需要本机库 libgd
,但 heroku 不提供它。 google 中的第一个 link 对于 'libgd heroku' 可能会有帮助:http://www.developwith.com/how-do-i/ruby/add-image-processing-heroku-buildpack.html
我的 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)
这是什么意思?我该如何解决这个问题以及 运行 我的迁移?
看起来您的一个 gem (fastimage_inline
) 需要本机库 libgd
,但 heroku 不提供它。 google 中的第一个 link 对于 'libgd heroku' 可能会有帮助:http://www.developwith.com/how-do-i/ruby/add-image-processing-heroku-buildpack.html