Я использую последнюю версию RubyMine, 2020.1.1 (Build # RM-201.7223.94), Ruby 2.7 и Rails 6.0.2.2. Когда я пытаюсь запустить консоль Rails, я получаю эту ошибку:
C:\Users\pupeno\scoop\apps\ruby\current\bin\ruby.exe "C:/Users/pupeno/Documents/Flexpoint Tech/projectx-be/bin/rails" console -- --simple-prompt --legacy
Loading development environment (Rails 6.0.3.1)
Switch to inspect mode.
C:/Users/pupeno/scoop/apps/ruby/2.7.1-1/lib/ruby/2.7.0/reline/line_editor.rb:211:in `div': divided by 0 (ZeroDivisionError)
from C:/Users/pupeno/scoop/apps/ruby/2.7.1-1/lib/ruby/2.7.0/reline/line_editor.rb:211:in `calculate_height_by_width'
from C:/Users/pupeno/scoop/apps/ruby/2.7.1-1/lib/ruby/2.7.0/reline/line_editor.rb:352:in `rerender'
from C:/Users/pupeno/scoop/apps/ruby/2.7.1-1/lib/ruby/2.7.0/reline.rb:225:in `inner_readline'
from C:/Users/pupeno/scoop/apps/ruby/2.7.1-1/lib/ruby/2.7.0/reline.rb:187:in `readline'
from C:/Users/pupeno/scoop/apps/ruby/2.7.1-1/lib/ruby/2.7.0/forwardable.rb:235:in `readline'
from C:/Users/pupeno/scoop/apps/ruby/2.7.1-1/lib/ruby/2.7.0/forwardable.rb:235:in `readline'
from C:/Users/pupeno/scoop/apps/ruby/2.7.1-1/lib/ruby/2.7.0/irb/input-method.rb:161:in `gets'
from C:/Users/pupeno/scoop/apps/ruby/2.7.1-1/lib/ruby/2.7.0/irb.rb:518:in `block (2 levels) in eval_input'
from C:/Users/pupeno/scoop/apps/ruby/2.7.1-1/lib/ruby/2.7.0/irb.rb:695:in `signal_status'
from C:/Users/pupeno/scoop/apps/ruby/2.7.1-1/lib/ruby/2.7.0/irb.rb:517:in `block in eval_input'
from C:/Users/pupeno/scoop/apps/ruby/2.7.1-1/lib/ruby/2.7.0/irb/ruby-lex.rb:166:in `lex'
from C:/Users/pupeno/scoop/apps/ruby/2.7.1-1/lib/ruby/2.7.0/irb/ruby-lex.rb:138:in `block (2 levels) in each_top_level_statement'
from C:/Users/pupeno/scoop/apps/ruby/2.7.1-1/lib/ruby/2.7.0/irb/ruby-lex.rb:135:in `loop'
from C:/Users/pupeno/scoop/apps/ruby/2.7.1-1/lib/ruby/2.7.0/irb/ruby-lex.rb:135:in `block in each_top_level_statement'
from C:/Users/pupeno/scoop/apps/ruby/2.7.1-1/lib/ruby/2.7.0/irb/ruby-lex.rb:134:in `catch'
from C:/Users/pupeno/scoop/apps/ruby/2.7.1-1/lib/ruby/2.7.0/irb/ruby-lex.rb:134:in `each_top_level_statement'
from C:/Users/pupeno/scoop/apps/ruby/2.7.1-1/lib/ruby/2.7.0/irb.rb:536:in `eval_input'
from C:/Users/pupeno/scoop/apps/ruby/2.7.1-1/lib/ruby/2.7.0/irb.rb:471:in `block in run'
from C:/Users/pupeno/scoop/apps/ruby/2.7.1-1/lib/ruby/2.7.0/irb.rb:470:in `catch'
from C:/Users/pupeno/scoop/apps/ruby/2.7.1-1/lib/ruby/2.7.0/irb.rb:470:in `run'
from C:/Users/pupeno/scoop/apps/ruby/2.7.1-1/lib/ruby/2.7.0/irb.rb:399:in `start'
from C:/Users/pupeno/scoop/persist/ruby/gems/gems/railties-6.0.3.1/lib/rails/commands/console/console_command.rb:70:in `start'
from C:/Users/pupeno/scoop/persist/ruby/gems/gems/railties-6.0.3.1/lib/rails/commands/console/console_command.rb:19:in `start'
from C:/Users/pupeno/scoop/persist/ruby/gems/gems/railties-6.0.3.1/lib/rails/commands/console/console_command.rb:102:in `perform'
from C:/Users/pupeno/scoop/persist/ruby/gems/gems/thor-1.0.1/lib/thor/command.rb:27:in `run'
from C:/Users/pupeno/scoop/persist/ruby/gems/gems/thor-1.0.1/lib/thor/invocation.rb:127:in `invoke_command'
from C:/Users/pupeno/scoop/persist/ruby/gems/gems/thor-1.0.1/lib/thor.rb:392:in `dispatch'
from C:/Users/pupeno/scoop/persist/ruby/gems/gems/railties-6.0.3.1/lib/rails/command/base.rb:69:in `perform'
from C:/Users/pupeno/scoop/persist/ruby/gems/gems/railties-6.0.3.1/lib/rails/command.rb:46:in `invoke'
from C:/Users/pupeno/scoop/persist/ruby/gems/gems/railties-6.0.3.1/lib/rails/commands.rb:18:in `<top (required)>'
from C:/Users/pupeno/Documents/Flexpoint Tech/projectx-be/bin/rails:4:in `require'
from C:/Users/pupeno/Documents/Flexpoint Tech/projectx-be/bin/rails:4:in `<main>'
▽
Process finished with exit code 1
Когда я пытаюсь запустить простой IRB:
C:\Users\pupeno\scoop\apps\ruby\current\bin\ruby.exe "C:/Program Files/JetBrains/RubyMine 2020.1.1/plugins/ruby/rb/testing/runner/irb.rb" --simple-prompt --legacy
Switch to inspect mode.
C:/Users/pupeno/scoop/persist/ruby/gems/gems/reline-0.1.4/lib/reline/line_editor.rb:211:in `div': divided by 0 (ZeroDivisionError)
from C:/Users/pupeno/scoop/persist/ruby/gems/gems/reline-0.1.4/lib/reline/line_editor.rb:211:in `calculate_height_by_width'
from C:/Users/pupeno/scoop/persist/ruby/gems/gems/reline-0.1.4/lib/reline/line_editor.rb:352:in `rerender'
from C:/Users/pupeno/scoop/persist/ruby/gems/gems/reline-0.1.4/lib/reline.rb:225:in `inner_readline'
from C:/Users/pupeno/scoop/persist/ruby/gems/gems/reline-0.1.4/lib/reline.rb:187:in `readline'
from C:/Users/pupeno/scoop/apps/ruby/2.7.1-1/lib/ruby/2.7.0/forwardable.rb:235:in `readline'
from C:/Users/pupeno/scoop/apps/ruby/2.7.1-1/lib/ruby/2.7.0/forwardable.rb:235:in `readline'
from C:/Users/pupeno/scoop/persist/ruby/gems/gems/irb-1.2.3/lib/irb/input-method.rb:161:in `gets'
from C:/Users/pupeno/scoop/persist/ruby/gems/gems/irb-1.2.3/lib/irb.rb:518:in `block (2 levels) in eval_input'
from C:/Users/pupeno/scoop/persist/ruby/gems/gems/irb-1.2.3/lib/irb.rb:694:in `signal_status'
from C:/Users/pupeno/scoop/persist/ruby/gems/gems/irb-1.2.3/lib/irb.rb:517:in `block in eval_input'
from C:/Users/pupeno/scoop/persist/ruby/gems/gems/irb-1.2.3/lib/irb/ruby-lex.rb:166:in `lex'
from C:/Users/pupeno/scoop/persist/ruby/gems/gems/irb-1.2.3/lib/irb/ruby-lex.rb:138:in `block (2 levels) in each_top_level_statement'
from C:/Users/pupeno/scoop/persist/ruby/gems/gems/irb-1.2.3/lib/irb/ruby-lex.rb:135:in `loop'
from C:/Users/pupeno/scoop/persist/ruby/gems/gems/irb-1.2.3/lib/irb/ruby-lex.rb:135:in `block in each_top_level_statement'
from C:/Users/pupeno/scoop/persist/ruby/gems/gems/irb-1.2.3/lib/irb/ruby-lex.rb:134:in `catch'
from C:/Users/pupeno/scoop/persist/ruby/gems/gems/irb-1.2.3/lib/irb/ruby-lex.rb:134:in `each_top_level_statement'
from C:/Users/pupeno/scoop/persist/ruby/gems/gems/irb-1.2.3/lib/irb.rb:536:in `eval_input'
from C:/Users/pupeno/scoop/persist/ruby/gems/gems/irb-1.2.3/lib/irb.rb:471:in `block in run'
from C:/Users/pupeno/scoop/persist/ruby/gems/gems/irb-1.2.3/lib/irb.rb:470:in `catch'
from C:/Users/pupeno/scoop/persist/ruby/gems/gems/irb-1.2.3/lib/irb.rb:470:in `run'
from C:/Users/pupeno/scoop/persist/ruby/gems/gems/irb-1.2.3/lib/irb.rb:399:in `start'
from C:/Program Files/JetBrains/RubyMine 2020.1.1/plugins/ruby/rb/testing/runner/irb.rb:3:in `<main>'
▽
Process finished with exit code 1
Запуск любого из них с терминала внутри RubyMine (который запускает PowerShell) работает.
Есть идеи, что здесь не так?
Если я попытаюсь запустить ту же команду, которую RubyMine выполняет при запуске консоли Rails, она просто работает:
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
Try the new cross-platform PowerShell https://aka.ms/pscore6
PS C:\Users\pupeno\Documents\Flexpoint Tech\projectx-be> C:\Users\pupeno\scoop\apps\ruby\current\bin\ruby.exe "C:/Users/pupeno/Documents/Flexpoint Tech/projectx-be/bin/rails" console -- --simple-prompt --legacy
Loading development environment (Rails 6.0.3.1)
>>
То же с отдельной консолью PowerShell:
PS C:\Users\pupeno\Documents\Flexpoint Tech\projectx-be> C:\Users\pupeno\scoop\apps\ruby\current\bin\ruby.exe "C:/Users/pupeno/Documents/Flexpoint Tech/projectx-be/bin/rails" console -- --simple-prompt --legacy
Loading development environment (Rails 6.0.3.1)
>>
и даже cmd.exe
:
Microsoft Windows [Version 10.0.18363.836]
(c) 2019 Microsoft Corporation. All rights reserved.
C:\Users\pupeno>cd "Documents\Flexpoint Tech\projectx-be"
C:\Users\pupeno\Documents\Flexpoint Tech\projectx-be>C:\Users\pupeno\scoop\apps\ruby\current\bin\ruby.exe "C:/Users/pupeno/Documents/Flexpoint Tech/projectx-be/bin/rails" console -- --simple-prompt --legacy
Loading development environment (Rails 6.0.3.1)
>>