Bundler在gem json安装时停止

时间:2014-03-24 23:09:47

标签: sass bundler

我尝试用bundler安装susy2 / sass / compass。 我的Gemfile:

source "https://rubygems.org"
gem 'sass', '~> 3.3.2'
gem 'susy', '~> 2.1.1'
gem 'json', '~> 1.8.1'
gem 'compass', '~> 1.0.0.alpha.19'

bundle install显示错误

Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

        /usr/bin/ruby1.9.1 extconf.rb 
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- mkmf (LoadError)
    from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from extconf.rb:1:in `<main>'

Gem files will remain installed in /home/bernie/.bundler/tmp/6210/gems/json-1.8.1 for inspection.
Results logged to /home/bernie/.bundler/tmp/6210/gems/json-1.8.1/ext/json/ext/generator/gem_make.out
An error occurred while installing json (1.8.1), and Bundler cannot continue.
Make sure that `gem install json -v '1.8.1'` succeeds before bundling.

宝石清单显示:

bundler (1.5.1)
celluloid (0.15.2)
chunky_png (1.3.0)
compass (0.12.4)
compass-core (1.0.0.alpha.19)
compass-import-once (1.0.4)
fssm (0.2.10)
multi_json (1.9.2)
permutation (0.1.8)
rake (10.2.0)
rb-fsevent (0.9.4)
sass (3.3.4, 3.2.18)
susy (2.1.1)
timers (1.1.0)

任何想法?

1 个答案:

答案 0 :(得分:1)

一点点谷歌搜索告诉我this,你试过吗?

sudo apt-get install ruby1.9.1-dev