SHARE
TWEET

Untitled

a guest Aug 18th, 2018 137 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Bah! I keep getting this encoding error in rails with ruby 1.9.2
  2. staging:
  3.   adapter: mysql
  4.   database:something
  5.   encoding: utf8
  6.   username: something
  7.   password: something
  8.   host: localhost    
  9.  
  10. production:
  11.   adapter: mysql
  12.   database:something
  13.   encoding: utf8
  14.   username: something
  15.   password: something
  16.   host: localhost
  17.    
  18. Encoding.default_external = "UTF-8"
  19. require ::File.expand_path('../config/environment',  __FILE__)
  20. run Someappname::Application
  21.    
  22. # Load the rails application
  23. require File.expand_path('../application', __FILE__)
  24. Encoding.default_external = Encoding::UTF_8
  25. Encoding.default_internal = Encoding::UTF_8
  26. Someappname::Application.initialize!
  27.    
  28. Encoding.default_external = Encoding::UTF_8
  29. Encoding.default_internal = Encoding::UTF_8
  30.    
  31. +--------------------------+----------------------------+
  32. | Variable_name            | Value                      |
  33. +--------------------------+----------------------------+
  34. | character_set_client     | latin1                     |
  35. | character_set_connection | latin1                     |
  36. | character_set_database   | utf8                       |
  37. | character_set_filesystem | binary                     |
  38. | character_set_results    | latin1                     |
  39. | character_set_server     | latin1                     |
  40. | character_set_system     | utf8                       |
  41. | character_sets_dir       | /usr/share/mysql/charsets/ |
  42. +--------------------------+----------------------------+
  43.    
  44. +----------------------+-------------------+
  45. | Variable_name        | Value             |
  46. +----------------------+-------------------+
  47. | collation_connection | latin1_swedish_ci |
  48. | collation_database   | utf8_general_ci   |
  49. | collation_server     | latin1_swedish_ci |
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top