merge detect to compile-rails.rb