When I try to run rails server
, I get the following:
bin/rails:6: warning: already initialized constant APP_PATH
The only way I managed to start WEBrick is by commenting out gem 'byebug'
in the Gemfile.
At first I though it was Byebug's fault, but trying to run rails console
gives me:
/home/fabio/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `require': cannot load such file -- readline (LoadError)
from /home/fabio/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `block in require'
from /home/fabio/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:240:in `load_dependency'
[...]
It seems I messed up at some point of the installation, but where?
I traced my steps back and found some info on the ruby-build page that could be related.
I ran $sudo apt-get install autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev
as suggested and reinstalled ruby (using rbenv).
Rails runs just fine now, no need to comment out Byebug. I can also run rails console
now.