why is my rails server logging everything twice?
ruby-on-rails
Solution
In my case this was caused by the `rails_12factor` gem. This gem adds the `rails_stdout_logging` gem which sends the logs to standard output. This can be useful in a production environment but not in development when Rails already does it by default.
https://github.com/heroku/rails_12factor#rails-4-logging
The solution is to only add this gem in production:
gem 'rails_12factor', group: :production
Problem
my rails server seems like it is logging everything twice, not sure what is going on here, what should I do to investigate this ? my gemfile ``` source 'https://rubygems.org' ruby '2.1.0' gem 'rails', '4.0.1' gem 'haml-rails' gem 'pg', '~> 0.17.1' gem 'redis' gem 'redis-namespace' gem 'thin', '~> 1.6.1' gem 'rabl' gem 'underscore-rails' #assets gem 'sass-rails', '~> 4.0.0' gem 'uglifier', '>= 1.3.0' gem 'foundation-rails' gem 'font-awesome-rails' #javascript gem 'coffee-rails', '~> 4.0.0' gem 'jquery-rails' gem 'jbuilder', '~> 1.2' gem 'angularjs-rails', '~> 1.2.7' gem 'ngmin-rails', '~> 0.4.0' #user auth gem 'devise', '3.0.0' gem 'omniauth' gem 'omniauth-twitter' gem 'uuidtools' #misc tools gem 'twitter' #heroku gem 'rails_12factor' group :development, :test do gem 'capybara-webkit', github: 'thoughtbot/capybara-webkit', branch: 'master' gem 'rspec-rails', '~> 2.14.1' gem 'factory_girl_rails', '4.2.1' gem 'mocha', '~> 1.0.0' gem 'pry' gem 'pry-debugger' gem 'quiet_assets' gem 'parallel_tests' gem 'zeus-parallel_tests' gem 'guard-rspec' gem 'rb-fsevent' end group :development do gem 'guard-livereload' gem 'rack-livereload' gem 'better_errors' gem 'terminal-notifier-guard' end group :test do gem 'launchy', '>= 2.1.2' gem 'capybara', '>= 1.1.3' gem 'database_cleaner', '~> 1.2.0' gem 'zeus', :require => false gem 'shoulda-matchers' gem 'pdf-inspector' gem 'selenium-webdriver' gem "mock_redis", "~> 0.11.0" end ```