Errno::EBADF (Bad file descriptor)
linojon opened this issue · 2 comments
hi, i created a new Rails 6 project, add byebug in a controller, and always get this error (even in the simplest WelcomController#index). Using byebug gem 11.1.3
Completed 500 Internal Server Error in 13ms (ActiveRecord: 0.0ms | Allocations: 108973)
Errno::EBADF (Bad file descriptor):
Can you help me get this going?
fyi i also tried $ byebug triangle.rb and get a similar error. Using ruby 2.6.6p146 (2020-03-31 revision 67876) [x64-mingw32] on Windows 10
Jonathan@Jons-MSI-GS65 MINGW64 /d/Documents/RailsProjects
$ byebug triangle.rb
[1, 10] in D:/Documents/RailsProjects/triangle.rb
1: #
2: # The n'th triangle number: triangle(n) = n*(n+1)/2 = 1 + 2 + ... + n
3: #
=> 4: def triangle(n)
5: tri = 0
6:
7: 0.upto(n) { |i| tri += i }
8:
9: tri
10: end
Γû╜Bad file descriptor
["C:/Ruby26-x64/lib/ruby/site_ruby/reline/ansi.rb:105:in raw'", "C:/Ruby26-x64/lib/ruby/site_ruby/reline/ansi.rb:105:in
cursor_pos'", "C:/Ruby26-x64/lib/ruby/site_ruby/reline.rb:345:in may_req_ambiguous_char_width'", "C:/Ruby26-x64/lib/ruby/site_ruby/reline.rb:207:in
inner_readline'", "C:/Ruby26-x64/lib/ruby/site_ruby/reline.rb:187:in readline'", "C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/forwardable-1.3.1/lib/forwardable.rb:235:in
readline'", "C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/byebug-11.1.3/lib/byebug/interfaces/local_interface.rb:24:in block (2 levels) in readline'", "C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/byebug-11.1.3/lib/byebug/interfaces/local_interface.rb:57:in
without_readline_completion'", "C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/byebug-11.1.3/lib/byebug/interfaces/local_interface.rb:24:in block in readline'", "C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/byebug-11.1.3/lib/byebug/interfaces/local_interface.rb:36:in
with_repl_like_sigint'", "C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/byebug-11.1.3/lib/byebug/interfaces/local_interface.rb:24:in readline'", "C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/byebug-11.1.3/lib/byebug/interface.rb:71:in
prepare_input'", "C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/byebug-11.1.3/lib/byebug/interface.rb:55:in read_input'", "C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/byebug-11.1.3/lib/byebug/interface.rb:38:in
read_command'", "C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/byebug-11.1.3/lib/byebug/processors/command_processor.rb:128:in repl'", "C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/byebug-11.1.3/lib/byebug/processors/command_processor.rb:97:in
process_commands'", "C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/byebug-11.1.3/lib/byebug/processors/command_processor.rb:55:in at_line'", "C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/byebug-11.1.3/lib/byebug/context.rb:98:in
at_line'", "D:/Documents/RailsProjects/triangle.rb:4:in <top (required)>'", "C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/byebug-11.1.3/lib/byebug/runner.rb:186:in
debug_load'", "C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/byebug-11.1.3/lib/byebug/runner.rb:186:in debug_program'", "C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/byebug-11.1.3/lib/byebug/runner.rb:103:in
block in run'", "C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/byebug-11.1.3/lib/byebug/runner.rb:102:in loop'", "C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/byebug-11.1.3/lib/byebug/runner.rb:102:in
run'", "C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/byebug-11.1.3/exe/byebug:6:in <top (required)>'", "C:/Ruby26-x64/bin/byebug:23:in
load'", "C:/Ruby26-x64/bin/byebug:23:in `
I was using gitbash and geting the same error but as I use windows command prompt I did not get this error