Guard blocking terminal

31 views
Skip to first unread message

Glauco Custódio

unread,
Mar 28, 2013, 10:30:42 AM3/28/13
to guar...@googlegroups.com
Hi guys, I am noob in tests, rspec and guard.

Every time I need to track changes in files (save), I have to run 'guard' command in terminal, so I have to open other tab in order I can run rails scripts.

In RailsCasts seems that Ryan does not run 'guard' or run?

Is there a way for that I dont need to run 'guard' and be blocked by it?

Thank you.

Michael Kessler

unread,
Mar 28, 2013, 10:32:38 AM3/28/13
to guar...@googlegroups.com
It looks like you need to add proper readline support to your ruby installation: https://github.com/guard/guard/wiki/Add-proper-Readline-support-to-Ruby-on-Mac-OS-X
> --
> You received this message because you are subscribed to the Google Groups "guard-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to guard-dev+...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

Glauco Custódio

unread,
Mar 28, 2013, 10:49:02 AM3/28/13
to guar...@googlegroups.com
I am on Ubuntu 12.10, I have added: gem 'rb-readline' to Gemfile and run 'bundle' but I still need to run 'guard'.

I have not understood, why readline support makes me have not to run 'guard' every time?

Thank you.

Michael Kessler

unread,
Mar 28, 2013, 11:07:53 AM3/28/13
to guar...@googlegroups.com
Hi

> I am on Ubuntu 12.10, I have added: gem 'rb-readline' to Gemfile and run 'bundle' but I still need to run 'guard'.

Bundle is the command to install all gem dependencies. You need to run Guard with

bundle exec guard

as described in the README.

> I have not understood, why readline support makes me have not to run 'guard' every time?

On Ubuntu your fine. I just assumed your on OS X because it was a typical description for that problem.
I'm very sorry, but I've lately some problems with correctly guessing other users environment and configuration ;)

This is the development mailing list for Guard and Plugin devs. For general question about the usage of Guard you should go to Stackoverflow. If you want people to help you it's a good idea to provide as much information as possible about your environment and your Guard configuration. We provide some guideline at https://github.com/guard/guard/blob/master/CONTRIBUTING.md

Michael

Rémy Coutable

unread,
Mar 28, 2013, 11:32:37 AM3/28/13
to guar...@googlegroups.com
Ho Glauco,

Here is the usual workflow with Guard:
1 - Start Guard once in a new terminal tab and let it watch your project directory: bundle exec guard (start) [you can omit "start" since it's the default action)
2 - Work on your project, modify files and save them
3 - Wait for Guard to notify you about the results of your Guard's plugins (probably guard-rspec or guard-test in your case)
4 - Go to step 2

Personally, I have TextMate on the left 2/3 of my screen and my terminal with Guard running in the 1/3 right of my screen so I can see directly the failing specs if any.

Pro Tip®: Launch Guard with the --clear/-c option and create a "bg" alias for "bundle exec guard" and "bgc" alias for "bundle exec guard -c"

Regards,
Rémy
Reply all
Reply to author
Forward
0 new messages