我正在尝试升级我的rails 3.2.3 app。我已将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中导航,所以我在这里苦苦挣扎。有任何想法吗?
答案 0 :(得分:4)
/usr/bin/gcc-4.2
可能已经是一个符号链接,但是一个指向不存在的文件的符号链接。