You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've run in to an issue with Pry resulting an internal exception. The error only occurs when pry-rescue is loaded. I've been able to reproduce the issue by:
Generating a new Rails application with Rails 4.1.9: rails new foo
Generating a new model with a migration rails g model Bar foo:string
NoMethodError: undefined method `[]' for nil:NilClass
from /Users/jacob/.rvm/gems/ruby-2.1.5@foo/gems/pry-0.10.1/lib/pry/last_exception.rb:54:in `bt_source_location_for'
from /Users/jacob/.rvm/gems/ruby-2.1.5@foo/gems/pry-0.10.1/lib/pry/last_exception.rb:15:in `initialize'
from /Users/jacob/.rvm/gems/ruby-2.1.5@foo/gems/pry-0.10.1/lib/pry/pry_instance.rb:494:in `new'
from /Users/jacob/.rvm/gems/ruby-2.1.5@foo/gems/pry-0.10.1/lib/pry/pry_instance.rb:494:in `last_exception='
from /Users/jacob/.rvm/gems/ruby-2.1.5@foo/gems/pry-0.10.1/lib/pry/pry_instance.rb:331:in `rescue in handle_line'
from /Users/jacob/.rvm/gems/ruby-2.1.5@foo/gems/pry-0.10.1/lib/pry/pry_instance.rb:317:in `handle_line'
from /Users/jacob/.rvm/gems/ruby-2.1.5@foo/gems/pry-0.10.1/lib/pry/pry_instance.rb:243:in `block (2 levels) in eval'
from /Users/jacob/.rvm/gems/ruby-2.1.5@foo/gems/pry-0.10.1/lib/pry/pry_instance.rb:242:in `catch'
from /Users/jacob/.rvm/gems/ruby-2.1.5@foo/gems/pry-0.10.1/lib/pry/pry_instance.rb:242:in `block in eval'
from /Users/jacob/.rvm/gems/ruby-2.1.5@foo/gems/pry-0.10.1/lib/pry/pry_instance.rb:241:in `catch'
from /Users/jacob/.rvm/gems/ruby-2.1.5@foo/gems/pry-0.10.1/lib/pry/pry_instance.rb:241:in `eval'
from /Users/jacob/.rvm/gems/ruby-2.1.5@foo/gems/pry-0.10.1/lib/pry/repl.rb:77:in `block in repl'
from /Users/jacob/.rvm/gems/ruby-2.1.5@foo/gems/pry-0.10.1/lib/pry/repl.rb:67:in `loop'
from /Users/jacob/.rvm/gems/ruby-2.1.5@foo/gems/pry-0.10.1/lib/pry/repl.rb:67:in `repl'
from /Users/jacob/.rvm/gems/ruby-2.1.5@foo/gems/pry-0.10.1/lib/pry/repl.rb:38:in `block in start'
from /Users/jacob/.rvm/gems/ruby-2.1.5@foo/gems/pry-0.10.1/lib/pry/input_lock.rb:61:in `call'
from /Users/jacob/.rvm/gems/ruby-2.1.5@foo/gems/pry-0.10.1/lib/pry/input_lock.rb:61:in `__with_ownership'
from /Users/jacob/.rvm/gems/ruby-2.1.5@foo/gems/pry-0.10.1/lib/pry/input_lock.rb:79:in `with_ownership'
from /Users/jacob/.rvm/gems/ruby-2.1.5@foo/gems/pry-0.10.1/lib/pry/repl.rb:38:in `start'
from /Users/jacob/.rvm/gems/ruby-2.1.5@foo/gems/pry-0.10.1/lib/pry/repl.rb:15:in `start'
from /Users/jacob/.rvm/gems/ruby-2.1.5@foo/gems/pry-0.10.1/lib/pry/pry_class.rb:169:in `start'
from /Users/jacob/.rvm/gems/ruby-2.1.5@foo/gems/pry-0.10.1/lib/pry/core_extensions.rb:43:in `pry'
from (irb):1
from /Users/jacob/.rvm/gems/ruby-2.1.5@foo/gems/railties-4.1.9/lib/rails/commands/console.rb:90:in `start'
from /Users/jacob/.rvm/gems/ruby-2.1.5@foo/gems/railties-4.1.9/lib/rails/commands/console.rb:9:in `start'
from /Users/jacob/.rvm/gems/ruby-2.1.5@foo/gems/railties-4.1.9/lib/rails/commands/commands_tasks.rb:69:in `console'
from /Users/jacob/.rvm/gems/ruby-2.1.5@foo/gems/railties-4.1.9/lib/rails/commands/commands_tasks.rb:40:in `run_command!'
from /Users/jacob/.rvm/gems/ruby-2.1.5@foo/gems/railties-4.1.9/lib/rails/commands.rb:17:in `<top (required)>'
from bin/rails:8:in `require'
The text was updated successfully, but these errors were encountered:
I've run in to an issue with Pry resulting an internal exception. The error only occurs when pry-rescue is loaded. I've been able to reproduce the issue by:
rails new foo
rails g model Bar foo:string
rake db:migrate
method_missing
toBar
like this:rails c
pry
Bar.new(foo: "asd")
The full stack trace looks like this:
The text was updated successfully, but these errors were encountered: