我对 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
最佳答案
您没有安装任何编译器,您最好的选择是osx-gcc-installer ,它将为您提供编译所需的所有工具。
另外请确保不要使用 4.1 以上的 Xcode - 它不提供 GCC 编译器(仅 LLVM),甚至 ruby-1.9.3-p125 还没有完全准备好 clang(LLVM),因此预计会出现错误。
您可以open a ticket修复消息以提供更多信息 - 我应该能够改进它。
关于ruby-on-rails - Mac OS X 10.7.3 上的 Ruby on Rails 安装新增功能,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9679347/