Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby/20.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何为Ruby Development安装Xcode 4.1_Ruby_Xcode_Installation - Fatal编程技术网

如何为Ruby Development安装Xcode 4.1

如何为Ruby Development安装Xcode 4.1,ruby,xcode,installation,Ruby,Xcode,Installation,如何在没有“LLVM”的情况下安装gcc 我想安装一个旧版本的Xcode,以便在Ruby 1.8.7上进行Ruby开发。在我通过app store从4.1升级到4.3之前,它在我的机器上工作。升级后,我发现许多gem无法编译。(TheRubyRacer,MySQL)此后,我使用sudo/Developer/Library/uninstall devtools--mode=all命令从系统中删除了4.1和4.3。重新启动后,我验证了gcc命令失败,并且Xcode未列在应用程序文件夹中 我从开发者中

如何在没有“LLVM”的情况下安装gcc

我想安装一个旧版本的Xcode,以便在Ruby 1.8.7上进行Ruby开发。在我通过app store从4.1升级到4.3之前,它在我的机器上工作。升级后,我发现许多gem无法编译。(TheRubyRacer,MySQL)此后,我使用
sudo/Developer/Library/uninstall devtools--mode=all
命令从系统中删除了4.1和4.3。重新启动后,我验证了
gcc
命令失败,并且Xcode未列在应用程序文件夹中

我从开发者中心下载了Xcode 4.1 for Lion并安装了它。不幸的是,我仍然无法从以前建造宝石。我检查了gcc的版本,我发现我确实安装了4.2

gcc--version

i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
我在
gem安装mysql
中的错误如下

Building native extensions. This could take a while... ERROR: Error installing mysql: ERROR: Failed to build gem native extension. /Users/jjasonclark/.rvm/rubies/ruby-1.8.7-p358/bin/ruby extconf.rb checking for mysql_query() in -lmysqlclient... no checking for main() in -lm... yes checking for mysql_query() in -lmysqlclient... no checking for main() in -lz... yes checking for mysql_query() in -lmysqlclient... no checking for main() in -lsocket... no checking for mysql_query() in -lmysqlclient... no checking for main() in -lnsl... no checking for mysql_query() in -lmysqlclient... no checking for main() in -lmygcc... no checking for mysql_query() in -lmysqlclient... no *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options. Provided configuration options: --with-opt-dir --without-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/lib --with-make-prog --without-make-prog --srcdir=. --curdir --ruby=/Users/jjasonclark/.rvm/rubies/ruby-1.8.7-p358/bin/ruby --with-mysql-config --without-mysql-config --with-mysql-dir --without-mysql-dir --with-mysql-include --without-mysql-include=${mysql-dir}/include --with-mysql-lib --without-mysql-lib=${mysql-dir}/lib --with-mysqlclientlib --without-mysqlclientlib --with-mlib --without-mlib --with-mysqlclientlib --without-mysqlclientlib --with-zlib --without-zlib --with-mysqlclientlib --without-mysqlclientlib --with-socketlib --without-socketlib --with-mysqlclientlib --without-mysqlclientlib --with-nsllib --without-nsllib --with-mysqlclientlib --without-mysqlclientlib --with-mygcclib --without-mygcclib --with-mysqlclientlib --without-mysqlclientlib Gem files will remain installed in /Users/jjasonclark/.rvm/gems/ruby-1.8.7-p358/gems/mysql-2.8.1 for inspection. Results logged to /Users/jjasonclark/.rvm/gems/ruby-1.8.7-p358/gems/mysql-2.8.1/ext/mysql_api/gem_make.out 构建本机扩展。这可能需要一段时间。。。 错误:安装mysql时出错: 错误:无法生成gem本机扩展。 /Users/jjasonclark/.rvm/rubies/ruby-1.8.7-p358/bin/ruby-extconf.rb 正在-lmysqlclient中检查mysql_query()。。。不 正在检查-lm中的main()。。。对 正在-lmysqlclient中检查mysql_query()。。。不 正在检查-lz中的main()。。。对 正在-lmysqlclient中检查mysql_query()。。。不 正在-lsocket中检查main()。。。不 正在-lmysqlclient中检查mysql_query()。。。不 正在检查-lnsl中的main()。。。不 正在-lmysqlclient中检查mysql_query()。。。不 正在检查-lmygcc中的main()。。。不 正在-lmysqlclient中检查mysql_query()。。。不 ***extconf.rb失败*** 由于某些原因无法创建Makefile,可能是缺少 必要的库和/或标题。查看mkmf.log文件了解更多信息 细节。您可能需要配置选项。 提供的配置选项: --使用opt dir --不带opt dir --选择包含 --不带opt include=${opt dir}/include --使用opt lib --不带opt lib=${opt dir}/lib --用make prog --没有make prog --srcdir=。 --库尔迪尔 --ruby=/Users/jjasonclark/.rvm/rubies/ruby-1.8.7-p358/bin/ruby --使用mysql配置 --没有mysql配置 --使用mysql目录 --没有mysql目录 --使用mysql包括 --不带mysql include=${mysql dir}/include --使用mysql库 --没有mysql-lib=${mysql-dir}/lib --使用mysqlclientlib --没有mysqlclientlib --使用mlib --没有mlib --使用mysqlclientlib --没有mysqlclientlib --与zlib --没有zlib --使用mysqlclientlib --没有mysqlclientlib --用socketlib --没有socketlib --使用mysqlclientlib --没有mysqlclientlib --与nsllib合作 --没有nsllib --使用mysqlclientlib --没有mysqlclientlib --用mygcclib --没有mygcclib --使用mysqlclientlib --没有mysqlclientlib Gem文件仍将安装在/Users/jjasonclark/.rvm/gems/ruby-1.8.7-p358/gems/mysql-2.8.1中以供检查。 结果登录到/Users/jjasonclark/.rvm/gems/ruby-1.8.7-p358/gems/mysql-2.8.1/ext/mysql\u api/gem\u make.out
我永远无法让Xcode使用Ruby的旧版本。我的解决方案是安装。

你能检查首选项>下载吗?你安装了命令行工具吗?我似乎在Xcode应用程序或Xcode安装程序应用程序的首选项下都没有
下载
选项。在Xcode安装程序完成之前,我无法运行
gcc
。基本上,当他们将Xcode移动到apps目录时,您必须在之后添加命令行工具。很抱歉误导了你,可以理解。从开发者中心看来,他们上一次推出Xcode 4.1的命令行工具包是在2012年3月。尽管软件包的描述说它包含在完整的IDE中。