0

我正在尝试在 Ruby 2.1.1 上安装带有 RVM 的 linecache。

$ ruby --version
ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-linux]

我运行捆绑安装

$ bundle install

当我运行捆绑安装时,它说它与 1.9.x 不兼容:

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

/home/g/.rvm/rubies/ruby-2.1.2/bin/ruby extconf.rb 
Can't handle 1.9.x yet
*** 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=/home/g/.rvm/rubies/ruby-2.1.2/bin/ruby

extconf failed, exit code 1

Gem files will remain installed in /home/g/.rvm/gems/ruby-2.1.2/gems/linecache-0.46 
for inspection.

Results logged to /home/g/.rvm/gems/ruby-2.1.2/extensions/x86_64-linux/2.1.0
/linecache-0.46/gem_make.out

An error occurred while installing linecache (0.46), and Bundler cannot continue.
Make sure that `gem install linecache -v '0.46'` succeeds before bundling.

有什么想法吗?

4

1 回答 1

1

Linecache 3 年没有更新了,最近一次更新是升级到 1.9.3 版本。除非你从别人的叉子上拉它,因为你使用的是 2.1.1,gem 将无法工作。错误消息很可能尚未更新,因此它只是告诉您它对 1.9.x 无效,因为它不知道任何较新的版本。

于 2014-06-22T05:06:03.647 回答