megas
megas

Reputation: 21791

Fixing pry under Ubuntu

I've installed new version of ruby - 1.9.3-p125 and then i've got the problem with pry

/home/megas/.rvm/gems/ruby-1.9.3-p125/gems/pry-0.9.8.2/lib/pry.rb:11: warning: already initialized constant DEFAULT_HOOKS
/home/megas/.rvm/gems/ruby-1.9.3-p125/gems/pry-0.9.8.2/lib/pry.rb:22: warning: already initialized constant DEFAULT_PRINT
/home/megas/.rvm/gems/ruby-1.9.3-p125/gems/pry-0.9.8.2/lib/pry.rb:47: warning: already initialized constant SIMPLE_PRINT
/home/megas/.rvm/gems/ruby-1.9.3-p125/gems/pry-0.9.8.2/lib/pry.rb:56: warning: already initialized constant CLIPPED_PRINT
/home/megas/.rvm/gems/ruby-1.9.3-p125/gems/pry-0.9.8.2/lib/pry.rb:61: warning: already initialized constant DEFAULT_EXCEPTION_HANDLER
/home/megas/.rvm/gems/ruby-1.9.3-p125/gems/pry-0.9.8.2/lib/pry.rb:67: warning: already initialized constant DEFAULT_EXCEPTION_WHITELIST
/home/megas/.rvm/gems/ruby-1.9.3-p125/gems/pry-0.9.8.2/lib/pry.rb:70: warning: already initialized constant DEFAULT_PROMPT
/home/megas/.rvm/gems/ruby-1.9.3-p125/gems/pry-0.9.8.2/lib/pry.rb:81: warning: already initialized constant SIMPLE_PROMPT
/home/megas/.rvm/gems/ruby-1.9.3-p125/gems/pry-0.9.8.2/lib/pry.rb:83: warning: already initialized constant SHELL_PROMPT
/home/megas/.rvm/gems/ruby-1.9.3-p125/gems/pry-0.9.8.2/lib/pry.rb:90: warning: already initialized constant NAV_PROMPT
/home/megas/.rvm/gems/ruby-1.9.3-p125/gems/pry-0.9.8.2/lib/pry.rb:106: warning: already initialized constant DEFAULT_CONTROL_D_HANDLER
/home/megas/.rvm/gems/ruby-1.9.3-p125/gems/pry-0.9.8.2/lib/pry.rb:120: warning: already initialized constant DEFAULT_SYSTEM
/home/megas/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- readline (LoadError)
    from /home/megas/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /home/megas/.rvm/gems/ruby-1.9.3-p125/gems/pry-0.9.8.2/lib/pry.rb:163:in `<top (required)>'
    from /home/megas/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /home/megas/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /home/megas/.rvm/gems/ruby-1.9.3-p125/gems/pry-0.9.8.2/bin/pry:12:in `rescue in <top (required)>'
    from /home/megas/.rvm/gems/ruby-1.9.3-p125/gems/pry-0.9.8.2/bin/pry:8:in `<top (required)>'
    from /home/megas/.rvm/gems/ruby-1.9.3-p125/bin/pry:19:in `load'
    from /home/megas/.rvm/gems/ruby-1.9.3-p125/bin/pry:19:in `<main>'

I've tried to fix this problem by this article but after make command I got answer

Nothing to be done for `all’

How to resolve this problem? Thanks

P.S. Ubuntu 11.10, 64bit

Upvotes: 2

Views: 958

Answers (1)

Mark
Mark

Reputation: 8291

Hey megas have you got lncurses installed? If not try:

sudo apt-get install libncurses5-dev libreadline5-dev

Got that from this Blogpost which seems to have some similarity to your problem.

Solution:

rvm uninstall 1.9.3-p125
sudo apt-get install libreadline-dev
rvm install 1.9.3-p125 --with-readline-dir=/usr/include/readline

Upvotes: 3

Related Questions