I'm new to Ruby on Rails and I'm trying to start the RoR server. But when I run the command rails server
it gives me the following error:
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.
bin/rails:6: warning: already initialized constant APP_PATH
/home/abraar/ror/bin/rails:6: warning: previous definition of APP_PATH was here
Usage: rails COMMAND [ARGS]
I'm using rbenv with Ruby 2.2.2 and Rails 4.2.1 I tried following the instructions on this blog post http://vvv.tobiassjosten.net/ruby/readline-in-ruby-with-rbenv/ but it's not working.
Any solutions?
Thanks!
I was facing the following error:
Sorry, you can't use byebug without Readline
Reinstalling ruby resolved this for me (using rvm):
rvm reinstall 2.1.5
You can replace ruby version ie, 2.1.5 with the one you want to reinstall.
To fix this (for OSX, tested on Sierra), run following command in your shell -
ln -s /usr/local/opt/readline/lib/libreadline.dylib /usr/local/opt/readline/lib/libreadline.6.dylib
I faced this same issue on my machine & running the following command solved it, note that even if you have version 8 of readline you still need to link to version 7 as shown:
ln -s /usr/local/opt/readline/lib/libreadline.dylib /usr/local/opt/readline/lib/libreadline.7.dylib
I solved the issue by (commands for mac with homebrew and rbenv):
brew install readline
rbenv install 2.3.1
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With