18

Pasting any string longer than a couple hundred characters into a Heroku rails console takes forever. The more characters are pasted, the slower it goes, letter by letter. Is there a way to make this run at a reasonable speed?

Aaron Gray
  • 11,283
  • 7
  • 55
  • 61

2 Answers2

33

Run this in project directory

heroku run 'bundle exec rails c -- --nomultiline'
PGill
  • 3,373
  • 18
  • 21
7

This is a problem with Ruby's 2.7's default multi-line pasting in irb. Here's how to resolve it.

$ heroku run -a my_app_name bash
$ echo 'IRB.conf[:USE_MULTILINE] = false' > ~/.irbrc
$ bin/rails c
> <Now you can paste the text in and it will go quickly>
Aaron Gray
  • 11,283
  • 7
  • 55
  • 61