首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > Ruby Rails >

`require': no such file to load - readline (LoadError)

2012-12-23 
`require: no such file to load -- readline (LoadError)When I type rails console, I get this error:

`require': no such file to load -- readline (LoadError)
When I type rails console, I get this error:

[root@trebek2 readline]# /usr/local/bin/myapp/script/console
Loading development environment.
/usr/local/lib/ruby/1.8/irb/completion.rb:10:in `require': no such file to load -- readline (LoadError)
        from /usr/local/lib/ruby/1.8/irb/completion.rb:10
        from /usr/local/lib/ruby/1.8/irb/init.rb:252:in `require'
        from /usr/local/lib/ruby/1.8/irb/init.rb:252:in `load_modules'
        from /usr/local/lib/ruby/1.8/irb/init.rb:250:in `each'
        from /usr/local/lib/ruby/1.8/irb/init.rb:250:in `load_modules'
        from /usr/local/lib/ruby/1.8/irb/init.rb:21:in `setup'
        from /usr/local/lib/ruby/1.8/irb.rb:54:in `start'
        from /usr/local/bin/irb:13

solution:
My solution on Ubuntu Linux is:
* apt-get install libncurses5-dev
  apt-get install libreadline5-dev
* make the readline module for ruby,
  i.e. go to the <ruby_src>/ext/readline,
  ruby extconf.rb    #generate valid makefile
  make
  make install

热点排行