Codaisseur / terminal-notifier-guard

Mac OS X User Notifications for Guard
Other
163 stars 25 forks source link

Won't start if not in gemfile instead of gem install #33

Closed GuillaumeLegendre closed 7 years ago

GuillaumeLegendre commented 8 years ago

I don't want to modify the gemfile to install this gem. I want to use:

$ gem install terminal-notifier-guard

But currently, each time I try to launch Guard he throw me this error:

guard /Users/guillaumelegendre/.rvm/gems/ruby-2.3.0@investissement_pierre/gems/notiffany-0.0.8/lib/notiffany/notifier/base.rb:123:in rescue in _require_gem': Please add "gem 'terminal-notifier-guard'" to your Gemfile and run your app with "bundle exec". (Notiffany::Notifier::Base::RequireFailed) from /Users/guillaumelegendre/.rvm/gems/ruby-2.3.0@investissement_pierre/gems/notiffany-0.0.8/lib/notiffany/notifier/base.rb:121:in_require_gem' from /Users/guillaumelegendre/.rvm/gems/ruby-2.3.0@investissement_pierre/gems/notiffany-0.0.8/lib/notiffany/notifier/base.rb:58:in initialize' from /Users/guillaumelegendre/.rvm/gems/ruby-2.3.0@investissement_pierre/gems/notiffany-0.0.8/lib/notiffany/notifier/detected.rb:92:innew' from /Users/guillaumelegendre/.rvm/gems/ruby-2.3.0@investissement_pierre/gems/notiffany-0.0.8/lib/notiffany/notifier/detected.rb:92:in add' from /Users/guillaumelegendre/.rvm/gems/ruby-2.3.0@investissement_pierre/gems/notiffany-0.0.8/lib/notiffany/notifier.rb:102:inblock in initialize' from /Users/guillaumelegendre/.rvm/gems/ruby-2.3.0@investissement_pierre/gems/notiffany-0.0.8/lib/notiffany/notifier.rb:101:in each' from /Users/guillaumelegendre/.rvm/gems/ruby-2.3.0@investissement_pierre/gems/notiffany-0.0.8/lib/notiffany/notifier.rb:101:ininitialize' from /Users/guillaumelegendre/.rvm/gems/ruby-2.3.0@investissement_pierre/gems/notiffany-0.0.8/lib/notiffany/notifier.rb:42:in new' from /Users/guillaumelegendre/.rvm/gems/ruby-2.3.0@investissement_pierre/gems/notiffany-0.0.8/lib/notiffany/notifier.rb:42:inconnect' from /Users/guillaumelegendre/.rvm/gems/ruby-2.3.0@investissement_pierre/gems/guard-2.13.0/lib/guard/notifier.rb:11:in connect' from /Users/guillaumelegendre/.rvm/gems/ruby-2.3.0@investissement_pierre/gems/guard-2.13.0/lib/guard.rb:61:insetup' from /Users/guillaumelegendre/.rvm/gems/ruby-2.3.0@investissement_pierre/gems/guard-2.13.0/lib/guard/commander.rb:32:in start' from /Users/guillaumelegendre/.rvm/gems/ruby-2.3.0@investissement_pierre/gems/guard-2.13.0/lib/guard/cli/environments/valid.rb:16:instart_guard' from /Users/guillaumelegendre/.rvm/gems/ruby-2.3.0@investissement_pierre/gems/guard-2.13.0/lib/guard/cli.rb:122:in start' from /Users/guillaumelegendre/.rvm/gems/ruby-2.3.0@investissement_pierre/gems/thor-0.19.1/lib/thor/command.rb:27:inrun' from /Users/guillaumelegendre/.rvm/gems/ruby-2.3.0@investissement_pierre/gems/thor-0.19.1/lib/thor/invocation.rb:126:in invoke_command' from /Users/guillaumelegendre/.rvm/gems/ruby-2.3.0@investissement_pierre/gems/thor-0.19.1/lib/thor.rb:359:indispatch' from /Users/guillaumelegendre/.rvm/gems/ruby-2.3.0@investissement_pierre/gems/thor-0.19.1/lib/thor/base.rb:440:in start' from /Users/guillaumelegendre/.rvm/gems/ruby-2.3.0@investissement_pierre/gems/guard-2.13.0/lib/guard/aruba_adapter.rb:32:inexecute' from /Users/guillaumelegendre/.rvm/gems/ruby-2.3.0@investissement_pierre/gems/guard-2.13.0/lib/guard/aruba_adapter.rb:19:in execute!' from /Users/guillaumelegendre/.rvm/gems/ruby-2.3.0@investissement_pierre/gems/guard-2.13.0/bin/_guard-core:11:in

' /Users/guillaumelegendre/.rvm/gems/ruby-2.3.0@investissement_pierre/gems/listen-3.0.6/lib/listen/fsm.rb:76:in validate_and_sanitize_new_state': Listen::Listener can't change state from 'initializing' to 'stopped', only to: backend_started (ArgumentError) from /Users/guillaumelegendre/.rvm/gems/ruby-2.3.0@investissement_pierre/gems/listen-3.0.6/lib/listen/fsm.rb:55:intransition' from /Users/guillaumelegendre/.rvm/gems/ruby-2.3.0@investissement_pierre/gems/listen-3.0.6/lib/listen/listener.rb:98:in stop' from /Users/guillaumelegendre/.rvm/gems/ruby-2.3.0@investissement_pierre/gems/guard-2.13.0/lib/guard/aruba_adapter.rb:48:inexecute' from /Users/guillaumelegendre/.rvm/gems/ruby-2.3.0@investissement_pierre/gems/guard-2.13.0/lib/guard/aruba_adapter.rb:19:in execute!' from /Users/guillaumelegendre/.rvm/gems/ruby-2.3.0@investissement_pierre/gems/guard-2.13.0/bin/_guard-core:11:in
'

If I add the line to the Gemfile everything work fine.

Do you have an idea why?

wearethefoos commented 7 years ago

@GuillaumeLegendre it looks like you are working from a project gemset with RVM, is that correct? See e.g. this path: /Users/guillaumelegendre/.rvm/gems/ruby-2.3.0@investissement_pierre/gems

It might be that it can't find the gem you installed globally because of this. Not sure though..

wearethefoos commented 7 years ago

Closing this now, feel free to reopen if it's still an issue though.