Comments (14)
Hi Benjamin!
I've been changing some stuff regarding how irb
integrates with byebug
. Could you try last master and see if you can still reproduce this?
Sorry for the delay, by the way.
from byebug.
Just tried 058bac2. The error prevails. Although it only crashes on the first attempt. When I try tabcomplemtion for the second or n-th time, it works as expected.
(byebug) TerINTERNAL ERROR!!! undefined method `workspace' for nil:NilClass
/home/benni/.rbenv/versions/2.1.1/lib/ruby/2.1.0/irb/completion.rb:39:in `block in <module:InputCompletor>'
/home/benni/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/bundler/gems/byebug-058bac2de58e/lib/byebug/interfaces/local_interface.rb:34:in `call'
/home/benni/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/bundler/gems/byebug-058bac2de58e/lib/byebug/interfaces/local_interface.rb:34:in `readline'
/home/benni/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/bundler/gems/byebug-058bac2de58e/lib/byebug/interfaces/local_interface.rb:34:in `readline'
/home/benni/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/bundler/gems/byebug-058bac2de58e/lib/byebug/interfaces/local_interface.rb:16:in `read_command'
/home/benni/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/bundler/gems/byebug-058bac2de58e/lib/byebug/processors/command_processor.rb:170:in `process_commands'
/home/benni/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/bundler/gems/byebug-058bac2de58e/lib/byebug/processors/command_processor.rb:90:in `at_line'
/home/benni/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/bundler/gems/byebug-058bac2de58e/lib/byebug/processors/command_processor.rb:48:in `block in at_line'
/home/benni/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/bundler/gems/byebug-058bac2de58e/lib/byebug/processors/command_processor.rb:46:in `synchronize'
/home/benni/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/bundler/gems/byebug-058bac2de58e/lib/byebug/processors/command_processor.rb:46:in `at_line'
/home/benni/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/bundler/gems/byebug-058bac2de58e/lib/byebug/context.rb:75:in `at_line'
/home/benni/code_corner/sparta/config/initializers/devise.rb:8:in `block in <top (required)>'
/home/benni/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/devise-3.3.0/lib/devise.rb:292:in `setup'
/home/benni/code_corner/sparta/config/initializers/devise.rb:3:in `<top (required)>'
/home/benni/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:245:in `load'
/home/benni/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:245:in `block in load'
/home/benni/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:236:in `load_dependency'
/home/benni/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:245:in `load'
/home/benni/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/railties-3.2.19/lib/rails/engine.rb:593:in `block (2 levels) in <class:Engine>'
/home/benni/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/railties-3.2.19/lib/rails/engine.rb:592:in `each'
/home/benni/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/railties-3.2.19/lib/rails/engine.rb:592:in `block in <class:Engine>'
/home/benni/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/railties-3.2.19/lib/rails/initializable.rb:30:in `instance_exec'
/home/benni/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/railties-3.2.19/lib/rails/initializable.rb:30:in `run'
/home/benni/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/railties-3.2.19/lib/rails/initializable.rb:55:in `block in run_initializers'
/home/benni/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/railties-3.2.19/lib/rails/initializable.rb:54:in `each'
/home/benni/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/railties-3.2.19/lib/rails/initializable.rb:54:in `run_initializers'
/home/benni/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/railties-3.2.19/lib/rails/application.rb:136:in `initialize!'
/home/benni/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/railties-3.2.19/lib/rails/railtie/configurable.rb:30:in `method_missing'
/home/benni/code_corner/sparta/config/environment.rb:5:in `<top (required)>'
/home/benni/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:251:in `require'
/home/benni/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:251:in `block in require'
/home/benni/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:236:in `load_dependency'
/home/benni/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:251:in `require'
/home/benni/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/railties-3.2.19/lib/rails/application.rb:103:in `require_environment!'
/home/benni/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/railties-3.2.19/lib/rails/commands.rb:40:in `<top (required)>'
script/rails:6:in `require'
script/rails:6:in `<main>'
Loading development environment (Rails 3.2.19)
irb(main):001:0>
irb(main):002:0* Active
ActiveModel ActiveRecord ActiveResource ActiveSupport
irb(main):002:0* Active
I also just verified that the behaviour is the same in 3.2.0
from byebug.
All right! Thanks for the feedback @benjaminbauer, I'll let you know if I make any progress with this.
from byebug.
@benjaminbauer, I can't reproduce this. Can you tell me the exact steps to get the error you're getting? Thanks a lot.
from byebug.
@deivid-rodriguez pretty much like I described it above:
- I set a breakpoint via
byebug
in a rails initalizer - run
bundle exec rails c
- In the prompt that appears when hitting the breakpoint I press Tab once
from byebug.
Thanks what I did, that's why I was asking. Do you have any special configuration in .irbrc
o .byebugrc
?
from byebug.
Nope, the only relevant file was the .bybug_hist
, which I just deleted and reran the described steps. Same result:
~|⇒ rm .byebug_hist
~|⇒ j sparta
sparta|bba/docker⚡ ⇒ be rails c
[1, 10] in /home/benni/code_corner/sparta/config/initializers/airbrake.rb
1: excluded_environments = %w(development test cucumber custom)
2: byebug
3:
=> 4: if not excluded_environments.include? Rails.env
5: Airbrake.configure do |config|
6: config.api_key = ENV['AIRBRAKE_API_KEY']
7: config.development_environments = excluded_environments
8:
9: config.async = true
10: config.async do |notice|
(byebug) INTERNAL ERROR!!! undefined method `workspace' for nil:NilClass
/home/benni/.rbenv/versions/2.1.1/lib/ruby/2.1.0/irb/completion.rb:39:in `block in <module:InputCompletor>'
/home/benni/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/byebug-3.2.0/lib/byebug/interfaces/local_interface.rb:31:in `call'
/home/benni/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/byebug-3.2.0/lib/byebug/interfaces/local_interface.rb:31:in `readline'
/home/benni/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/byebug-3.2.0/lib/byebug/interfaces/local_interface.rb:31:in `readline'
/home/benni/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/byebug-3.2.0/lib/byebug/interfaces/local_interface.rb:13:in `read_command'
/home/benni/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/byebug-3.2.0/lib/byebug/processors/command_processor.rb:169:in `process_commands'
/home/benni/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/byebug-3.2.0/lib/byebug/processors/command_processor.rb:90:in `at_line'
/home/benni/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/byebug-3.2.0/lib/byebug/processors/command_processor.rb:48:in `block in at_line'
/home/benni/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/byebug-3.2.0/lib/byebug/processors/command_processor.rb:46:in `synchronize'
/home/benni/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/byebug-3.2.0/lib/byebug/processors/command_processor.rb:46:in `at_line'
/home/benni/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/byebug-3.2.0/lib/byebug/context.rb:77:in `at_line'
/home/benni/code_corner/sparta/config/initializers/airbrake.rb:4:in `<top (required)>'
/home/benni/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:245:in `load'
/home/benni/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:245:in `block in load'
/home/benni/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:236:in `load_dependency'
/home/benni/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:245:in `load'
/home/benni/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/railties-3.2.19/lib/rails/engine.rb:593:in `block (2 levels) in <class:Engine>'
/home/benni/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/railties-3.2.19/lib/rails/engine.rb:592:in `each'
/home/benni/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/railties-3.2.19/lib/rails/engine.rb:592:in `block in <class:Engine>'
/home/benni/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/railties-3.2.19/lib/rails/initializable.rb:30:in `instance_exec'
/home/benni/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/railties-3.2.19/lib/rails/initializable.rb:30:in `run'
/home/benni/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/railties-3.2.19/lib/rails/initializable.rb:55:in `block in run_initializers'
/home/benni/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/railties-3.2.19/lib/rails/initializable.rb:54:in `each'
/home/benni/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/railties-3.2.19/lib/rails/initializable.rb:54:in `run_initializers'
/home/benni/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/railties-3.2.19/lib/rails/application.rb:136:in `initialize!'
/home/benni/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/railties-3.2.19/lib/rails/railtie/configurable.rb:30:in `method_missing'
/home/benni/code_corner/sparta/config/environment.rb:5:in `<top (required)>'
/home/benni/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:251:in `require'
/home/benni/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:251:in `block in require'
/home/benni/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:236:in `load_dependency'
/home/benni/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:251:in `require'
/home/benni/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/railties-3.2.19/lib/rails/application.rb:103:in `require_environment!'
/home/benni/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/railties-3.2.19/lib/rails/commands.rb:40:in `<top (required)>'
script/rails:6:in `require'
script/rails:6:in `<main>'Loading development environment (Rails 3.2.19)
from byebug.
I guess it only happens in that app? Could you try with byebug 3.4.2
and (more important) with ruby 2.1.3
? Thanks for taking the time to try this.
from byebug.
Updated ruby and byebug, problem persists. I tried to set a breakpoint in a rspec test: works. So it's might be limited to breakpoints in initalizers. If nobody else is experiencing this problem, then I guess we can close this issue.
from byebug.
Can you copy that initializer in a brand new app, add the dependencies it needs and then try to reproduce the bug again? If you can reproduce it that way, then I'll be able to reproduce and fix the issue.
from byebug.
@benjaminbauer Did you manage to do what I said? Also, could please copy the log using Ruby 2.1.3 + Byebug 3.5.1. Thanks again.
from byebug.
Closing for lack of feedback
@benjaminbauer Feel free to reopening if you still want to help me reproduce this.
from byebug.
Google brought me to this issue while trying to get tab completion working in byebug.
Maybe I'm going about it the wrong way.
[hh@mba rvm]$ ls
Gemfile Gemfile.lock runme_then_hit_tab.rb
[hh@mba rvm]$ cat Gemfile
source 'https://rubygems.org'
gem 'byebug'
[hh@mba rvm]$ cat runme_then_hit_tab.rb
require 'byebug'
byebug
puts 'a'
[hh@mba rvm]$ bundle exec ruby runme_then_hit_tab.rb
[1, 3] in /home/hh/rvm/runme_then_hit_tab.rb
1: require 'byebug'
2: byebug
=> 3: puts 'a'
(byebug) require 'irb/completion'
true
(byebug) [HIT TAB HERE]/home/hh/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/irb/completion.rb:38:in `block in <module:InputCompletor>': undefined method `workspace' for nil:NilClass (NoMethodError)
from /home/hh/.rvm/gems/ruby-2.2.0/gems/byebug-6.0.2/lib/byebug/interfaces/local_interface.rb:21:in `call'
from /home/hh/.rvm/gems/ruby-2.2.0/gems/byebug-6.0.2/lib/byebug/interfaces/local_interface.rb:21:in `readline'
from /home/hh/.rvm/gems/ruby-2.2.0/gems/byebug-6.0.2/lib/byebug/interfaces/local_interface.rb:21:in `readline'
from /home/hh/.rvm/gems/ruby-2.2.0/gems/byebug-6.0.2/lib/byebug/interface.rb:68:in `prepare_input'
from /home/hh/.rvm/gems/ruby-2.2.0/gems/byebug-6.0.2/lib/byebug/interface.rb:52:in `read_input'
from /home/hh/.rvm/gems/ruby-2.2.0/gems/byebug-6.0.2/lib/byebug/interface.rb:35:in `read_command'
from /home/hh/.rvm/gems/ruby-2.2.0/gems/byebug-6.0.2/lib/byebug/processors/command_processor.rb:139:in `repl'
from /home/hh/.rvm/gems/ruby-2.2.0/gems/byebug-6.0.2/lib/byebug/processors/command_processor.rb:95:in `process_commands'
from /home/hh/.rvm/gems/ruby-2.2.0/gems/byebug-6.0.2/lib/byebug/processors/command_processor.rb:75:in `at_line'
from /home/hh/.rvm/gems/ruby-2.2.0/gems/byebug-6.0.2/lib/byebug/context.rb:109:in `at_line'
from runme_then_hit_tab.rb:3:in `<main>'
[hh@mba rvm]$ cat Gemfile.lock
GEM
remote: https://rubygems.org/
specs:
byebug (6.0.2)
PLATFORMS
ruby
DEPENDENCIES
byebug
BUNDLED WITH
1.10.2
[hh@mba rvm]$ cat .ruby-version
ruby-2.2.0
from byebug.
Hi. I think this is not byebug
's fault. To use irb
's completion you need to be inside irb
! Type irb
from byebug
's prompt and then require 'irb/completion'
.
Hopefully at some point byebug
will provide its own completions.
Closing...
from byebug.
Related Issues (20)
- byebug tends to get "stuck" in the debugger in Windows Terminal with tabs HOT 2
- Provide a way to exit the program without exiting the Rails Console
- Segmentation Fault in Ruby 3.0 Rspec HOT 5
- Only show program files in backtrace (excluding gems)
- [macOS][11.4] ERROR: Error installing byebug 11.1.3 HOT 3
- [macOS][12.0] ERROR: Error installing byebug 11.1.3 HOT 3
- Default port in byebug CLI
- Test failure with ruby 3.0.2 HOT 1
- Is it possible to make post_mortem the default behaviour?
- Byebug does not work when called in a background process group
- byebug-6 compile issue
- Exceptions when running `frame` or `backtrace` on a Sinatra application
- Arguments for `where`
- BuildError: ERROR: Failed to build gem native extension byebug 8.2.1 HOT 5
- cannot load such file -- irb (LoadError)
- Homebrew Formula error: No available formula with the name "formula". Did you mean foreman? Error: Broken pipe
- Build dependency on chandler, which is archived/unmaintained HOT 1
- Byebug error parses a comma in a string as an endinger for a line of code HOT 1
- Commands with no description HOT 2
- Byebug is not installing in mac m2 version 11.0.1 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from byebug.