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

NameError: undefined local variable or method `lib' for main:Object #1

Closed
ConradIrwin opened this issue Dec 9, 2012 · 0 comments
Closed

Comments

@ConradIrwin
Copy link
Contributor

Hi!

This library is incredibly cool, thanks so much for making it :).

Unfortunately it breaks in one of my rails apps due to https://bugs.ruby-lang.org/issues/7536

I get:

NameError: undefined local variable or method `lib' for main:Object
script/rails:6:in `<main>'
/home/conrad/.rvm/gems/ruby-1.9.3-p327@rapport-web/gems/better_errors-0.0.2/lib/better_errors/error_frame.rb:62:in `eval'
/home/conrad/.rvm/gems/ruby-1.9.3-p327@rapport-web/gems/better_errors-0.0.2/lib/better_errors/error_frame.rb:62:in `block in local_variables'
/home/conrad/.rvm/gems/ruby-1.9.3-p327@rapport-web/gems/better_errors-0.0.2/lib/better_errors/error_frame.rb:62:in `map'
/home/conrad/.rvm/gems/ruby-1.9.3-p327@rapport-web/gems/better_errors-0.0.2/lib/better_errors/error_frame.rb:62:in `local_variables'

This is due to https://github.com/fblee/nokogiri-plist/blob/master/nokogiri-plist.gemspec#L2 being required by Bundler (we load that gem from a git URL in our Gemfile).

There's a pretty easy, though very unsatisfying, workaround, which is just to catch the NameError. Pull request coming up.

@haileys haileys closed this as completed in fe0f50a Dec 9, 2012
haileys pushed a commit that referenced this issue Dec 9, 2012
Work around bug in `local_variables` [Fixes #1]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants