TL;DR
Perhaps:
https://github.com/techAPJ/install-rails/blob/master/linux#L47-L63
Should do git pull
in .rbenv and ruby-build
if they exist already and then this script can be used to update stuff?
Or is there something more obvious that I should be doing?
The long, sad story
I just upgraded to Ubuntu 18.04 on my desktop. I ran
bash <(wget -qO- https://raw.githubusercontent.com/techAPJ/install-rails/master/linux )
And rails s
cranks up just fine.
But rails c
fails trying to load readline.
/home/pfaffman/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:
in `require': libreadline.so.6: cannot open shared object file: No such file or directory - /home/pfaffman/.rbenv/versions/2.4.2/lib/rub
y/2.4.0/x86_64-linux/readline.so (LoadError)
from /home/pfaffman/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_r
equire.rb:21:in `block in require_with_bootsnap_lfi'
from /home/pfaffman/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/loaded_features_i
ndex.rb:65:in `register'
Readline library is installed in the os:
$ dpkg -l |grep readl
ii lib32readline-dev 7.0-3 amd64 GNU readline and history libraries, development files (32-bit)
ii lib32readline7 7.0-3 amd64 GNU readline and history libraries, run-time libraries (32-bit)
ii libreadline-dev:amd64 7.0-3 amd64 GNU readline and history libraries, development files
ii libreadline5:amd64 5.2+dfsg-3build1 amd64 GNU readline and history libraries, run-time libraries
ii libreadline7:amd64 7.0-3 amd64 GNU readline and history libraries, run-time libraries
ii readline-common 7.0-3 all GNU readline and history libraries, common files
Finally, I re-ran this code:
ruby_version="2.5.1"
log_info "Installing Ruby $ruby_version ..."
rbenv install "$ruby_version"
log_info "Setting $ruby_version as global default Ruby ..."
rbenv global $ruby_version
rbenv rehash
And now it’s working again.
Perhaps:
https://github.com/techAPJ/install-rails/blob/master/linux#L47-L63
Should do git pull
in .rbenv and ruby-build
if they exist already and then this script can be used to update stuff?
I’ll submit a PR if this is a good idea.