ruby-on-rails – Ruby Rails – mac上的gcc问题

ruby-on-rails – Ruby Rails – mac上的gcc问题,第1张

概述我正在尝试在 ruby rails上创建我的第一个应用程序. >我在Mac OsX(小牛队) >我安装了最新的xCode(5我相信)command line tools >我已经安装了bitnami捆绑包ruby stack >我添加了rails(sudo gem install rails -V) 创建我自己的项目之前的所有步骤—- see here 在ruby控制台中我键入: sudo rai 我正在尝试在 ruby rails上创建我的第一个应用程序.

>我在Mac OsX(小牛队)
>我安装了最新的xCode(5我相信)command line tools
>我已经安装了bitnami捆绑包ruby stack
>我添加了rails(sudo gem install rails -V)

创建我自己的项目之前的所有步骤—- see here

在ruby控制台中我键入:

sudo rails new helloworld

..然后它会做一些创造性的东西,直到它达到以下几行:

run  bundle installFetching gem Metadata from https://rubygems.org/..........Fetching gem Metadata from https://rubygems.org/..Resolving dependencIEs...Using rake (10.1.1) Using i18n (0.6.9) Using minitest (4.7.5) Using multi_Json (1.8.4) Using atomic (1.1.14) Using thread_safe (0.1.3) Using tzinfo (0.3.38) Using activesupport (4.0.2) Using builder (3.1.4) Using erubis (2.7.0) Using rack (1.5.2) Using rack-test (0.6.2) Using actionpack (4.0.2) Using mime-types (1.25.1) Using polyglot (0.3.3) Using treetop (1.4.15) Using mail (2.5.4) Using actionmailer (4.0.2) Using activemodel (4.0.2) Using activerecord-deprecated_finders (1.0.3) Using arel (4.0.1) Using activerecord (4.0.2) Using bundler (1.3.5) Using coffee-script-source (1.7.0) Using execJs (2.0.2) Using coffee-script (2.2.0) Using thor (0.18.1) Using railtIEs (4.0.2) Using coffee-rails (4.0.1) Using hike (1.2.3) Using jbuilder (1.5.3) Using jquery-rails (3.1.0) Installing Json (1.8.1) Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.        /Applications/rubystack-1.9.3-19/ruby/bin/ruby extconf.rb creating Makefilemakecompiling generator.csh: line 1: 58350 Trace/BPT trap: 5       /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -sdk / -find gcc 2> /dev/nullgcc: error: unable to find utility "gcc",not a developer tool or in PATHmake: *** [generator.o] Error 72Gem files will remain installed in /Applications/rubystack-1.9.3-19/ruby/lib/ruby/gems/1.9.1/gems/Json-1.8.1 for inspection.Results logged to /Applications/rubystack-1.9.3-19/ruby/lib/ruby/gems/1.9.1/gems/Json-1.8.1/ext/Json/ext/generator/gem_make.outAn error occurred while installing Json (1.8.1),and Bundler cannot continue.Make sure that `gem install Json -v '1.8.1'` succeeds before bundling.

在rubyconsole中安装Json-1.8.1不起作用 – 我收到以下错误:

sudo gem install Json -v '1.8.1'bash-3.2$sudo gem install Json -v '1.8.1'Password:Building native extensions.  This Could take a while...ERROR:  Error installing Json:    ERROR: Failed to build gem native extension.        /Applications/rubystack-1.9.3-19/ruby/bin/ruby extconf.rbcreating Makefilemakecompiling generator.csh: line 1: 60535 Trace/BPT trap: 5       /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -sdk / -find gcc 2> /dev/nullgcc: error: unable to find utility "gcc",not a developer tool or in PATHmake: *** [generator.o] Error 72Gem files will remain installed in /Applications/rubystack-1.9.3-19/ruby/lib/ruby/gems/1.9.1/gems/Json-1.8.1 for inspection.Results logged to /Applications/rubystack-1.9.3-19/ruby/lib/ruby/gems/1.9.1/gems/Json-1.8.1/ext/Json/ext/generator/gem_make.out

外面的rubyconsole它工作.但是,这并没有解决上述问题.

我按照以下步骤 *** 作:

How to use/install gcc on Mac OS X 10.8 / Xcode 4.4

我也按照这里的步骤:

http://new-bamboo.co.uk/blog/2013/10/24/3-quick-tips-for-coding-with-os-x-10-9-mavericks

任何帮助将不胜感激..谢谢,乔治

更新:我运行以下内容:

cd /usr/binsudo mv gcc gcc_mavssudo ln -s /usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/gcc-4.2 gcc

现在我收到一条不同的错误消息:

Installing Json (1.8.1) Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.        /Applications/rubystack-1.9.3-19/ruby/bin/ruby extconf.rb creating Makefilemakecompiling generator.csh: line 1: 67709 Trace/BPT trap: 5       /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -sdk / -find as 2> /dev/nullas: error: unable to find utility "as",not a developer tool or in PATHmake: *** [generator.o] Error 2Gem files will remain installed in /Applications/rubystack-1.9.3-19/ruby/lib/ruby/gems/1.9.1/gems/Json-1.8.1 for inspection.Results logged to /Applications/rubystack-1.9.3-19/ruby/lib/ruby/gems/1.9.1/gems/Json-1.8.1/ext/Json/ext/generator/gem_make.outAn error occurred while installing Json (1.8.1),and Bundler cannot continue.Make sure that `gem install Json -v '1.8.1'` succeeds before bundling.
解决方法 好的,完全删除了xcode&开发者工具.

重新安装xocode 5.02&特立独行的开发工具(10月下旬)

运行以下命令:

sudo xcode-select -switch / library / Developer / Commandlinetools

Sovled.

总结

以上是内存溢出为你收集整理的ruby-on-rails – Ruby Rails – mac上的gcc问题全部内容,希望文章能够帮你解决ruby-on-rails – Ruby Rails – mac上的gcc问题所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/langs/1284275.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-06-09
下一篇 2022-06-09

发表评论

登录后才能评论

评论列表(0条)

保存