ruby-on-railsperformanceconsolemailer

How to disable console output on Rails 3 development server?


How can I disable the console output on a Rails 3 application? More specifically, I want to disable at least the Mailer output, that outputs the entire email content, including the pictures, making the action processing much slower (it takes almost 10sec to send an email).

ps: I think the slowdown is because of the output, if it can be from another source, such as slow smtp server (it's gmail atm, so no.) or something else like that please let me know.


Solution

  • By this you mean you want to hide the output shown in the console run you run rails s (or script/server in rails 2)?

    Are you on Linux or OSX?

    If so, then just do the following

    $ rails server 1> /dev/null
    

    this sends all output from stdout into a blackhole.

    So right now you are trying to send emails from your dev machine? I try to avoid this, as accidents are going to happen and you'll send clients test data.

    Try Mailcatcher http://mailcatcher.me/

    It lets you catch all the emails your app would be sending shows them off in a nice web interface and importantly avoids the risk of accidentally sending real emails to customers with random test data.