【发布时间】:2012-03-13 06:31:49
【问题描述】:
我对 OS X 和 RoR 非常陌生,在学习 Hartl 的 RoR 教程时遇到了一些错误。
我已经安装了 Git 和 RVM,但在安装 Ruby 时出现错误 - 因此也无法安装 Ruby Gems 和 Rails。
我已经阅读了日志文件,但无法弄清楚问题出在哪里...看来我的机器无法运行 make 并且 --version 存在问题。有些文件也不存在。
非常感谢您的帮助:)
User-MacBook-Air:~ haseebjaved$ rvm install 1.9.2
Fetching yaml-0.1.4.tar.gz to /Users/haseebjaved/.rvm/archives
Extracting yaml-0.1.4.tar.gz to /Users/haseebjaved/.rvm/src
Configuring yaml in /Users/haseebjaved/.rvm/src/yaml-0.1.4.
Error running ' ./configure --prefix="/Users/haseebjaved/.rvm/usr" ', please read /Users/haseebjaved/.rvm/log/ruby-1.9.2-p318/yaml/configure.log
Compiling yaml in /Users/haseebjaved/.rvm/src/yaml-0.1.4.
Error running 'make ', please read /Users/haseebjaved/.rvm/log/ruby-1.9.2-p318/yaml/make.log
Database file /Users/haseebjaved/.rvm/config/packages does not exist.
/Users/haseebjaved/.rvm/scripts/functions/build: line 28: --version: command not found
Installing Ruby from source to: /Users/haseebjaved/.rvm/rubies/ruby-1.9.2-p318, this may take a while depending on your cpu(s)...
ruby-1.9.2-p318 - #fetching
ruby-1.9.2-p318 - #extracted to /Users/haseebjaved/.rvm/src/ruby-1.9.2-p318 (already extracted)
ruby-1.9.2-p318 - #configuring
Error running ' ./configure --prefix=/Users/haseebjaved/.rvm/rubies/ruby-1.9.2-p318 --enable-shared --disable-install-doc --with-libyaml --with-opt-dir=/Users/haseebjaved/.rvm/usr ', please read /Users/haseebjaved/.rvm/log/ruby-1.9.2-p318/configure.log
There has been an error while running configure. Halting the installation.
/Users/haseebjaved/.rvm/scripts/functions/build: line 28: --version: command not found
【问题讨论】:
-
您使用的是哪个版本的 XCode?如果您的 XCode > 4.1,我建议您降级,否则您将只能编译 ruby 1.9.3,并且很多 af gem 会给您带来麻烦。安装 XCode 4.1 并导出
CC=/usr/bin/gcc-4.2这将允许您使用 rvm 编译 ruby。 -
您好 Nolith,感谢您的回复。我已经安装了 XCode 4.3.1。如何降级到 4.1?基本上,我正在尝试按照 Hartl 教程的指示运行“rvm install 1.8.7”,然后运行“rvm install 1.9.2”,但是当我执行两个安装命令时出现不同的错误......对于“rvm install 1.8”。 7',我收到错误'错误运行'patch -F 25 -p1 -N -f
-
我为 'rvm install 1.8.7' 得到的第二个错误是 Error running ' ./configure --prefix=/Users/haseebjaved/.rvm/rubies/ruby-1.8.7-p358 --enable-shared --disable-install-doc ',请阅读 /Users/haseebjaved/.rvm/log/ruby-1.8.7-p358/configure.log 运行配置时出错。停止安装。
-
使用 XCode 4.3.1 你不能安装 ruby developer.apple.com 上找到它,您必须使用开发人员 ID 登录并搜索 XCode 4.1 的下载区域)
-
谢谢。我在开发者网站上找不到 XCode 4.1。你能看到它还是你认为他们删除了它?
标签: ruby-on-rails ruby macos installation rvm