Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/macos/9.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/batch-file/6.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
在没有Xcode命令行工具的情况下安装Ruby时出错:没有这样的文件,但它存在_Ruby_Macos_Bash_Compiler Errors_Rvm - Fatal编程技术网

在没有Xcode命令行工具的情况下安装Ruby时出错:没有这样的文件,但它存在

在没有Xcode命令行工具的情况下安装Ruby时出错:没有这样的文件,但它存在,ruby,macos,bash,compiler-errors,rvm,Ruby,Macos,Bash,Compiler Errors,Rvm,我安装RVM和Ruby时没有使用Xcode的命令行工具(在MacOSX10.8.2(12C60)(MountainLion)上使用Xcode 4.5(4G182)) RVM安装良好。但是,当我尝试安装Ruby时,我得到了错误:limits.h:没有这样的文件或目录 但是,该文件存在于此,因为cat工作正常,并且: $ file /usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/../lib/gcc/i686-apple-darwin11/4.2.1/i

我安装RVM和Ruby时没有使用Xcode的命令行工具(在MacOSX10.8.2(12C60)(MountainLion)上使用Xcode 4.5(4G182))

RVM安装良好。但是,当我尝试安装Ruby时,我得到了
错误:limits.h:没有这样的文件或目录

但是,该文件存在于此,因为
cat
工作正常,并且:

$ file /usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/../lib/gcc/i686-apple-darwin11/4.2.1/include/limits.h
/usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/../lib/gcc/i686-apple-darwin11/4.2.1/include/limits.h: ASCII c program text
那么,为什么bash说它不存在呢

以下问题类似,但没有帮助:


您需要安装osx gcc安装程序(或命令行工具+gcc-4.2)才能使其正常工作


阅读
rvm要求
了解正确安装ruby所需的信息。

不一定是批评,但我知道当我发现JewelryBox时,我开始放弃手动安装方法:你怎么知道ruby正试图从你列出的同一路径加载“limits.h”?您说bash说它不存在,但错误消息没有说
bash
。您使用哪个命令从哪个目录安装Ruby?它可能不知道应该在
/usr/local/…
中查找。在Linux上,我会使用
strace
查看安装程序尝试的完整文件路径。您为什么没有安装命令行工具?这对于使用许多不同的宝石是必要的。@c标出与要点相关的问题中的错误,但我意识到这并不明显,所以我将其分离出来。