Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot run both rails server and guard together #24

Open
ronyv89 opened this issue Jun 28, 2016 · 5 comments
Open

Cannot run both rails server and guard together #24

ronyv89 opened this issue Jun 28, 2016 · 5 comments
Labels

Comments

@ronyv89
Copy link

ronyv89 commented Jun 28, 2016

Running both guard and rails server together, forces atleast 1 of them to quit because of notiffany

Stack trace for guard

/Users/ronyvarghese/.rvm/gems/ruby-2.3.1@stack_track/gems/notiffany-0.1.0/lib/notiffany/notifier.rb:194:in `_activate': Already connected (RuntimeError)
    from /Users/ronyvarghese/.rvm/gems/ruby-2.3.1@stack_track/gems/notiffany-0.1.0/lib/notiffany/notifier.rb:87:in `initialize'
    from /Users/ronyvarghese/.rvm/gems/ruby-2.3.1@stack_track/gems/notiffany-0.1.0/lib/notiffany/notifier.rb:42:in `new'
    from /Users/ronyvarghese/.rvm/gems/ruby-2.3.1@stack_track/gems/notiffany-0.1.0/lib/notiffany/notifier.rb:42:in `connect'
    from /Users/ronyvarghese/.rvm/gems/ruby-2.3.1@stack_track/gems/guard-2.14.0/lib/guard/notifier.rb:11:in `connect'
    from /Users/ronyvarghese/.rvm/gems/ruby-2.3.1@stack_track/gems/guard-2.14.0/lib/guard.rb:61:in `setup'
    from /Users/ronyvarghese/.rvm/gems/ruby-2.3.1@stack_track/gems/guard-2.14.0/lib/guard/commander.rb:32:in `start'
    from /Users/ronyvarghese/.rvm/gems/ruby-2.3.1@stack_track/gems/guard-2.14.0/lib/guard/cli/environments/valid.rb:16:in `start_guard'
    from /Users/ronyvarghese/.rvm/gems/ruby-2.3.1@stack_track/gems/guard-2.14.0/lib/guard/cli.rb:122:in `start'
    from /Users/ronyvarghese/.rvm/gems/ruby-2.3.1@stack_track/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
    from /Users/ronyvarghese/.rvm/gems/ruby-2.3.1@stack_track/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
    from /Users/ronyvarghese/.rvm/gems/ruby-2.3.1@stack_track/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
    from /Users/ronyvarghese/.rvm/gems/ruby-2.3.1@stack_track/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
    from /Users/ronyvarghese/.rvm/gems/ruby-2.3.1@stack_track/gems/guard-2.14.0/lib/guard/aruba_adapter.rb:32:in `execute'
    from /Users/ronyvarghese/.rvm/gems/ruby-2.3.1@stack_track/gems/guard-2.14.0/lib/guard/aruba_adapter.rb:19:in `execute!'
    from /Users/ronyvarghese/.rvm/gems/ruby-2.3.1@stack_track/gems/guard-2.14.0/bin/_guard-core:11:in `<main>'

Note: Works for webrick rails server. Fails for Puma

@e2
Copy link
Contributor

e2 commented Jul 29, 2016

I'd be happy to fix this.

Can you create a minimal example where this fails? (It would help me fix this quickly and release as soon as I do).

@mattscilipoti
Copy link

This same issue just started for me. It was caused by a duplicate entry in the Guardfile for guard :teaspoon.... I figured this may help others with a similar mistake.

@e2
Copy link
Contributor

e2 commented Sep 9, 2016

Can someone create a small repo to reproduce this?

(That way I can work out where both connections are happening and which one should be used, etc).

@e2 e2 added the bug label Sep 9, 2016
@ianfleeton
Copy link

Hi, I've stumbled across this, also with puma and teaspoon. I've put together a minimal repo as suggested at https://github.com/ianfleeton/notiffany-issue-24

Steps to reproduce (each a commit in the above repo):

  • rails new notiffany-issue-24 --skip-test-unit
  • Add guard-rspec to Gemfile
  • bundle exec guard init rspec
  • Add guard-teaspoon to Gemfile, in :development, :test
  • Add gem teaspoon-jasmine to :development, :test
  • rails generate teaspoon:install
  • bundle exec guard init teaspoon
  • Add gem phantomjs to Gemfile, in :test

Run either rails s or bundle exec guard one after another; either will quit the other running before it.

@ianfleeton
Copy link

@e2 not sure if you'd seen my comment with the repro repo? Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants