“没有这样的文件加载 - memcached”问题

时间:2010-08-27 06:42:40

标签: ruby-on-rails memcached

我正在玩一个开源项目并且遇到“memcached”问题。

实际上,当我执行“rake db:migrate”时,我收到“没有这样的文件加载 - memcached”错误。在我看来,我应该以某种方式安装它,但不幸的是“gem install memcached”会丢失错误。

这是我的控制台日志:

D:\BitNami RubyStack projects\spot-us>rake db:migrate
(in D:/BitNami RubyStack projects/spot-us)
rake aborted!
no such file to load -- memcached

(See full trace by running task with --trace)

D:\BitNami RubyStack projects\spot-us>gem install memcached
Building native extensions.  This could take a while...
ERROR:  Error installing memcached:
        ERROR: Failed to build gem native extension.

C:/web/BitNami_RubyStack/ruby/bin/ruby.exe extconf.rb
Building libmemcached.
tar xzf libmemcached-0.32.tar.gz 2>&1
Patching libmemcached source.
patch -p1 -Z < libmemcached.patch
patching file libmemcached-0.32/libmemcached/memcached_response.c
Assertion failed: hunk, file ../patch-2.5.9-src/patch.c, line 354

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
*** 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=C:/web/BitNami_RubyStack/ruby/bin/ruby
extconf.rb:52:in `check_libmemcached': 'patch -p1 -Z < libmemcached.patch' faile
d (RuntimeError)
        from extconf.rb:34:in `chdir'
        from extconf.rb:34:in `check_libmemcached'
        from extconf.rb:101


Gem files will remain installed in C:/web/BitNami_RubyStack/ruby/lib/ruby/gems/1
.8/gems/memcached-0.20.1 for inspection.
Results logged to C:/web/BitNami_RubyStack/ruby/lib/ruby/gems/1.8/gems/memcached
-0.20.1/ext/gem_make.out

D:\BitNami RubyStack projects\spot-us>

如何解决“memcached”安装问题?

THX。

1 个答案:

答案 0 :(得分:0)

安装“Memcahed for Windows