Special chars like e.g. {~ are not supported within rails console on windows
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!)


