首页 > 解决方案 > 如何使用 rbenv 安装特定版本的 ruby​​ (1.8.6)?

问题描述

我有一些在 ruby​​ 1.8 和 rails 2.3 上运行的旧源代码。我的系统上有 rbenv。如何使用 rbenv 安装此版本的 ruby​​ (v1.8.6)?

$ rbenv install 1.8.6
Downloading ruby-1.8.6.tar.bz2...
-> https://cache.ruby-lang.org/pub/ruby/1.8/ruby-1.8.6.tar.bz2
Installing ruby-1.8.6...

WARNING: ruby-1.8.6 is past its end of life and is now unsupported.
It no longer receives bug fixes or critical security updates.

ruby-build: use readline from homebrew

BUILD FAILED (OS X 10.14.2 using ruby-build 20190423)

Inspect or clean up the working tree at /var/folders/_w/98n31_kn03qfjt51p2hmrfqh0000gp/T/ruby-build.20190701155134.45412
Results logged to /var/folders/_w/98n31_kn03qfjt51p2hmrfqh0000gp/T/ruby-build.20190701155134.45412.log

Last 10 log lines:
/var/folders/_w/98n31_kn03qfjt51p2hmrfqh0000gp/T/ruby-build.20190701155134.45412 ~
/var/folders/_w/98n31_kn03qfjt51p2hmrfqh0000gp/T/ruby-build.20190701155134.45412/ruby-1.8.6 /var/folders/_w/98n31_kn03qfjt51p2hmrfqh0000gp/T/ruby-build.20190701155134.45412 ~
checking build system type... i686-apple-darwin18.2.0
checking host system type... i686-apple-darwin18.2.0
checking target system type... i686-apple-darwin18.2.0
checking for gcc... /usr/local/bin/gcc-4.2
checking for C compiler default output file name...
configure: error: C compiler cannot create executables
See `config.log' for more details.
make: *** No targets specified and no makefile found.  Stop.

我已经尝试过这个解决方案,但它对我不起作用...... https://github.com/rbenv/ruby-build/issues/999

有任何想法吗?

标签: ruby

解决方案


推荐阅读