diff options
author | Louise Crow <louise.crow@gmail.com> | 2012-11-08 15:20:18 +0000 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2012-11-08 15:21:29 +0000 |
commit | f5ee8d634ba01b27ddaa840b05c57e35e1d72374 (patch) | |
tree | dec14d5e1d7994c71e92916689d8884faba9aa48 | |
parent | 89caf165693a69b3c0ffe5de63f4dd91fe14022b (diff) |
Suppress iconv deprecation warnings when running under Ruby 1.9
-rw-r--r-- | config/environment.rb | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/config/environment.rb b/config/environment.rb index 12501eb89..855174251 100644 --- a/config/environment.rb +++ b/config/environment.rb @@ -1,8 +1,14 @@ # Be sure to restart your web server when you modify this file. - -# the default encoding for IO is utf-8, and we use utf-8 internally if RUBY_VERSION.to_f >= 1.9 + # the default encoding for IO is utf-8, and we use utf-8 internally Encoding.default_external = Encoding.default_internal = Encoding::UTF_8 + # Suppress warning messages and require inflector to avoid iconv deprecation message + # "iconv will be deprecated in the future, use String#encode instead." when loading + # it as part of rails + original_verbose, $VERBOSE = $VERBOSE, nil + require 'active_support/inflector' + # Activate warning messages again. + $VERBOSE = original_verbose end # Uncomment below to force Rails into production mode when |