我正在运行Mac OSX 10.9 Maverick。我为1个管理员用户安装了rails 4。然后我创建了另一个用户,再次是管理员。它对第一个用户工作正常,但对于第二个用户我得到以下错误
Rails is not currently installed on this system. To get the latest version, simply type:
$ sudo gem install rails
You can then rerun your "rails" command.
我也尝试运行它错误的命令,但后来又出现了另一个错误。
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/2.0/usr/bin/ruby extconf.rb
mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/include/ruby.h
Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/json-1.8.1 for inspection.
我的问题是我是否必须为每个MAC OSX用户安装rails? 如果没有,那么如何为每个用户全局安装rails。 如果我必须为每个用户安装,那么为什么我会遇到上述错误?