我正在尝试升级我的 rails 3.2.3 应用程序。我已将 gemfile 更新为gem 'rails', '3.2.11'
并运行bundle update rails
,但出现以下错误:
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/Users/Arel/.rvm/rubies/ruby-1.9.3-head/bin/ruby extconf.rb
creating Makefile
make
compiling generator.c
make: /usr/bin/gcc-4.2: No such file or directory
make: *** [generator.o] Error 1
Gem files will remain installed in /Users/Arel/.rvm/gems/ruby-1.9.3-head/gems/json-1.7.6 for inspection.
Results logged to /Users/Arel/.rvm/gems/ruby-1.9.3-head/gems/json-1.7.6/ext/json/ext/generator/gem_make.out
An error occured while installing json (1.7.6), and Bundler cannot continue.
Make sure that `gem install json -v '1.7.6'` succeeds before bundling.
所以我尝试了到处都找到的解决方案,使用以下命令创建符号链接:
sudo ln -s /usr/bin/gcc /usr/bin/gcc-4.2
但这只是返回错误:
ln: /usr/bin/gcc-4.2: File exists
我不太了解使用终端在 OSX 中导航,所以我在这里有点挣扎。有任何想法吗?