安装配置rails环境

我的ubuntu已经安装ruby1.9.3,安装rails的时候提示错误

Building native extensions.  This could take a while...
ERROR:  Error installing rails:
    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:13:in `<main>'


Gem files will remain installed in /var/lib/gems/1.9.1/gems/atomic-1.1.14 for inspection.
Results logged to /var/lib/gems/1.9.1/gems/atomic-1.1.14/ext/gem_make.out

 据说是,需要ruby1.9.1的版本才能编译?先试试看吧

sudo apt-get install ruby1.9.1-dev
sudo gem install rails

居然就通过了......好吧

posted @ 2014-01-06 11:05  valleylord  阅读(258)  评论(0编辑  收藏  举报