title: Ruby on Rails: save files in google drive
body: <p>I have a Ruby on Rail project but i need save files in an other folder, actually it is saving in a project default folder and the source is "app/public/system/.."</p>
  
  <p>I'm trying save the files in google drive folder and i use: (this is my gemfile resume)</p>
  
  <pre><code>gem 'paperclip', '~&gt;  5.1.0'
  gem 'paperclip-googledrive-new'
  gem 'google-api-client', '0.7.1', require: 'google/api_client'
  </code></pre>
  
  <p>i did the following instructions to save my files:
  <a href="https://github.com/shoaibmalik786/paperclip-googledrive-new" rel="nofollow noreferrer">https://github.com/shoaibmalik786/paperclip-googledrive-new</a></p>
  
  <p>My model is some like this:</p>
  
  <pre><code>has_attached_file :banner, 
          :storage =&gt; :google_drive,
          :google_drive_credentials =&gt; "#{Rails.root}/config/google_drive.yml",
          :google_drive_options =&gt; {
              :public_folder_id =&gt; "0BxckPDmdZqdpYWgzbnVwUEhPVVU",
              :default_image =&gt; "missing.png", 
              :path =&gt; proc { |style| "#{style}_#{id}_#{banner.original_filename}"
          }
      }
  </code></pre>
  
  <p>i did the  <code>rake google_drive:authorize</code> and didn't have errors and in my google_drive.yml i have the result.. is this :</p>
  
  <pre><code>client_id: &lt;%= ENV["154813271628..."] %&gt;
  client_secret: &lt;%= ENV["mOfV5821kUY..."] %&gt;
  access_token: &lt;%= ENV["ya29.GlutA7bKMLwkHs6rXFYU92vZG..."] %&gt;
  refresh_token: &lt;%= ENV["1/rAuECXRz..."] %&gt;
  </code></pre>
  
  <p>Also i used "active_admin" in my aplication The actually error in the aplication is this:</p>
  
  <p><a href="https://i.stack.imgur.com/1da3K.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1da3K.png" alt="enter image description here"></a></p>
  
  <p>Thx for any help or more information</p>