Note that there are some explanatory texts on larger screens.

plurals
  1. POPaperclip & Fog: Getting 'NameError (uninitialized constant Fog):'
    primarykey
    data
    text
    <p>Paperclip/Fog works on my local machine (Mac 10.8.4), but fails on server (Ubuntu 10.04 LTS). We have been using paperclip fine with local storage, but last night, migrated to cloud files and I'm getting this: 'uninitialized constant Fog' error.</p> <p>Console Output:</p> <pre><code>Started PUT "/projects/car-tournament-of-champions-catoc" for 70.112.118.118 at 2013-08-19 06:44:57 +0000 Processing by ProjectsController#update as HTML Parameters: {"utf8"=&gt;"✓", "authenticity_token"=&gt;"dwYOstjhuj2npLioC2rcXBKQ4lhGMlLt8s+epBm5vzk=", "project"=&gt;{"name"=&gt;"Car Tournament of Champions™ (CATOC™)", "headline"=&gt;"Introducing true audiophile sound to the automotive environment", "about"=&gt;"Car Audio Tournament of Champions (CATOC) is the world leader in premium sound system evaluation and marketing", "project_image"=&gt;#&lt;ActionDispatch::Http::UploadedFile:0x000000064a96c8 @original_filename="CATOC_MAIN_K.jpg", @content_type="image/jpeg", @headers="Content-Disposition: form-data; name=\"project[project_image]\"; filename=\"CATOC_MAIN_K.jpg\"\r\nContent-Type: image/jpeg\r\n", @tempfile=#&lt;File:/tmp/RackMultipart20130819-4418-97i2l5&gt;&gt;, "category_id"=&gt;"1", "paypal_email"=&gt;"pre-registration@catoc-cca.com", "extra_amount"=&gt;"0", "extend_days"=&gt;"0"}, "button"=&gt;"", "id"=&gt;"car-tournament-of-champions-catoc"} Completed 500 Internal Server Error in 12ms NameError (uninitialized constant Fog): app/controllers/projects_controller.rb:387:in `block in update' app/controllers/projects_controller.rb:386:in `update' </code></pre> <p>Gemfile:</p> <pre><code>gem 'rails', '3.2.3' #ruby 1.9.3-p194 gem 'fog' gem 'paperclip', '~&gt; 3.0' </code></pre> <p>application.rb file:</p> <pre><code>config.paperclip_defaults = { :path =&gt; "images/:class/:id/:attachment/:style/img_:fingerprint", :storage =&gt; :fog, :fog_credentials =&gt; { :provider =&gt; 'Rackspace', :rackspace_username =&gt; '&lt;rackspace userid&gt;', :rackspace_api_key =&gt; '&lt;rackspace api key&gt;', :region =&gt; 'dfw', :persistent =&gt; false }, :fog_directory =&gt; "prod_image_container", :fog_public =&gt; true, :fog_host =&gt; "http://c8d0f182112c0c3e585e-d37a976c417d5d9c71ba0df711c60fa4.r4.cf1.rackcdn.com" } </code></pre> <p>project.rb file:</p> <pre><code>class Project &lt; ActiveRecord::Base attr_accessible :project_image has_attached_file :project_image, :styles =&gt; {:medium =&gt; "260x180#"} end </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload