If you get following error while extecuting ruby script/console
1 2 3 4 5 6 7 8 9 | /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 |
To solve this issue , you need to install some libraries.
1 2 | sudo apt-get install libncurses5-dev sudo apt-get install libreadline5-dev |
Then goto ruby source folder and ext/readline folder
1 2 3 4 | cd < RUBY SOURCE FOLDER >/ext/readline ruby extconf.rb make sudo make install |
No comments:
Post a Comment