Pasting a long string of text into Heroku rails console
Asked Answered
E

2

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?

Emaciated answered 27/10, 2020 at 15:21 Comment(0)
S
36

Run this in project directory

heroku run 'bundle exec rails c -- --nomultiline'
Surakarta answered 29/10, 2020 at 9:7 Comment(0)
E
8

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>
Emaciated answered 27/10, 2020 at 15:21 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.