ruby – 为什么Rails控制台说“无法加载这样的文件 – readline
发布时间:2020-12-16 23:13:15 所属栏目:百科 来源:网络整理
导读:我是 Ruby on Rails的新手,我正在使用RVM来管理Ruby版本. 我的笔记本电脑安装了Ruby1.8.7,但我的项目是使用RVM,Ruby1.9.3和Rails 3.2.11. 我没有运行rails c或rails console而没有给我以下错误: /home/phil/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb
我是
Ruby on Rails的新手,我正在使用RVM来管理Ruby版本.
我的笔记本电脑安装了Ruby1.8.7,但我的项目是使用RVM,Ruby1.9.3和Rails 3.2.11. 我没有运行rails c或rails console而没有给我以下错误: /home/phil/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb/completion.rb:9:in `require': cannot load such file -- readline (LoadError) from /home/phil/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb/completion.rb:9:in `<top (required)>' from /home/phil/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.11/lib/rails/commands/console.rb:3:in `require' from /home/phil/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.11/lib/rails/commands/console.rb:3:in `<top (required)>' from /home/phil/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.11/lib/rails/commands.rb:38:in `require' from /home/phil/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.11/lib/rails/commands.rb:38:in `<top (required)>' from script/rails:6:in `require' from script/rails:6:in `<main>' 解决方法
编译Ruby时需要安装readline库.
如果您使用的是CentOS / Redhat / Fedora Linux,请使用以下命令安装软件包: sudo yum install readline-devel 或者,在Ubuntu上,使用: sudo apt-get install libreadline6 libreadline6-dev 然后重新编译Ruby. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |