stack twitter tryhackme rss linkedin cross

Wilco van Esch

Skip to main content

Search results

    "RbReadline: HOME" environment variable issue on Windows

    Using Ruby on Windows, you may receive this error:

    C:/Ruby23-x64/lib/ruby/site_ruby/2.3.0/
    rbreadline.rb:1097:in `<module:RbReadline>':
    HOME environment variable (or HOMEDRIVE and HOMEPATH)
    must be set and point to a directory (RuntimeError)
    

    To fix it, check your HOME, HOMEDRIVE, and HOMEPATH environment variables. To list them in a command prompt, type:

    set home
    

    An example result:

    HOME=C:\windows\system32\config\systemprofile
    HOMEDRIVE=C:
    HOMEPATH=\Users\firstname.lastname
    

    HOMEDRIVE + HOMEPATH (e.g. C:\Users\firstname.lastname) would have to be a valid path that you can access and which doesn't have special characters in firstname or lastname.

    The HOME path also needs to be a valid path that you can access. In my case, I found that accessing the path required administrator rights. I had to go to the config folder, gain access by entering admin details, go to the systemprofile folder, gain access by entering admin details. Then I tried irb and was able to start it without issue.