alex88 / heroku-buildpack-vips

Heroku buildpack with vips
MIT License
33 stars 58 forks source link

ruby-vips cannot be installed #18

Closed musaffa closed 9 years ago

musaffa commented 9 years ago

After installing libvips with this buildpack, I get proper version no:

$ heroku run vips -v --app pathchokro-staging
Running `vips -v` attached to terminal... up, run.3799
vips-7.42.3-Tue Mar 31 08:03:10 UTC 2015

But I cannot install ruby-vips using heroku ruby buildpack. Here is the build trace:

remote: -----> Deleting 3 files matching .slugignore patterns.
remote: -----> Multipack app detected
remote: -----> Fetching custom git buildpack... done
remote: -----> Vips Library app detected
remote: -----> Installing libvips
remote:        Downloading libvips and unpacking
remote:        libvips installed
remote: -----> Fetching custom git buildpack... done
remote: -----> Ruby app detected
remote: -----> Compiling Ruby/Rails
remote: -----> Using Ruby version: ruby-2.2.2
remote: -----> Installing dependencies using 1.9.7
remote:        Running: bundle install --without development:test:load_test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
remote:        Fetching gem metadata from https://rails-assets.org/..
remote:        Fetching gem metadata from https://rubygems.org/..........
remote:        Fetching version metadata from https://rails-assets.org/..
remote:        Fetching version metadata from https://rubygems.org/...
remote:        Fetching dependency metadata from https://rails-assets.org/..
remote:        Fetching dependency metadata from https://rubygems.org/..
remote:        Fetching git://github.com/musaffa/carrierwave-vips.git
remote:        Fetching gem metadata from https://rails-assets.org/..
remote:        Fetching version metadata from https://rails-assets.org/..
remote:        Using i18n 0.7.0
remote:        Using rake 10.4.2
remote:        Using json 1.8.2
remote:        Using minitest 5.7.0
remote:        Using thread_safe 0.3.5
remote:        Using builder 3.2.2
remote:        Using erubis 2.7.0
remote:        Using mini_portile 0.6.2
remote:        Using rack 1.6.1
remote:        Using mime-types 2.6.1
remote:        Using arel 6.0.0
remote:        Using addressable 2.3.8
remote:        Using thor 0.19.1
remote:        Using uber 0.0.13
remote:        Using onfire 0.2.0
remote:        Using execjs 2.5.2
remote:        Using babosa 1.0.2
remote:        Using bcrypt 3.1.10
remote:        Using sass 3.4.14
remote:        Using bundler 1.9.7
remote:        Using hike 1.2.3
remote:        Using multi_json 1.11.0
remote:        Using tilt 1.4.1
remote:        Using hitimes 1.2.2
remote:        Using chunky_png 1.3.4
remote:        Using cocoon 1.2.6
remote:        Using coffee-script-source 1.9.1.1
remote:        Using rb-fsevent 0.9.5
remote:        Using ffi 1.9.8
remote:        Using connection_pool 2.2.0
remote:        Using crass 1.0.2
remote:        Using orm_adapter 0.5.0
remote:        Using structured_warnings 0.2.0
remote:        Using get_process_mem 0.2.0
remote:        Using hodel_3000_compliant_logger 0.1.1
remote:        Using htmlentities 4.3.3
remote:        Using jcrop-rails-v2 0.9.12.3
remote:        Using kgio 2.9.3
remote:        Using newrelic_rpm 3.12.0.288
remote:        Using nprogress-rails 0.1.6.7
remote:        Using pg 0.18.2
remote:        Using rack-cors 0.4.0
remote:        Using rack-timeout 0.2.4
remote:        Using rails-assets-jquery 2.1.4
remote:        Using rails-assets-microplugin 0.0.3
remote:        Using rails-assets-pnotify 2.0.1
remote:        Using rails-assets-sifter 0.4.1
remote:        Using rails_serve_static_assets 0.0.4
remote:        Using rails_stdout_logging 0.0.3
remote:        Using raindrops 0.13.0
remote:        Using recaptcha 0.4.0
remote:        Using redis 3.2.1
remote:        Using seedbank 0.4.0.pre
remote:        Using state_machines 0.2.2
remote:        Using i18n-js 3.0.0.rc10
remote:        Using tzinfo 1.2.2
remote:        Using nokogiri 1.6.6.2
remote:        Using mail 2.6.3
remote:        Using rack-test 0.6.3
remote:        Using warden 1.2.3
remote:        Using rack-protection 1.5.3
remote:        Using css_parser 1.3.6
remote:        Using hooks 0.4.0
remote:        Using figaro 1.1.1
remote:        Using autoprefixer-rails 5.2.0
remote:        Using uglifier 2.7.1
remote:        Using compass-core 1.0.3
remote:        Using compass-import-once 1.0.5
remote:        Using sprockets 2.12.3
remote:        Using haml 4.0.6
remote:        Using timers 4.0.1
remote:        Using coffee-script 2.4.1
remote:        Using rb-inotify 0.9.5
remote:        Using rubytree 0.8.3
remote:        Using rails-assets-selectize 0.12.1
remote:        Using rails_12factor 0.0.3
remote:        Using unicorn 4.9.0
remote:        Using redis-namespace 1.5.2
remote:        Using activesupport 4.2.1
remote:        Using loofah 2.0.2
remote:        Using aws-sdk-v1 1.64.0
remote:        Using representable 2.1.8
remote:        Using nokogumbo 1.4.1
remote:        Using sinatra 1.4.6
remote:        Using premailer 1.8.4
remote:        Using bootstrap-sass 3.3.4.1
remote:        Using celluloid 0.16.0
remote:        Using compass 1.0.3
remote:        Using rails-deprecated_sanitizer 1.0.3
remote:        Using globalid 0.3.5
remote:        Using activemodel 4.2.1
remote:        Using climate_control 0.0.3
remote:        Using enumerize 0.11.0
remote:        Using pundit 1.0.1
remote:        Using unicorn-rails 2.2.0
remote:        Using unicorn-worker-killer 0.4.3
remote:        Using rails-html-sanitizer 1.0.2
remote:        Using disposable 0.0.9
remote:        Using aws-sdk 1.64.0
remote:        Using sanitize 4.0.0
remote:        Using sidekiq 3.3.4
remote:        Using rails-dom-testing 1.0.6
remote:        Using activerecord 4.2.1
remote:        Using carrierwave 0.10.0
remote:        Using state_machines-activemodel 0.1.2
remote:        Using cocaine 0.5.7
remote:        Using activejob 4.2.1
remote:        Using reform 1.2.6
remote:        Using actionview 4.2.1
remote:        Using acts-as-taggable-on 3.5.0
remote:        Using ancestry 2.1.0
remote:        Using friendly_id 5.1.0
remote:        Using goldiloader 0.0.9
remote:        Using oink 0.10.1
remote:        Using pghero 1.0.1
remote:        Using carrierwave-aws 0.5.0
remote:        Using state_machines-activerecord 0.2.0
remote:        Using file_validators 1.2.0
remote:        Using actionpack 4.2.1
remote:        Using actionmailer 4.2.1
remote:        Using railties 4.2.1
remote:        Using sprockets-rails 2.3.1
remote:        Using easy_table 0.0.6
remote:        Using heroku_rails_deflate 1.0.3
remote:        Using simple_form 3.1.0
remote:        Using marginalia 1.3.0
remote:        Using meta-tags 2.0.0
remote:        Using premailer-rails 1.8.2
remote:        Using cells 3.11.3
remote:        Using jquery-rails 4.0.3
remote:        Using rails 4.2.1
remote:        Using coffee-rails 4.1.0
remote:        Using sass-rails 5.0.1
remote:        Using responders 2.1.0
remote:        Using font-awesome-rails 4.3.0.0
remote:        Using jquery-fileupload-rails 0.4.5
remote:        Using jquery-ui-rails 5.0.5
remote:        Using lograge 0.3.2
remote:        Using unobtrusive_flash 3.1.0
remote:        Using apotomo 1.3.1
remote:        Using browser-timezone-rails 0.0.8
remote:        Using gaffe 1.0.2
remote:        Using judge 2.1.0
remote:        Using polymorphic_constraints 1.0.0
remote:        Using turbolinks 2.5.3
remote:        Using compass-rails 2.0.4
remote:        Using social-share-button 0.1.9 from git://github.com/huacnlee/social-share-button.git (at master)
remote:        Using tinymce-rails 4.1.6 from git://github.com/musaffa/tinymce-rails.git (at tinymce_wait_asynchronous_load)
remote:        Using devise 3.5.1
remote:        Using judge-simple_form 1.0.0
remote:        Using jquery-turbolinks 2.1.0
remote:        Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
remote:        /tmp/build_1ce3994986a2a91bdfabb581890a2b18/vendor/ruby-2.2.2/bin/ruby -r ./siteconf20150622-429-17oq592.rb extconf.rb
remote:        *** extconf.rb failed ***
remote:        Could not create Makefile due to some reason, probably lack of necessary
remote:        libraries and/or headers.  Check the mkmf.log file for more details.  You may
remote:        need configuration options.
remote:        Provided configuration options:
remote:        --with-opt-dir
remote:        --without-opt-dir
remote:        --with-opt-include
remote:        --without-opt-include=${opt-dir}/include
remote:        --with-opt-lib
remote:        --without-opt-lib=${opt-dir}/lib
remote:        --with-make-prog
remote:        --without-make-prog
remote:        --srcdir=.
remote:        --curdir
remote:        --ruby=/tmp/build_1ce3994986a2a91bdfabb581890a2b18/vendor/ruby-2.2.2/bin/$(RUBY_BASE_NAME)
remote:        --enable-debug
remote:        --disable-debug
remote:        --with-vips-config
remote:        --without-vips-config
remote:        --with-pkg-config
remote:        --without-pkg-config
remote:        --with-vips-7.29-config
remote:        --without-vips-7.29-config
remote:        --with-vips-7.28-config
remote:        --without-vips-7.28-config
remote:        --with-vips-7.27-config
remote:        --without-vips-7.27-config
remote:        --with-vips-7.26-config
remote:        --without-vips-7.26-config
remote:        --with-vips-7.24-config
remote:        --without-vips-7.24-config
remote:        --with-vips-7.23-config
remote:        --without-vips-7.23-config
remote:        --with-vips-7.22-config
remote:        --without-vips-7.22-config
remote:        --with-vips-7.20-config
remote:        --without-vips-7.20-config
remote:        extconf.rb:27:in `<main>': no pkg_config for any of following libvips versions: 7.29, 7.28, 7.27, 7.26, 7.24, 7.23, 7.22, 7.20 (RuntimeError)
remote:        extconf failed, exit code 1
remote:        Gem files will remain installed in /tmp/build_1ce3994986a2a91bdfabb581890a2b18/vendor/bundle/ruby/2.2.0/gems/ruby-vips-0.3.9 for inspection.
remote:        Results logged to /tmp/build_1ce3994986a2a91bdfabb581890a2b18/vendor/bundle/ruby/2.2.0/extensions/x86_64-linux/2.2.0-static/ruby-vips-0.3.9/gem_make.out
remote:        An error occurred while installing ruby-vips (0.3.9), and Bundler cannot
remote:        continue.
remote:        Make sure that `gem install ruby-vips -v '0.3.9'` succeeds before bundling.
remote:        Bundler Output: Fetching gem metadata from https://rails-assets.org/..
remote:        Fetching gem metadata from https://rubygems.org/..........
remote:        Fetching version metadata from https://rails-assets.org/..
remote:        Fetching version metadata from https://rubygems.org/...
remote:        Fetching dependency metadata from https://rails-assets.org/..
remote:        Fetching dependency metadata from https://rubygems.org/..
remote:        Fetching git://github.com/musaffa/carrierwave-vips.git
remote:        Fetching gem metadata from https://rails-assets.org/..
remote:        Fetching version metadata from https://rails-assets.org/..
remote:        Using i18n 0.7.0
remote:        Using rake 10.4.2
remote:        Using json 1.8.2
remote:        Using minitest 5.7.0
remote:        Using thread_safe 0.3.5
remote:        Using builder 3.2.2
remote:        Using erubis 2.7.0
remote:        Using mini_portile 0.6.2
remote:        Using rack 1.6.1
remote:        Using mime-types 2.6.1
remote:        Using arel 6.0.0
remote:        Using addressable 2.3.8
remote:        Using thor 0.19.1
remote:        Using uber 0.0.13
remote:        Using onfire 0.2.0
remote:        Using execjs 2.5.2
remote:        Using babosa 1.0.2
remote:        Using bcrypt 3.1.10
remote:        Using sass 3.4.14
remote:        Using bundler 1.9.7
remote:        Using hike 1.2.3
remote:        Using multi_json 1.11.0
remote:        Using tilt 1.4.1
remote:        Using hitimes 1.2.2
remote:        Using chunky_png 1.3.4
remote:        Using cocoon 1.2.6
remote:        Using coffee-script-source 1.9.1.1
remote:        Using rb-fsevent 0.9.5
remote:        Using ffi 1.9.8
remote:        Using connection_pool 2.2.0
remote:        Using crass 1.0.2
remote:        Using orm_adapter 0.5.0
remote:        Using structured_warnings 0.2.0
remote:        Using get_process_mem 0.2.0
remote:        Using hodel_3000_compliant_logger 0.1.1
remote:        Using htmlentities 4.3.3
remote:        Using jcrop-rails-v2 0.9.12.3
remote:        Using kgio 2.9.3
remote:        Using newrelic_rpm 3.12.0.288
remote:        Using nprogress-rails 0.1.6.7
remote:        Using pg 0.18.2
remote:        Using rack-cors 0.4.0
remote:        Using rack-timeout 0.2.4
remote:        Using rails-assets-jquery 2.1.4
remote:        Using rails-assets-microplugin 0.0.3
remote:        Using rails-assets-pnotify 2.0.1
remote:        Using rails-assets-sifter 0.4.1
remote:        Using rails_serve_static_assets 0.0.4
remote:        Using rails_stdout_logging 0.0.3
remote:        Using raindrops 0.13.0
remote:        Using recaptcha 0.4.0
remote:        Using redis 3.2.1
remote:        Using seedbank 0.4.0.pre
remote:        Using state_machines 0.2.2
remote:        Using i18n-js 3.0.0.rc10
remote:        Using tzinfo 1.2.2
remote:        Using nokogiri 1.6.6.2
remote:        Using mail 2.6.3
remote:        Using rack-test 0.6.3
remote:        Using warden 1.2.3
remote:        Using rack-protection 1.5.3
remote:        Using css_parser 1.3.6
remote:        Using hooks 0.4.0
remote:        Using figaro 1.1.1
remote:        Using autoprefixer-rails 5.2.0
remote:        Using uglifier 2.7.1
remote:        Using compass-core 1.0.3
remote:        Using compass-import-once 1.0.5
remote:        Using sprockets 2.12.3
remote:        Using haml 4.0.6
remote:        Using timers 4.0.1
remote:        Using coffee-script 2.4.1
remote:        Using rb-inotify 0.9.5
remote:        Using rubytree 0.8.3
remote:        Using rails-assets-selectize 0.12.1
remote:        Using rails_12factor 0.0.3
remote:        Using unicorn 4.9.0
remote:        Using redis-namespace 1.5.2
remote:        Using activesupport 4.2.1
remote:        Using loofah 2.0.2
remote:        Using aws-sdk-v1 1.64.0
remote:        Using representable 2.1.8
remote:        Using nokogumbo 1.4.1
remote:        Using sinatra 1.4.6
remote:        Using premailer 1.8.4
remote:        Using bootstrap-sass 3.3.4.1
remote:        Using celluloid 0.16.0
remote:        Using compass 1.0.3
remote:        Using rails-deprecated_sanitizer 1.0.3
remote:        Using globalid 0.3.5
remote:        Using activemodel 4.2.1
remote:        Using climate_control 0.0.3
remote:        Using enumerize 0.11.0
remote:        Using pundit 1.0.1
remote:        Using unicorn-rails 2.2.0
remote:        Using unicorn-worker-killer 0.4.3
remote:        Using rails-html-sanitizer 1.0.2
remote:        Using disposable 0.0.9
remote:        Using aws-sdk 1.64.0
remote:        Using sanitize 4.0.0
remote:        Using sidekiq 3.3.4
remote:        Using rails-dom-testing 1.0.6
remote:        Using activerecord 4.2.1
remote:        Using carrierwave 0.10.0
remote:        Using state_machines-activemodel 0.1.2
remote:        Using cocaine 0.5.7
remote:        Using activejob 4.2.1
remote:        Using reform 1.2.6
remote:        Using actionview 4.2.1
remote:        Using acts-as-taggable-on 3.5.0
remote:        Using ancestry 2.1.0
remote:        Using friendly_id 5.1.0
remote:        Using goldiloader 0.0.9
remote:        Using oink 0.10.1
remote:        Using pghero 1.0.1
remote:        Using carrierwave-aws 0.5.0
remote:        Using state_machines-activerecord 0.2.0
remote:        Using file_validators 1.2.0
remote:        Using actionpack 4.2.1
remote:        Using actionmailer 4.2.1
remote:        Using railties 4.2.1
remote:        Using sprockets-rails 2.3.1
remote:        Using easy_table 0.0.6
remote:        Using heroku_rails_deflate 1.0.3
remote:        Using simple_form 3.1.0
remote:        Using marginalia 1.3.0
remote:        Using meta-tags 2.0.0
remote:        Using premailer-rails 1.8.2
remote:        Using cells 3.11.3
remote:        Using jquery-rails 4.0.3
remote:        Using rails 4.2.1
remote:        Using coffee-rails 4.1.0
remote:        Using sass-rails 5.0.1
remote:        Using responders 2.1.0
remote:        Using font-awesome-rails 4.3.0.0
remote:        Using jquery-fileupload-rails 0.4.5
remote:        Using jquery-ui-rails 5.0.5
remote:        Using lograge 0.3.2
remote:        Using unobtrusive_flash 3.1.0
remote:        Using apotomo 1.3.1
remote:        Using browser-timezone-rails 0.0.8
remote:        Using gaffe 1.0.2
remote:        Using judge 2.1.0
remote:        Using polymorphic_constraints 1.0.0
remote:        Using turbolinks 2.5.3
remote:        Using compass-rails 2.0.4
remote:        Using social-share-button 0.1.9 from git://github.com/huacnlee/social-share-button.git (at master)
remote:        Using tinymce-rails 4.1.6 from git://github.com/musaffa/tinymce-rails.git (at tinymce_wait_asynchronous_load)
remote:        Using devise 3.5.1
remote:        Using judge-simple_form 1.0.0
remote:        Using jquery-turbolinks 2.1.0
remote:        
remote:        Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
remote:        
remote:        /tmp/build_1ce3994986a2a91bdfabb581890a2b18/vendor/ruby-2.2.2/bin/ruby -r ./siteconf20150622-429-17oq592.rb extconf.rb
remote:        *** extconf.rb failed ***
remote:        Could not create Makefile due to some reason, probably lack of necessary
remote:        libraries and/or headers.  Check the mkmf.log file for more details.  You may
remote:        need configuration options.
remote:        
remote:        Provided configuration options:
remote:        --with-opt-dir
remote:        --without-opt-dir
remote:        --with-opt-include
remote:        --without-opt-include=${opt-dir}/include
remote:        --with-opt-lib
remote:        --without-opt-lib=${opt-dir}/lib
remote:        --with-make-prog
remote:        --without-make-prog
remote:        --srcdir=.
remote:        --curdir
remote:        --ruby=/tmp/build_1ce3994986a2a91bdfabb581890a2b18/vendor/ruby-2.2.2/bin/$(RUBY_BASE_NAME)
remote:        --enable-debug
remote:        --disable-debug
remote:        --with-vips-config
remote:        --without-vips-config
remote:        --with-pkg-config
remote:        --without-pkg-config
remote:        --with-vips-7.29-config
remote:        --without-vips-7.29-config
remote:        --with-vips-7.28-config
remote:        --without-vips-7.28-config
remote:        --with-vips-7.27-config
remote:        --without-vips-7.27-config
remote:        --with-vips-7.26-config
remote:        --without-vips-7.26-config
remote:        --with-vips-7.24-config
remote:        --without-vips-7.24-config
remote:        --with-vips-7.23-config
remote:        --without-vips-7.23-config
remote:        --with-vips-7.22-config
remote:        --without-vips-7.22-config
remote:        --with-vips-7.20-config
remote:        --without-vips-7.20-config
remote:        extconf.rb:27:in `<main>': no pkg_config for any of following libvips versions: 7.29, 7.28, 7.27, 7.26, 7.24, 7.23, 7.22, 7.20 (RuntimeError)
remote:        
remote:        extconf failed, exit code 1
remote:        
remote:        Gem files will remain installed in /tmp/build_1ce3994986a2a91bdfabb581890a2b18/vendor/bundle/ruby/2.2.0/gems/ruby-vips-0.3.9 for inspection.
remote:        Results logged to /tmp/build_1ce3994986a2a91bdfabb581890a2b18/vendor/bundle/ruby/2.2.0/extensions/x86_64-linux/2.2.0-static/ruby-vips-0.3.9/gem_make.out
remote:        An error occurred while installing ruby-vips (0.3.9), and Bundler cannot
remote:        continue.
remote:        Make sure that `gem install ruby-vips -v '0.3.9'` succeeds before bundling.
remote:  !
remote:  !     Failed to install gems via Bundler.
remote:  !
remote: 
remote:  !     Push rejected, failed to compile Ruby app
remote: 
remote: Verifying deploy....
remote: 
remote: !   Push rejected to pathchokro-staging.

I get the following output for $PATH, $PKG_CONFIG_PATH and $LD_LIBRARY_PATH:

PATH

$ heroku run 'echo $PATH' --app pathchokro-staging
Running `echo $PATH` attached to terminal... up, run.2813
/usr/local/bin:/usr/bin:/bin:/app/vendor/vips/bin

PKG_CONFIG_PATH

$ heroku run 'echo $PKG_CONFIG_PATH' --app pathchokro-staging
Running `echo $PKG_CONFIG_PATH` attached to terminal... up, run.2012
:/app/vendor/vips/lib/pkgconfig

LD_LIBRARY_PATH

$ heroku run 'echo $LD_LIBRARY_PATH' --app pathchokro-staging
Running `echo $LD_LIBRARY_PATH` attached to terminal... up, run.6435
:/app/vendor/vips/lib
musaffa commented 9 years ago

Oh I got it working with heroku buildpack multi. First I set the config var:

$ heroku config:set BUILDPACK_URL=https://github.com/ddollar/heroku-buildpack-multi

Then created a .buildpacks with:

https://github.com/alex88/heroku-buildpack-vips.git
https://github.com/heroku/heroku-buildpack-ruby.git

Now it works.