Ruby on rails 安装导轨问题
我正在尝试使用Rails,当我使用这个系统时,会说Ruby on rails 安装导轨问题,ruby-on-rails,ruby,xcode,installation,Ruby On Rails,Ruby,Xcode,Installation,我正在尝试使用Rails,当我使用这个系统时,会说 Rails is not currently installed on this system. To get the latest version, simply type: $ sudo gem install rails 然后我运行-sudogem安装rails 结果我得到了 Building native extensions. This could take a while... ERROR: Error installing
Rails is not currently installed on this system. To get the latest version, simply type:
$ sudo gem install rails
然后我运行-sudogem安装rails
结果我得到了
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.6.5 for inspection.
Results logged to /Library/Ruby/Gems/1.8/gems/json-1.6.5/ext/json/ext/parser/gem_make.out
有没有办法解决这个问题?他在安装json gem时遇到了问题。我通过安装Ruby DevKit解决了这个问题 下载表格如下: 在此处安装教程:
干杯,Stefan你是Mac用户。Xcode包中称为“BSD子系统”的“通用构建工具”通常已经过时。例如,安装的ruby版本为1.8。帮自己一个大忙,通过PackageManager安装常用的构建工具。在此之后,我建议安装一个更新版本的ruby as rails,它将很快失去对您正在使用的1.8系列的支持。使用 安装后,你有岩石坚实的基础!安装ruby版本现在只需运行
rvm install 1.9.2
,您将获得MRI 1.9.2系列的最新补丁版本
使用ruby 1.9.2,安装当前版本的RubyOnRails不会有问题
现在大多数Ruby/Rails开发人员都使用这个工具链。您是以root用户身份登录的吗?谷歌说:不幸的是,我使用的是MacOSX10.7.3