8

A follow up to Disable irb autocomplete

I would like to disable IRB on Heroku, e.g. having an .irbrc with:

IRB.conf[:USE_AUTOCOMPLETE] = false

In the home directory of my heroku dyno/server

How can I do it?

Dorian
  • 7,749
  • 4
  • 38
  • 57

3 Answers3

10

If you don't want to update the .irbrc on Heroku because that would affect others' usage of it, you can also disable autocomplete on Heroku just for yourself via the command line when you open it. The quotes are critical, or you will get a Thor::InvocationError:

heroku run "rails console -- --noautocomplete"

GreekStack
  • 101
  • 1
  • 5
7

Your application's root directory ends up being the application's user's home directory at Heroku so you could put a .irbrc in your application's root directory. So add your .irbrc with IRB.conf[:USE_AUTOCOMPLETE] = false to your app's root directory so that it looks like this:

$ cd your_app_root_directory
$ ls -1A
.git/
...
.irbrc # <-----------------
...
Gemfile
Gemfile.lock
Procfile
README.md
Rakefile
app/
bin/
config/
config.ru
db/
...

Then, once you push everything up to Heroku, heroku run console will use that .irbrc.

mu is too short
  • 426,620
  • 70
  • 833
  • 800
1

Create an .irbrc file with this content:

IRB.conf[:USE_AUTOCOMPLETE] = false
IRB.conf[:PROMPT_MODE] = :SIMPLE
Dorian
  • 7,749
  • 4
  • 38
  • 57