简体   繁体   English

Ruby 1.8.7 读取线问题

[英]Ruby 1.8.7 readline issue

I have to maintain a vintage project with Ruby 1.8.7 and rails 2.3.我必须使用 Ruby 1.8.7 和 rails 2.3 维护一个老式项目。 Recently I had to upgrade rbenv and ruby-build.最近我不得不升级 rbenv 和 ruby-build。 But after that I am having readline issue with my vintage platform.但在那之后,我的老式平台出现了 readline 问题。

OS: macOS mojave 10.14.6操作系统:macOS 莫哈韦 10.14.6

When I try to run the server (bundle exec script/server), it's complaining like this:当我尝试运行服务器(捆绑执行脚本/服务器)时,它抱怨如下:

=> Rails 2.3.18 application starting on http://0.0.0.0:3000
WARNING: using the built-in Timeout class which is known to have issues when used for opening connections. Install the SystemTimer gem if you want to make sure the Redis client will not hang.
You're running a version of ruby with no Readline support
Please `gem install rb-readline` or recompile ruby --with-readline.

I tried with gem install rb-readline but no success and same error.我尝试使用gem install rb-readline但没有成功和同样的错误。

I also tried with this RUBY_CONFIGURE_OPTS="--with-readline-dir='brew --prefix readline'" rbenv install 1.8.7我也试过这个RUBY_CONFIGURE_OPTS="--with-readline-dir='brew --prefix readline'" rbenv install 1.8.7

But then I got this:但后来我得到了这个:

-> https://cache.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7.tar.bz2
Installing ruby-1.8.7...

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


BUILD FAILED (OS X 10.14.6 using ruby-build 20191024-2-gefd2722)

Inspect or clean up the working tree at /var/folders/ht/5p7dh_g13m772qx6zx4lfr6c0000gn/T/ruby-build.20191031103935.77188
Results logged to /var/folders/ht/5p7dh_g13m772qx6zx4lfr6c0000gn/T/ruby-build.20191031103935.77188.log

Last 10 log lines:
/var/folders/ht/5p7dh_g13m772qx6zx4lfr6c0000gn/T/ruby-build.20191031103935.77188 ~/git/eutility
/var/folders/ht/5p7dh_g13m772qx6zx4lfr6c0000gn/T/ruby-build.20191031103935.77188/ruby-1.8.7 /var/folders/ht/5p7dh_g13m772qx6zx4lfr6c0000gn/T/ruby-build.20191031103935.77188 ~/git/eutility
configure: error: expected an absolute directory name for --prefix: readline'
make: *** No targets specified and no makefile found.  Stop.```

Any help will be appreciated.





OK got the solution or patch I can say.好的,我可以说得到解决方案或补丁。 So I had to comment two gems.所以我不得不评论两个宝石。 pry and pry-doc.撬和撬-doc。 It's working perfectly now.它现在工作得很好。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM