Search code examples
ruby-on-railsconsoleiterm2

Restore type before console loads functionality


This might be a far stretch- but I used to be able to start my rails console, and while it's loading (since it has to boot everything and we use some large apps- so it takes a while) I could begin typing the first line of code in. When it finishes loading, it catches up and has everything I had been typing loading in.

That sounds like a silly feature, and I hardly know how to even describe it, but I recently got a new machine and that functionality is gone.

I find it super frustrating, as it can take 5-8 seconds sometimes to load the console (I know there are other issues there) and I REALLY appreciated having the head start functionality.

Hopefully somebody knows what's going on here, as I'd really like to get that fixed. :)


Solution

  • Finally found the solution, and it was actually related to another console issue I was running into.

    The issue was that the readline gem was not installed prior to Ruby.

    The solution was:

    # Reinstall Readline
    brew uninstall readline
    brew install readline
    # Reinstall current version of Ruby
    rbenv uninstall 2.3.0
    rbenv install 2.3.0
    bundle install
    

    This resolved both the typing before the console finished loading, and re-enabled my access to the history in previous sessions.