Bundler message is misleading #274

Closed
mcmire opened this Issue Apr 11, 2012 · 8 comments

Comments

Projects
None yet
6 participants
Contributor

mcmire commented Apr 11, 2012

Hi -- I am all for the message that Guard gives you if you have a Gemfile but aren't using it, but it's kind of FUDdy. It isn't "dangerous" to run guard without Bundler, and it's not "safer" with it. That would imply that Bundler is an antivirus program, which it's not. It also assumes that the user knows nothing about Bundler, which is probably not true. First, if I have a Gemfile, I probably know a little bit about Bundler, but second, what if I choose not to use Bundler because I'm running tests and I don't want to wait for bundle exec to do its thing? I would rather see a message like this:

FYI: It looks like your project has a Gemfile yet you are running guard outside of Bundler. If this is your intent, feel free to ignore this message. Otherwise, consider running bundle exec guard to ensure your dependencies are loaded correctly.

Contributor

netzpirat commented Apr 11, 2012

I completely agree. All the Guard core members are non-native English speakers, so it's likely that you find plenty of clumsy phrases all over the code base and the readme, and we really appreciate any feedback to improve the situation.

I'm ok with changing the phrase, even when it's quite lengthy. Any objections @thibaudgg, @rymai and @Maher4Ever?

Owner

rymai commented Apr 11, 2012

Agreed! No objection! Thanks! :)

Member

Maher4Ever commented Apr 11, 2012

Great feedback @mcmire. I also think the suggested message is a lot more descriptive (in a good way) and less misleading.

Owner

thibaudgg commented Apr 12, 2012

Good for me too, thanks!

@mcmire just one point, you can use bundle exec guard even if you want to run test without Bundler by setting :bundler => false on guard-test/rspec.

Contributor

mcmire commented Apr 13, 2012

Ah, right. Setting bundle exec guard doesn't affect individual guards because they usually run their own completely separate processes, correct?

So actually, take a step back -- what's the point of giving me this Bundler warning? After all, running guard probably isn't going to load the app or library I am working on (the guard processes will). So -- connecting the dots -- running bundle exec guard is important insofar that it guarantees that all of the guards I've defined in my Gemfile are successfully loaded, and I'm guessing you guys don't want to get complaints about stuff not being loaded properly from people who don't know the first thing about Guard (or Bundler for that matter). Was that the use case for this?

Contributor

netzpirat commented Apr 13, 2012

Some time ago almost every second issue was related to not having run Guard with bundle exec. The bundle warning message saves hours of our time. Remember, there are many Guards that are useful for designers (guard-sass, guard-compass, guard-haml, etc.) or Guards for people not using Ruby as their language (guard-go, guard-phpcs, etc.), and they do not understand the bundler thing fully.

Contributor

mcmire commented Apr 14, 2012

Okay. That makes sense and I see why you phrased it as "dangerous" -- you want to stress that it's important that unless you know what you're doing, just use bundle exec and everything will be peachy. I'm considering changing the text to reflect this urgency (while keeping the friendly tone). What do you think about this:

Guard here! This project uses Bundler to manage dependencies, yet you are
running `guard` outside of the bundle. Unless this is your intent, we strongly
advise that you use `bundle exec guard`, as this will ensure that all of the
guards in your Guardfile are successfully loaded.

(To hide this message, run `guard --no-bundler-warning`.)

@thibaudgg thibaudgg closed this Apr 23, 2012

Contributor

oli commented May 31, 2013

You might want to also mention bundle exec guard explicitly in the Readme under Installation. As this was my first time to use Bundler, this initially confused me. I’ve made a pull request with this copyedit ↑

You might also want to mention this under Start too…

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment