'Disabling irb autocomplete on Heroku
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?
Solution 1:[1]
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
.
Solution 2:[2]
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"
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | |
Solution 2 |