Mục tiêu cuối cùng của tôi là cài đặt phiên bản hiện tại của Ruby on Rails. Tôi đang chạy trên OS X Mountain Lion. Dưới đây là quá trình của tôi cho đến nay:Sự cố khi cài đặt Ruby 2.0.0-p247 qua RVM (OSX Mountain Lion)
cài đặt RVM
$ \curl -L https://get.rvm.io | bash -s stable
Kiểm tra cho biết (và tôi giả định đã được phê duyệt) cài đặt
$ rvm list known
tôi thấy rằng ổn định xây dựng hiện nay là sẵn
[ruby-]2.0.0[-p247]
Nhập lệnh để cài đặt
$ rvm install 2.0.0-p247
Lưu ý: Tôi cũng đã cố gắng những cài đặt lệnh
$ rvm install ruby-2.0.0-p247
$ rvm install ruby=2.0.0-p247
Tôi nhận được hư không nhanh. Kết quả:
$ rvm install 2.0.0-p247
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.8/x86_64/ruby-2.0.0-p247.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Installing requirements for osx, might require sudo password.
Certificates in '/usr/local/etc/openssl/cert.pem' already are up to date.
Requirements installation successful.
Installing Ruby from source to: /Users/xxxxx/.rvm/rubies/ruby-2.0.0-p247, this may take a while depending on your cpu(s)...
ruby-2.0.0-p247 - #downloading ruby-2.0.0-p247, this may take a while depending on your connection...
ruby-2.0.0-p247 - #extracted to /Users/xxxxx/.rvm/src/ruby-2.0.0-p247 (already extracted)
ruby-2.0.0-p247 - #configuring........
Error running './configure --prefix=/Users/xxxxx/.rvm/rubies/ruby-2.0.0-p247 --with-opt-dir=/usr/local/opt/libyaml:/usr/local/opt/readline:/usr/local/opt/libksba:/usr/local/opt/openssl --disable-install-doc --without-tcl --without-tk --enable-shared',
please read /Users/xxxxx/.rvm/log/ruby-2.0.0-p247/1375141206_configure.log
There has been an error while running configure. Halting the installation.
Tôi cũng chạy lệnh này trong chế độ gỡ lỗi. Để tránh lộn xộn, bạn có thể truy cập nó here.
Ngoài ra, đây là nhật ký:
./configure
current path: /Users/xxxxx/.rvm/src/ruby-2.0.0-p247
command(7): ./configure --prefix=/Users/xxxxx/.rvm/rubies/ruby-2.0.0-p247 --with-opt-dir=/usr/local/opt/libyaml:/usr/local/opt/readline:/usr/local/opt/libksba:/usr/local/opt/openssl --disable-install-doc --without-tcl --without-tk --enable-shared
configure: WARNING: unrecognized options: --without-tcl, --without-tk
checking build system type... x86_64-apple-darwin12.2.1
checking host system type... x86_64-apple-darwin12.2.1
checking target system type... x86_64-apple-darwin12.2.1
checking whether the C compiler works... no
configure: error: in `/Users/xxxxx/.rvm/src/ruby-2.0.0-p247':
configure: error: C compiler cannot create executables
See `config.log' for more details
Đây là cài đặt đầu tiên của tôi qua RVM. $ rvm list không trả về gem.
Vui lòng hỏi xem có bất kỳ thông tin bổ sung nào hữu ích hay không.
Chỉnh sửa - HERE là trường hợp đăng nhập có thể giúp bất kỳ ai.
Đang cố gắng để bắt đầu toàn bộ quá trình của tôi một lần nữa từ đầu. Cài đặt lại công cụ Xcode & Commandline ngay bây giờ - sau đó tôi sẽ thử lại. Tôi sẽ đăng kết quả của mình khi có sẵn. – MrCarder
vui lòng thêm '/ Người dùng/xxxxx/.rvm/src/ruby-2.0.0-p247/config.log' – mpapis
Tôi đã tìm ra sự cố (loại). Nó sẽ vẫn hữu ích cho người khác nếu tôi đăng nhật ký? – MrCarder