[英]Installation of Rails
I tried to install Rails on OS X Lion using the following command in Terminal: 我尝试在终端中使用以下命令在OS X Lion上安装Rails:
sudo gem install rails
But I am getting the following error: 但是我收到以下错误:
Building native extensions. This could take a while...
ERROR: Error installing rails:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb
mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ruby.h
Gem files will remain installed in /Library/Ruby/Gems/1.8/gems/json-1.7.6 for inspection.
Results logged to /Library/Ruby/Gems/1.8/gems/json-1.7.6/ext/json/ext/generator/gem_make.out
Any help would be appreciated. 任何帮助,将不胜感激。
First install the Command Line Tools in the latest Xcode-Version
. 首先在最新的
Xcode-Version
安装命令行工具。
and then run sudo gem install rails
然后运行
sudo gem install rails
To install Command Line Tools, go to XCode Preferences > Downloads. 要安装命令行工具,请转到XCode首选项>下载。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.