Go to Script/consle after upgrading Ruby and Rails:
Copy Code code as follows:
/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:
Step one: Verify that the Libncurses5-dev Libreadline5-dev is installed and, if not installed, use
Copy Code code as follows:
sudo apt-get install Libncurses5-dev libreadline5-dev for installation
Step Two:
Copy Code code as follows:
Cd/usr/src/ruby-1.8.7/ext/readline
Ruby Extconf.rb
Make
sudo make install