ruby-on-railsherokudeploymentmemcachedmemcachier

met memcachier(memcached) error when deploy to heroku


ruby version on Gemfile is v2.1.2 and rails version is 4.1.1

 ruby '2.1.2'
 gem 'rails', '4.1.1'

and there is like this.

gem "memcachier"
gem 'dalli'

I added memcachier add-on already. but when deploy my rails code to heroku, I met this error.

       Installing memcachier 0.0.2

       Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

       /tmp/build_af6f5b6f-490c-4015-8729-49c519b4a44c/vendor/ruby-2.1.2/bin/ruby extconf.rb
       checking for sasl/sasl.h... no
       Please install SASL to continue. The package is called libsasl2-dev on Ubuntu and cyrus-sasl on Gentoo.
       *** extconf.rb failed ***
       Could not create Makefile due to some reason, probably lack of necessary
       libraries and/or headers.  Check the mkmf.log file for more details.  You may
       need configuration options.

       Provided configuration options:
       --with-opt-dir
       --without-opt-dir
       --with-opt-include
       --without-opt-include=${opt-dir}/include
       --with-opt-lib
       --without-opt-lib=${opt-dir}/lib
       --with-make-prog
       --without-make-prog
       --srcdir=.
       --curdir
       --ruby=/tmp/build_af6f5b6f-490c-4015-8729-49c519b4a44c/vendor/ruby-2.1.2/bin/ruby

       extconf failed, exit code 1

       Gem files will remain installed in /tmp/build_af6f5b6f-490c-4015-8729-49c519b4a44c/vendor/bundle/ruby/2.1.0/gems/memcached-1.8.0 for inspection.
       Results logged to /tmp/build_af6f5b6f-490c-4015-8729-49c519b4a44c/vendor/bundle/ruby/2.1.0/extensions/x86_64-linux/2.1.0-static/memcached-1.8.0/gem_make.out
       Installing newrelic_rpm 3.8.1.221
       Installing kgio 2.9.2
       An error occurred while installing memcached (1.8.0), and Bundler cannot
       continue.
       Make sure that `gem install memcached -v '1.8.0'` succeeds before bundling.
 !
 !     Failed to install gems via Bundler.
 !

 !     Push rejected, failed to compile Ruby app

what is the reason of this and how can I avoid?


Solution

  • I solved this. this is because of identity_cache gem. it has a dependancy on memcached. so I downgrade it to v0.1.0 and it solved.