As a full time web developer, I need some application to work with easy. One of the program I use on almost daily basis is Screen Ruler. Recently 'screenruler' stopped working with following error message:
Loading libraries...
/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- cairo-gobject (LoadError)
from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/share/screenruler/utils/addons_ruby.rb:59:in `block in require'
from /usr/share/screenruler/utils/addons_ruby.rb:59:in `each'
from /usr/share/screenruler/utils/addons_ruby.rb:59:in `require'
from /usr/lib/ruby/vendor_ruby/pango.rb:19:in `<top (required)>'
from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/share/screenruler/utils/addons_ruby.rb:59:in `block in require'
from /usr/share/screenruler/utils/addons_ruby.rb:59:in `each'
from /usr/share/screenruler/utils/addons_ruby.rb:59:in `require'
from /usr/lib/ruby/vendor_ruby/gtk2/base.rb:14:in `<top (required)>'
from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/share/screenruler/utils/addons_ruby.rb:59:in `block in require'
from /usr/share/screenruler/utils/addons_ruby.rb:59:in `each'
from /usr/share/screenruler/utils/addons_ruby.rb:59:in `require'
from /usr/lib/ruby/vendor_ruby/gtk2.rb:11:in `<top (required)>'
from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/share/screenruler/utils/addons_ruby.rb:59:in `block in require'
from /usr/share/screenruler/utils/addons_ruby.rb:59:in `each'
from /usr/share/screenruler/utils/addons_ruby.rb:59:in `require'
from /usr/bin/screenruler:51:in `<main>'
Those who have came to find fix to the problem in Ubuntu, try installing following package.
sudo apt install ruby-cairo-gobject
This solved my problem and I am able to use the program without any problem.