When typoing the Gemfile, stack traces ensue #1527

fdr opened this Issue Nov 12, 2011 · 5 comments


None yet

5 participants

Unfortunately, a fatal error has occurred. Please report this error to the Bundler issue tracker at https://github.com/carlhuda/bundler/issues so that we can fix it. Thanks!
/home/fdr/codes/redrat/Gemfile:5:in `evaluate': undefined method `rake' for #<Bundler::Dsl:0x000000018b9880> (NoMethodError)
    from /home/fdr/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.1.rc/lib/bundler/dsl.rb:7:in `instance_eval'
    from /home/fdr/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.1.rc/lib/bundler/dsl.rb:7:in `evaluate'
    from /home/fdr/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.1.rc/lib/bundler/definition.rb:17:in `build'

Because I typod rake "rdoc" instead of gem "rdoc" in my Gemfile. This probably should be some kind of error message rather than asking me to file a bug report.

@fdr fdr closed this Nov 12, 2011
@fdr fdr reopened this Nov 12, 2011

FFUUUU github hotkeys. Too much cleverness for your own good.

@radar radar closed this Nov 12, 2011
@radar radar reopened this Nov 12, 2011

And I just did the same thing while reading it. I can see how that would be annoying :)

You're right, the error message should be better.

Bundler member

Aside from not telling you to file a bug, what would an improved version of this look like? It's ruby code, and you tried to call an undefined method...


See the patch above for my suggestion on how to improve on this issue.

The line number and content in the output are just a gimmick, but would further improve the UX.

@koraktor koraktor added a commit to koraktor/bundler that referenced this issue Feb 12, 2012
@koraktor koraktor Added graceful handling of Gemfile syntax errors
See issue #1527 for the initial request.

Since the pull request was merged I'm closing this issue.

@rohit rohit closed this Mar 15, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment