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

Error with listen gem unless bundle exec is used #361

westonganger opened this issue May 9, 2019 · 1 comment


None yet
2 participants
Copy link

commented May 9, 2019

If you forgot to use bundle exec when calling wagon serve you get this error:

$ wagon serve -v

Your site is served now.

# Error description:
cannot load such file -- listen

# Backtrace:

	/home/myuser/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/locomotivecms_wagon-3.0.0.rc0/lib/locomotive/wagon/tools/listen.rb:1:in `require'

That sent me on a goose chase until I realized I simply needed bundle exec.

Maybe we could check if the listen gem is installed, something like:

###  wagon/lib/locomotive/wagon/tools/listen.rb

  require 'listen'
rescue LoadError => ex
  puts "Cannot find the `listen` gem. Did you forgot to use `bundle exec` when running your wagon command?".

  raise # re-raise current exception

What do you think? I would be happy to send a PR if desired.


This comment has been minimized.

Copy link

commented May 13, 2019

hey @westonganger! thanks for the feedback.
I'm looking for a way to get rid of the bundle exec statement because people who don't know ruby and bundle will be lost for sure.
That's not so easy. In the meantime, your suggestion makes totally sense. So go for the PR! :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.