tj / pomo

Ruby Pomodoro app for the command-line (time / task management)
MIT License
525 stars 53 forks source link

pomo installation should pull in libnotify gem on Linux and Windows #45

Open igalic opened 11 years ago

igalic commented 11 years ago

A fresh installation of pomo looks like this:

igalic@tynix ~ % sudo gem install pomo
[sudo] password for igalic: 
Fetching: highline-1.6.19.gem (100%)
Fetching: commander-4.1.3.gem (100%)
Fetching: faraday_middleware-0.9.0.gem (100%)
Fetching: hashie-2.0.5.gem (100%)
Fetching: netrc-0.7.7.gem (100%)
Fetching: octokit-1.24.0.gem (100%)
Fetching: terminal-notifier-1.4.2.gem (100%)
Fetching: growl-1.0.3.gem (100%)
Fetching: pomo-2.1.3.gem (100%)
Successfully installed highline-1.6.19
Successfully installed commander-4.1.3
Successfully installed faraday_middleware-0.9.0
Successfully installed hashie-2.0.5
Successfully installed netrc-0.7.7
Successfully installed octokit-1.24.0
Successfully installed terminal-notifier-1.4.2
Successfully installed growl-1.0.3
Successfully installed pomo-2.1.3
9 gems installed
Installing ri documentation for highline-1.6.19...
Installing ri documentation for commander-4.1.3...
Installing ri documentation for faraday_middleware-0.9.0...
Installing ri documentation for hashie-2.0.5...
Installing ri documentation for netrc-0.7.7...
Installing ri documentation for octokit-1.24.0...
Installing ri documentation for terminal-notifier-1.4.2...
Installing ri documentation for growl-1.0.3...
Installing ri documentation for pomo-2.1.3...
Installing RDoc documentation for highline-1.6.19...
Installing RDoc documentation for commander-4.1.3...
Installing RDoc documentation for faraday_middleware-0.9.0...
Installing RDoc documentation for hashie-2.0.5...
Installing RDoc documentation for netrc-0.7.7...
Installing RDoc documentation for octokit-1.24.0...
Installing RDoc documentation for terminal-notifier-1.4.2...
Installing RDoc documentation for growl-1.0.3...
Installing RDoc documentation for pomo-2.1.3...
sudo gem install pomo  21.86s user 0.41s system 35% cpu 1:03.47 total
igalic@tynix ~ % pomo help
/var/lib/gems/1.9.1/gems/commander-4.1.3/lib/commander/runner.rb:365:in `block in require_program': program version required (Commander::Runner::CommandError)
        from /var/lib/gems/1.9.1/gems/commander-4.1.3/lib/commander/runner.rb:364:in `each'
        from /var/lib/gems/1.9.1/gems/commander-4.1.3/lib/commander/runner.rb:364:in `require_program'
        from /var/lib/gems/1.9.1/gems/commander-4.1.3/lib/commander/runner.rb:52:in `run!'
        from /var/lib/gems/1.9.1/gems/commander-4.1.3/lib/commander/delegates.rb:11:in `run!'
        from /var/lib/gems/1.9.1/gems/commander-4.1.3/lib/commander/import.rb:10:in `block in <top (required)>'
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- libnotify (LoadError)
        from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /var/lib/gems/1.9.1/gems/pomo-2.1.3/lib/pomo/notifier/libnotify_notifier.rb:1:in `<top (required)>'
        from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /var/lib/gems/1.9.1/gems/pomo-2.1.3/lib/pomo/notifier.rb:2:in `<top (required)>'
        from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /var/lib/gems/1.9.1/gems/pomo-2.1.3/lib/pomo.rb:3:in `<top (required)>'
        from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /var/lib/gems/1.9.1/gems/pomo-2.1.3/bin/pomo:5:in `<top (required)>'
        from /usr/local/bin/pomo:23:in `load'
        from /usr/local/bin/pomo:23:in `<main>'
1 igalic@tynix ~ %

Is it be possible to pull the libnotify gem on Linux and Windows? (and its equivalent on OS X?

stephenmckinney commented 11 years ago

Moving this comment here from #43:

Found the problem:

It appears you can't use conditionals in a gemspec (https://github.com/visionmedia/pomo/blob/master/pomo.gemspec#L26-L28) because gemspec is serialized into YAML, which doesn't contain executable code. Since I run gem build on my platform the OS X dependencies are locked-in. Hence you're issue. Now looking into a solution...

ydkahin commented 7 years ago

Old thread, but in case someone stumbles upon this, the problem is solved here https://github.com/tj/pomo/issues/49