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

Handle Bundler::GemfileNotFound #936

Merged
merged 1 commit into from Sep 26, 2016

Conversation

@werthen
Copy link
Contributor

@werthen werthen commented Aug 26, 2016

Summary

In #910, some interaction with Bundler was introduced. However, when running nanoc from commandline immediately, without a Gemfile or .bundle directory being present (when creating a new site, for example), a script created by rubygems gets called, which includes Bundler. This would give the following error any time nanoc gets called from CLI

☁  Projects  nanoc create-site cv

Captain! We’ve been hit!

Message:

Bundler::GemfileNotFound: Could not locate Gemfile or .bundle/ directory

Detailed description

We add a rescue block in order to prevent nanoc from crashing. If there's no Gemfile, nothing should happen anyway.

Crashlog

https://gist.github.com/werthen/ffa7610068ea5afa956fe5f12c8d20ea

@ddfreyne
Copy link
Member

@ddfreyne ddfreyne commented Sep 26, 2016

I have not been able to come up with a reproduction scenario for this bug, but as it seems like a plausible situation, I’ve decided to merge it anyway.

Loading

@ddfreyne ddfreyne added this to the 4.3.3 milestone Sep 26, 2016
@ddfreyne ddfreyne merged commit 755f762 into nanoc:release-4.3.x Sep 26, 2016
1 check passed
Loading
@ddfreyne ddfreyne changed the title BUGFIX: Bundler::GemfileNotFound Handle Bundler::GemfileNotFound Sep 26, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants