After installing postrunner using ruby-gem, I was unable to launch the program as a standard user. The progam crashed with the following output:
~ ❯❯❯ postrunner import /media/sdd/GARMIN/ACTIVITY
/usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:135:in `require': cannot load such file -- postrunner (LoadError)
from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:135:in `rescue in require'
from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:144:in `require'
from /var/lib/gems/2.1.0/gems/postrunner-0.0.9/bin/postrunner:4:in `<top (required)>'
from /usr/local/bin/postrunner:23:in `load'
from /usr/local/bin/postrunner:23:in `<main>'
~ ❯❯❯ ls -l /var/lib/gems/2.1.0/gems/postrunner-0.0.9/lib/postrunner.rb
-rw-r----- 1 root root 561 Oct 10 11:37 /var/lib/gems/2.1.0/gems/postrunner-0.0.9/lib/postrunner.rb
The permission issue also exists for fit4ruby. After changing the read rights, everything goes smoothly:
root@yoshi:/home/brice# chmod -R a+r /var/lib/gems/2.1.0/gems/fit4ruby-0.0.6 /var/lib/gems/2.1.0/gems/postrunner-0.0.9/
root@yoshi:/home/brice# exit
~ ❯❯❯ postrunner import /media/sdd/GARMIN/ACTIVITY
INFO: No records file found at '/home/brice/.postrunner/records.yml'
INFO: New all-time running distance record: 7218.34 m
INFO: New 2015 running distance record: 7218.34 m
INFO: New all-time running speed record for 400 m: 0:02:22
INFO: New 2015 running speed record for 400 m: 0:02:22
INFO: New all-time running speed record for 500 m: 0:02:55
INFO: New 2015 running speed record for 500 m: 0:02:55
INFO: New all-time running speed record for 800 m: 0:04:41
INFO: New 2015 running speed record for 800 m: 0:04:41
INFO: New all-time running speed record for 1 km: 0:05:56
INFO: New 2015 running speed record for 1 km: 0:05:56
INFO: New all-time running speed record for 1 mi: 0:10:42
INFO: New 2015 running speed record for 1 mi: 0:10:42
INFO: New all-time running speed record for 2 km: 0:13:16
INFO: New 2015 running speed record for 2 km: 0:13:16
INFO: New all-time running speed record for 3 km: 0:20:28
INFO: New 2015 running speed record for 3 km: 0:20:28
INFO: New all-time running speed record for 5 km: 0:32:30
INFO: New 2015 running speed record for 5 km: 0:32:30
INFO: /media/sdd/GARMIN/ACTIVITY/5A763538.FIT successfully added to archive
INFO: Runtime config file '/home/brice/.postrunner/config.yml' written
postrunner import /media/sdd/GARMIN/ACTIVITY 5.63s user 0.39s system 87% cpu 6.887 total
After installing postrunner using ruby-gem, I was unable to launch the program as a standard user. The progam crashed with the following output:
Using strace, we can see it's a permission issue:
Actually, only root can read the file:
The permission issue also exists for fit4ruby. After changing the read rights, everything goes smoothly: