When I'm in the root directory of my Rails app I can successfully execute rails server
. However when I try to do rails console
or rails c
I get the following error.
[myrailsapp (master)]$ rails c
/Users/myuserid/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/irb/completion.rb:10:in `require': dlopen(/Users/myuserid/.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/myuserid/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/x86_64-darwin15/readline.bundle
Reason: image not found - /Users/myuserid/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/x86_64-darwin15/readline.bundle
from /Users/myuserid/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/irb/completion.rb:10:in `<top (required)>'
from /Users/myuserid/.rvm/gems/ruby-2.3.0@mygemset/gems/railties-4.2.5.2/lib/rails/commands/console.rb:3:in `require'
from /Users/myuserid/.rvm/gems/ruby-2.3.0@mygemset/gems/railties-4.2.5.2/lib/rails/commands/console.rb:3:in `<top (required)>'
from /Users/myuserid/.rvm/gems/ruby-2.3.0@mygemset/gems/railties-4.2.5.2/lib/rails/commands/commands_tasks.rb:123:in `require'
from /Users/myuserid/.rvm/gems/ruby-2.3.0@mygemset/gems/railties-4.2.5.2/lib/rails/commands/commands_tasks.rb:123:in `require_command!'
from /Users/myuserid/.rvm/gems/ruby-2.3.0@mygemset/gems/railties-4.2.5.2/lib/rails/commands/commands_tasks.rb:58:in `console'
from /Users/myuserid/.rvm/gems/ruby-2.3.0@mygemset/gems/railties-4.2.5.2/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from /Users/myuserid/.rvm/gems/ruby-2.3.0@mygemset/gems/railties-4.2.5.2/lib/rails/commands.rb:17:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
I have done web searches but I have not found any solutions for this type of error.