title: rails4, carrierwave upload file name too long
body: <p>I'm uploading image using carrierwave remote_url.</p>
  
  <pre><code>info.remote_image_url = "IMG_URL_HOST/IMG_PAHT/IMG_NAME"
  </code></pre>
  
  <p>Return error message is</p>
  
  <blockquote>
    <p>Errno::ENAMETOOLONG: File name too long @ rb_sysopen<br>
    - /Users/kai/rails/rails_pjt/public/uploads/tmp/1421373782-65124-7719/D-__E1_84_8B_E1_85_A1_E1_86_AB_E1_84_8C_E1_85_B5_E1_84_8B_E1_85_A7_E1_86_AB__E1_84_82_E1_85_A1_E1_86_AF_E1_84_8D_E1_85_A1_E1_84_87_E1_85_A7_E1_86_AF_E1_84_8B_E1_85_A5_E1_86_B8_E1_84_86_E1_85_AE_0423__E1_84_8B_E1_85_A9_E1_84_85_E1_85_B3_E1_84_89_E1_85_A5_E1_86_BC_E1_84_92_E1_85_A7_E1_86_BC_E1_84_8B_E1_85_AC_E1_84_80_E1_85_AA-_E1_84_80_E1_85_AE_E1_86_BA_E1_84_83_E1_85_A1_E1_86_A8__E1_84_87_E1_85_A9_E1_86_AF_E1_84_85_E1_85_B2_E1_86_B7_E1_84_8C_E1_85_B5_E1_84_87_E1_85_A1_E1_86_BC_E1_84_8B_E1_85_B5_E1_84_89_E1_85_B5_E1_86_A8__E1_84_86_E1_85_A1_E1_86_AF_E1_84_84_E1_85_A9_E1_86_BC_E1_84_80_E1_85_A1_E1_84_85_E1_85_B5_orps3_landing_05.jpg
    from /Users/kai/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/fileutils.rb:1396:in `initialize'</p>
  </blockquote>
  
  <p>Image file's length is 101</p>
  
  <p>but after encoding UTF-8 length is 637</p>
  
  <p>and them 
  I found this solution.</p>
  
  <p><a href="http://stackoverflow.com/questions/16472894/modify-filename-before-saving-with-carrierwave">http://stackoverflow.com/questions/16472894/modify-filename-before-saving-with-carrierwave</a></p>
  
  <p>But it is different version image path</p>
  
  <pre><code>ex) file_name     : D-__E1_84_8B_E1_85_A1_E1_86_AB_E1_84.png
  android_version   : android_D-__E1_84_8B_E1_85_A1_E1_86_.png
  thumbnail_version : thumbnail_D-__E1_84_8B_E1_85_A1_E1_8.png
  </code></pre>
  
  <p>How to fix extend file name limit.</p>