我试图使用ruby1.9.1在Ubuntu Natty Narwhal 11.04上安装rails.
我安装了apt-get install ruby1.9.1-full包含dev包的ruby .我用Google搜索了错误,所有人都建议我安装我已经拥有的1.9.1-dev.
Building native extensions. This could take a while...
ERROR: Error installing rails:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.8 extconf.rb
extconf.rb:36:in `require': no such file to load -- mkmf (LoadError)
from extconf.rb:36
Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/bcrypt-ruby-3.0.1 for inspection.
Results logged to /usr/lib/ruby/gems/1.8/gems/bcrypt-ruby-3.0.1/ext/mri/gem_make.out
Run Code Online (Sandbox Code Playgroud) 当我跑:
rails new blog
Run Code Online (Sandbox Code Playgroud)
我明白了:
Installing json (1.7.3)
Gem::InstallError: The 'json' native gem requires installed build tools.
Please update your PATH to include build tools or download the DevKit
from 'http://rubyinstaller.org/downloads' and follow the instructions
at 'http://github.com/oneclick/rubyinstaller/wiki/Development-Kit'
An error occurred while installing json (1.7.3), and Bundler cannot continue.
Make sure that `gem install json -v '1.7.3'` succeeds before bundling.
Run Code Online (Sandbox Code Playgroud)
当我跑:
gem install json -v 1.7.3
Run Code Online (Sandbox Code Playgroud)
我明白了:
Please update your PATH to include build tools or download the DevKit
from 'http://rubyinstaller.org/downloads' …Run Code Online (Sandbox Code Playgroud)