ruby - 如何使用 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
有任何想法吗?
解决方案
推荐阅读
- python - 如何使 YAML 嵌入的 shell 脚本安全地避免不同引号的问题?
- python - 使用 Python 查找数据以在 pandas 上进行数据分析
- typescript - 全局窗口没有我的新属性 (ts)
- mysql - 我需要在 RESULT 中隐藏上半部分 TRX_STATUS 和 TRX_COUNT
- python - 使用索引数组索引到多维数组
- firebase - 从 firebase.json 运行 Firebase deploy --only 函数
- android - 除非清除 Google Play 缓存,否则 Google Play 不会显示新版本的应用
- android - 当 SearchView 小部件在溢出菜单中时,SearchView 如何扩展以填充工具栏?
- python - TypeError : float() 参数必须是字符串或数字,而不是“时间戳”
- flutter - 状态:400,消息:执行您的操作时遇到问题!,数据:空