Description of problem: screenruler has a syntax error in its main script and therefore will not start Version-Release number of selected component (if applicable): $ rpm -q screenruler screenruler-0.90-0.2.bzr27.fc17.noarch How reproducible: Every startup Steps to Reproduce: 1. $ screenruler Actual results: $ screenruler ./screenruler.rb:35: invalid multibyte char (US-ASCII) ./screenruler.rb:35: invalid multibyte char (US-ASCII) ./screenruler.rb:35: syntax error, unexpected $end, expecting ']' APP_ARTISTS = ['János Horváth <horvathhans>'] ^ Expected results: Normal program startup. Additional info: $ find /usr -type f -name screenruler.rb /usr/share/screenruler/screenruler.rb ... $ uname -a Linux tardisII 3.4.0-1.fc17.x86_64 #1 SMP Sun Jun 3 06:35:17 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux $ rpm -q gnome-shell gnome-shell-3.4.1-5.fc17.x86_64
Editing /usr/share/screenruler/screenruler.rb and commenting out that line does not actually solve the problem though. $ screenruler Loading libraries... /usr/share/gems/gems/gtk2-1.1.3/lib/gtk2.rb: line 12 Gtk-MESSAGE **:Failed to load module "pk-gtk-module" /usr/share/rubygems/rubygems/custom_require.rb:36:in `require': cannot load such file -- ruler_window (LoadError) from /usr/share/rubygems/rubygems/custom_require.rb:36: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 ./screenruler.rb:47:in `<main>'
-- Fedora Bugzappers volunteer triage team https://fedoraproject.org/wiki/BugZappers
There are two bugs: 1) The character encoding of screenruler.rb should be set to utf-8. This is probably a Fedora specific problem. 2) Screenruler has not been ported to Ruby 1.9. yet. There is already a wish to do so on the project's launchpad. To make it work, use an older ruby version, or remove "ruler_window" from the line which says require [some ruby files],ruler_window, [more ruby files] and add a line require_relative ruler_window Repeat this for every file which Ruby complains about.
Thanks for your answer. I edited the screeruler.rb according to your advice. For the UTF problem, I uncommented the 1st line and changed it to: encoding:utf-8 but I get another error message on the following line: ./screenruler.rb:36: invalid multibyte char (US-ASCII) ./screenruler.rb:36: invalid multibyte char (US-ASCII) ./screenruler.rb:36: syntax error, unexpected $end, expecting ']' APP_ARTISTS = ['János Horváth <horvathhans>']
It seems the encoding command was not the right one... I put back the previous one, and have no more syntax error; but this message: Loading libraries... /usr/share/rubygems/rubygems/custom_require.rb:36:in `require': cannot load such file -- preferences_window (LoadError) from /usr/share/rubygems/rubygems/custom_require.rb:36: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 ./screenruler.rb:48:in `<main>'
Created attachment 601287 [details] Patch. Fix Encoding first. You need to do the same for "preference_window" and also for "ruler_popup_menu" in "ruler_window.rb". I attached a patch.
The patch works fine. Thanks a lot for helping.
I got the same problem (also with screenruler-0.90-0.2.bzr27.fc17.noarch), and the patch work find (after adding "# -*- encoding: utf-8; -*-" as the second line of screenruler.rb). Can this patch and the encoding fix be applied to the package?
(In reply to comment #6) > Created attachment 601287 [details] > Patch. Fix Encoding first. > > You need to do the same for "preference_window" and also for > "ruler_popup_menu" in "ruler_window.rb". I attached a patch. I can confirm this patch fixes the issue on my machine as well.
(In reply to comment #8) > .. patch work fine (after adding "# -*- encoding: utf-8; -*-" as the > second line of screenruler.rb). > .. The same applies to the Fedora 18 release: screenruler.noarch 0.90-0.3.bzr27.fc18
Could somebody please fix it? There is working* patch submitted for more than half a year, so what's the problem to apply it? (*) tested on my F18, screenruler 0.90-0.3.bzr27.fc18
Created attachment 713404 [details] Updated patch to include encoding I updated the patch to include the encoding fix as well. This is working on F18 for me. $ rpm -q screenruler screenruler-0.90-0.3.bzr27.fc18.noarch
Applying this patch fixed the problem with screenruler for me too! $ rpm -qa screenruler screenruler-0.90-0.3.bzr27.fc18.noarch $ screenruler Loading libraries... Connecting to GConf... Creating windows... Reading settings... Presenting ruler... And the ruler appears! Good Good!
upstream: https://bugs.launchpad.net/screenruler/+bug/925835
For testing the 0.9.6 version with applied patches as an RPM can be found here: http://priede.bf.lu.lv/ftp/Linux/Fedora/Utilities/screenruler-F18/screenruler-0.96-K01.noarch.rpm
screenruler-0.96-1.fc18 has been submitted as an update for Fedora 18. https://admin.fedoraproject.org/updates/screenruler-0.96-1.fc18
screenruler-0.96-1.fc19 has been submitted as an update for Fedora 19. https://admin.fedoraproject.org/updates/screenruler-0.96-1.fc19
screenruler-0.96-1.fc17 has been submitted as an update for Fedora 17. https://admin.fedoraproject.org/updates/screenruler-0.96-1.fc17
Package screenruler-0.96-1.fc19: * should fix your issue, * was pushed to the Fedora 19 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing screenruler-0.96-1.fc19' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2013-10576/screenruler-0.96-1.fc19 then log in and leave karma (feedback).
screenruler-0.96-1.fc19 has been pushed to the Fedora 19 stable repository. If problems still persist, please make note of it in this bug report.
Must be pushed to the Fedora 18 stable repository as well.
+1 for pushing it to Fedora 18.
screenruler-0.96-1.fc18 has been pushed to the Fedora 18 stable repository. If problems still persist, please make note of it in this bug report.
screenruler-0.96-1.fc17 has been pushed to the Fedora 17 stable repository. If problems still persist, please make note of it in this bug report.