0

何が起こっているのかわかりませんが、OS lion 用の Xcode をダウンロードしましたが、動かなくなりました

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.3 for inspection.
Results logged to /Library/Ruby/Gems/1.8/gems/json-1.7.3/ext/json/ext/parser/gem_make.out
Jung-Hyun-Jeons-MacBook-Pro:~ peterjeon$ rails -v
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.
4

1 に答える 1

1

Ruby のバージョン マネージャーである RVM を使用することをお勧めします。そして、Rubyの最後のバージョンを使用しています。

次の 1 つのコマンド ラインで RVM をインストールします。

curl https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer | bash -s stable

自分が何をしているのかわかっている場合を除いて、root としてインストールしないでください (問題を避けるため)。

インストールが完了したら、Ruby をインストールしますrvm install 1.9.3

そして、インストールしたバージョンをデフォルトとして使用します: rvm use 1.9.3 --default.
(プレフィックスを使用しない場合は、--defaultRuby を使用するたびにコマンドを実行する必要があります)。

それが役に立てば幸いです、頑張ってください!

于 2012-05-19T08:21:49.197 に答える