How to display rails server infos with colors in terminal

前端 未结 1 823
粉色の甜心
粉色の甜心 2021-01-07 00:34

I am using rails-3.2.10 with ruby-1.9.3-head, my question is, when I run

rails s

how can I have some color in my bash terminal? I wanted to

相关标签:
1条回答
  • 2021-01-07 01:19

    I tried this and it works perfect in Rails 3.2.13 and Ruby 2.0.0. You can customize colors and messages.

    That solution is also in the form of a gem.

    gem 'formatted_rails_logger'
    

    Gem is better formatted but is not colorized. I prefer the first solution.

    Regards!

    EDIT:

    Try gem meta_request and Rails Panel chrome extension. You can see the server log in your browser well organized, showing params, SQL queries, etc.

    0 讨论(0)
提交回复
热议问题