ga-wdi-boston/ruby-template

Brew Upgrade Updates Readline Breaking pry

Opened this issue · 12 comments

Not sure if this is the best place to put this, but Rebekah and I just found that running Brew Upgrade (which she did for Hugo to give her presentation), installed a newer version of lib-readline (7 instead of 6). Because of this change, pry now no longer runs.

Sorry, you can't use byebug without Readline. To solve this, you need to
    rebuild Ruby with Readline support. If using Ubuntu, try `sudo apt-get
    install libreadline-dev` and then reinstall your Ruby.
/usr/local/var/rbenv/versions/2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require': dlopen(/usr/local/var/rbenv/versions/2.3.1/lib/ruby/2.3.0/x86_64-darwin15/readline.bundle, 9): Library not loaded: /usr/local/opt/readline/lib/libreadline.6.dylib (LoadError) 

Reinstalling ruby also gives build fail errors.

@BenGitsCode do you have a fix for this?

@payne-chris-r I believe I do. But it may be slightly different for Rebekah's machine.

In my case I was getting that same error, and installing the rb-readline gem worked as a temporary fix—if you're trying to get up and running with pry and that works, do that as a hot-fix for now.

with mine I got that error, blowing up even more, when I tried to run pry, but eventually noticed pry was working in my bash only terminal. Correcting the pathing in my ~/.zshrc to match the rbenv pathing in my ~/.bashrc turned out to be a better fix than my several attempts and completely wiping and rebuilding ruby.

I can take a look at her steup if this is something you're trying to resolve right now.

Also, this may be a pertinent resource https://github.com/rbenv/ruby-build/wiki

I take back everything I said. Pry had zero issues all of last night and yesterday. Today it doesn't work. Rbenv.

There's a discussion about this issue here: deivid-rodriguez/byebug#289
Some of the suggestions might be worth trying.

We figured it out using this: http://stackoverflow.com/questions/16756287/cannot-execute-rails-console

You need to uninstall ruby and reinstall (build) it now with the new version of readline. The process as I remember it was something like:

rbenv uninstall 2.3.1
rbenv install 2.3.1 && rbenv global 2.3.1

NOTE: You may also need to do the following:

gem install bundler
gem install rubocop
gem install scss_lint

@tuckyeah is solving this right now and should have a better list shortly for his exact scenario.

These are the steps I ran in order:

rbenv uninstall 2.3.1
rbenv install 2.3.1 && rbenv global 2.3.1
gem install rails
gem install bundler
gem install rubocop
gem install scss_lint

These steps did not however install Pry or Byebug (or a few other things), so I went to the most recent challenge which we happened to be working on (https://github.com/ga-wdi-boston/roman-numerals-challenge) and did bundle install

It looks like this challenge included:

rspec
pry
rb-readline
byebug
pry-byebug

So those may need to be installed independently if you don't have a challenge handy to just do a bundle install with. As far as I can tell, everything now seems to be working.... Though I'll update if I run into any further issues.

Also thanks to @rhjones for walking me through this too!!

gaand commented

@ga-wdi-boston/core rb-readline should not be in any Gemfile.

@payne-chris-r I finally fixed this, conclusively, not just the readline hot fix, who's still having the issue. I'll add the fix as an orientation issue and reference it here when I'm at my computer.

I ended up again fixing this only temporarily, but I completely nuked and paved nvm and rbenv and redid installfest 016 and haven't had that issue. Was this issue addressed in the last update?