【发布时间】:2021-11-15 17:20:35
【问题描述】:
在 Heroku 中尝试将选项传递给 rails console 时,显示以下错误:
> heroku run rails console -- --nomultiline
Running rails console "-- --nomultiline" on ⬢ the-app... up, run.512 (Standard-1X)
Traceback (most recent call last):
...
/app/vendor/bundle/ruby/2.7.0/gems/railties-6.1.4/lib/rails/commands/console/console_command.rb:95:in `perform': wrong number of arguments (given 1, expected 0) (ArgumentError)
...
/app/vendor/bundle/ruby/2.7.0/gems/thor-1.1.0/lib/thor/base.rb:525:in `handle_argument_error': ERROR: "rails console" was called with arguments ["-- --nomultiline"] (Thor::InvocationError)
这是 IRB 多行支持在粘贴长行时中断的解决方法。
【问题讨论】:
标签: ruby-on-rails heroku irb