【问题标题】:met memcachier(memcached) error when deploy to heroku部署到heroku时遇到memcachier(memcached)错误
【发布时间】:2014-06-17 07:58:43
【问题描述】:

Gemfile 上的 ruby​​ 版本是 v2.1.2,rails 版本是 4.1.1

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

还有这样的。

gem "memcachier"
gem 'dalli'

我已经添加了 memcachier 插件。 但是当我将我的 rails 代码部署到 heroku 时,我遇到了这个错误。

       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

这是什么原因,如何避免?

【问题讨论】:

    标签: ruby-on-rails heroku deployment memcached memcachier


    【解决方案1】:

    我解决了这个问题。 这是因为 identity_cache gem。 它依赖于 memcached。 所以我将它降级到 v0.1.0 并解决了。

    【讨论】:

      【解决方案2】:
      yum install cyrus-sasl-devel.x86_64
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2019-06-01
        • 1970-01-01
        • 1970-01-01
        • 2016-08-26
        • 1970-01-01
        • 2017-12-18
        相关资源
        最近更新 更多