Ubuntu upgrade from 18.04 to 20.04 LTS: Installation Requirements for an Existing Rails Application
Upgrading Ubuntu from 18.04–20.04 is easy and takes a few moments. When it comes to Ruby on Rails app development, you need the latest version of Ubuntu to achieve smooth performance.
The command for upgrade is shown below:
sudo apt update && sudo apt upgrade
After upgrading Ubuntu, some sets of binary libraries were found missing while bundling the dependencies and serving the rails application.
You will also notice the following enlisted set of errors arising while serving the bundling the dependencies or serving the Rails application or if there are missing SSL certificates for a specific ruby version in the local machine:
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
GYou must add /C=BE/O=GlobalSign nv-sa/OU=Root CA/CN=GlobalSign Root
CA to your local trusted store
An error occurred while installing nokogiri (Nokogiri Version),
and Bundler cannot continue.
-bash: cd: /usr/share/rvm/usr/ssl: No such file or directory
SSL_connect returned=1 errno=0 state=error: certificate verify failed
If you are facing any issues related to the specific nokogiri version used for existing Ruby on Rails rapid application development or SSL/CA certificates.
Then, install the following packages to successfully bundle the dependencies and serve Ruby on Rails application development:
sudo apt install pkg-config
sudo apt install libffi-dev
3. clang GCC compiler:
sudo apt-get install clang && rvm install ruby_version --with-gcc=clang
4. Libreadline 7 rather than libreadline 8
sudo apt --fix-broken install
sudo apt-get install -y libreadline-dev
Read more: Improve your Ruby on Rails application development performance using these 5 simple ways and take your RoR app development lifecycle to the next level.
- You need to install the specific ruby version with the clang compiler as shown in the 3rd step above. It will throw errors if not installed with the help of the Clang compiler.
- If your existing applications with the required gemsets are served in Ubuntu 18 and not in Ubuntu 20, after installing the above-required libraries then delete the gemset, bundle the dependencies again.
- Contrarily, you can create a new gemset, bundle the dependencies, and serve the Rails application.
If you want assistance with more such upgrades & installations, connect with developers at our Ruby on Rails development company. Stay tuned for more articles.
Originally published at: https://www.botreetechnologies.com/blog/ubuntu-upgrade-existing-rails-application