Ubuntu To Debian Upgrade Issues

If you have received following message from dreamhost on VPS upgrade and your Ruby apps are broken then here are few tips that might save your day. “We will be upgrading your Virtual Private Server from version 14.04 (also known as trusty) to Debian 9.12 (aka Stretch!) “. Yes as they mentioned in their email that there are some environment changes that effect your system if you are using Ruby, Python, PHP, or run a site that relies heavily on specific server packages. Lets start with Ubuntu To Debian Upgrade Issues on VPS of Dreamhost.

This post will help you only if you have already installed redmine on dreamhost VPS and your server is now upgraded to Debain Stretch.

SVN Write Issue on Debian Stretch

First error you will see is, related to SVN. If you have SVN on VPS then your will see that you do not have write permission anymore. To solve this you can go to more -> subversion, select the SVN repo, click on edit and then click on update my repo now. Check your write permissions after 5-10 minutes.

If this trick did not help you, then please write to dreamhost support team and they will change the settings from backend.

Django MySQL Issue

If you are running application with Django and MySQL as database then with this upgrade it will not work.

django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: libmysqlclient.so.18: cannot open shared object file: No such file or directory.
Did you install mysqlclient or MySQL-python?

As per suggested solution by deleting pip .cache directory, it will still shows error. For this issue we did not found solution yet, but as workaround we have created backup databse in sqlite and started using Django with sqlite. Please note with Ubuntu 14.04, Sqlite was not working so we have no choice other than to use MySQL, but with this new server upgrade Sqlite is working.

Ruby Apps Issue On Debain VPS

First issue you will encounter is openssl issue on Debian server. This is because openssl library is changed on the Debian Stretch server. You will need to reinstall the version of ruby that you had with rvm which was installed on Ubuntu. Once this is done you need to install ruby gems again to allow your rails site to work.

$gem list
Error loading RubyGems plugin "/home/ilmp_app/.rvm/rubies/ruby-2.6.5/lib/ruby/gems/2.6.0/gems/executable-hooks-1.6.0/lib/rubygems_plugin.rb": libssl.so.1.0.0: cannot open shared object file: No such file or directory - /home/ilmp_app/.rvm/rubies/ruby-2.6.5/lib/ruby/2.6.0/x86_64-linux/openssl.so (LoadError)
Error loading RubyGems plugin "/home/ilmp_app/.rvm/rubies/ruby-2.6.5/lib/ruby/gems/2.6.0/gems/gem-wrappers-1.4.0/lib/rubygems_plugin.rb": libssl.so.1.0.0: cannot open shared object file: No such file or directory - /home/ilmp_app/.rvm/rubies/ruby-2.6.5/lib/ruby/2.6.0/x86_64-linux/openssl.so (LoadError)

To solve this error, you need to uninstall rvm and re-install.

$ rvm uninstall 2.6.0
$ rvm install 2.6.0

Now reinstall bundler and then reinstall your old gems else you could see following errors

find_spec_for_exe': Could not find 'bundler' (2.1.4) required by your /home/ilmp_app/ilmp.neudeep.com/Gemfile.lock. (Gem::GemNotFoundException) To update to the latest version installed on your system, run bundle update –bundler . To install the missing version, run gem install bundler:2.1.4`

$ gem install bundler
$ bundle update

Now you are all set to run the ruby application. Bundle update will take care of mysql2 issue as well.

 when i start my application it is giving me error for libmysqlclient.so 
/home/spsm01/.rvm/gems/ruby-2.6.0/gems/mysql2-0.5.2/lib/mysql2.rb:33:in `require': libmysqlclient.so.18: cannot open shared object file: No such file or directory - /home/spsm01/.rvm/gems/ruby-2.6.0/gems/mysql2-0.5.2/lib/mysql2/mysql2.so (LoadError)

Once you re-install as per above instructions your Django and Ruby application on the newly upgraded server should work as normal. Thats all Ubuntu To Debian Upgrade Issues we have faced, let us know if you have faced any new issues apart from above mentioned one.