Special chars like e.g. {~ are not supported within rails console on windows

published on December 20, 2007 by Michal
category: Ruby on Rails, general stuff

When working with Ruby on Rails on a windows machine you will sometimes need the development console or the interactive ruby console (irb). Actually you need it quite often :) If you do so you’ll discover that special character like the tilde (~) or the {}-brackets are not supported there. Why? I don’t know but let me know if you know the reason. However, to solve this problem just create a file which has the following content:


“\M-[”: “[”
“\M-]”: “]”
“\M-{”: “{”
“\M-}”: “}”
“\M-\\”: “\\”
“\M-|”: “|”
“\M-@”: “@”
“\M-~”: “~”
“\M-?”: “?”

save this to e.g. c:\.inputrc and put the following to your irb.bat (which is usually located in c:\ruby\bin\) straight after the @echo off line:

SET INPUTRC=C:\.inputrc

Now you should be a more happier Rails dev.. At least i am. (I found this information at flip’s blog - Thanks!)

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

Leave a Reply


Please surround code with [asp]..[/asp], [javascript]..[/javascript], [php]..[/php], [html]..[/html] to highlight source code within your comments.

Currently highest rated articles on webdevbros: