`
斌-黄
  • 浏览: 42651 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

Rails 3.2 运行 Warning

 
阅读更多
1. Place the following code in config/initializers/quiet_assets.rb
b
Rails.application.assets.logger = Logger.new('/dev/null')
Rails::Rack::Logger.class_eval do
  def call_with_quiet_assets(env)
    previous_level = Rails.logger.level
    Rails.logger.level = Logger::ERROR if env['PATH_INFO'].index("/assets/") == 0
    call_without_quiet_assets(env).tap do
      Rails.logger.level = previous_level
    end
  end
  alias_method_chain :call, :quiet_assets
end


2. Gemfile 加上
gem "thin"

然后 bundle install,重启 Server.

3. Done
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics