Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rails 5 console needs readline 6 on macOS Sierra

I have only readline 7 installed and I can't find a single way to install version 6 on macOS Sierra. This is the error when trying to run rails c:

/Users/akashagarwal/.rvm/gems/ruby-2.3.0@global/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `require': dlopen(/Users/akashagarwal/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/x86_64-darwin15/readline.bundle, 9): Library not loaded: /usr/local/opt/readline/lib/libreadline.6.dylib (LoadError)
Referenced from: /Users/akashagarwal/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/x86_64-darwin15/readline.bundle Reason: image not found - /Users/akashagarwal/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/x86_64-darwin15/readline.bundle

like image 621
Akash Agarwal Avatar asked Oct 14 '16 20:10

Akash Agarwal


2 Answers

I had a similar issue and solved it with:

ln -s /usr/local/opt/readline/lib/libreadline.7.0.dylib /usr/local/opt/readline/lib/libreadline.6.dylib

source: https://github.com/rails/rails/issues/26658

like image 132
Will Clarke Avatar answered Sep 28 '22 12:09

Will Clarke


I had the same error and this worked for me.
Add gem 'rb-readline' in your Gemfile and bundle install

And just type bundle exec rails c

like image 33
asayamakk Avatar answered Sep 28 '22 12:09

asayamakk