我最近更新到Mountain Lion并重新安装了Ruby,但是当我尝试运行测试Rails应用程序时,我收到一条错误消息,指出我的系统上"当前未安装Rails".我按照它说的做,输入sudo gem install rails并获得:
cleared faster_require caches due to new gem install...
Successfully installed rails-3.2.7
1 gem installed
Installing ri documentation for rails-3.2.7...
Installing RDoc documentation for rails-3.2.7...
Run Code Online (Sandbox Code Playgroud)
但是当我检查安装哪个rails版本时,我得到的是:
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.
Run Code Online (Sandbox Code Playgroud)
我也尝试过gem install rails:
Building native extensions. This could take a while...
ERROR: Error installing rails:
ERROR: Failed to build …Run Code Online (Sandbox Code Playgroud)