oggy / looksee

Supercharged method introspection in IRB
MIT License
364 stars 14 forks source link

problem in rails console #6

Closed aziz closed 14 years ago

aziz commented 14 years ago

when I run lp [] in irb everything is fine, but when running the same command in rails console I get something like this:

ESC[1;37mArrayESC[0m ESC[1;32m&ESC[0m ESC[1;32mcompact!ESC[0m ESC[1;32minclude?ESC[0m
ESC[1;32mrassocESC[0m ESC[1;32mto_aESC[0m

the ansi colors are working fine in irb but in rails console they just make a mess in way that makes it unusable!

oggy commented 14 years ago

Hi Aziz,

I often use looksee in the Rails console, and have never seen this. What version of ruby and rails are you using? Does it still happen if you move your .irbrc out of the way?

oggy commented 14 years ago

Cleaning up stale issues. Please reopen if you're still having problems.

Thanks!

acadevia commented 13 years ago

Found the fix for this:

http://jetpackweb.com/blog/2011/01/20/pretty-paging-in-rails-console/

It has to do with the fact that Rails console is using a pager, and you need to add a flag for the pager in order to enable ANSI rendering.

oggy commented 13 years ago

Ah, nice.

oggy commented 5 years ago

Thanks!