{"id":7376,"date":"2014-06-07T02:37:51","date_gmt":"2014-06-07T02:37:51","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/06\/07\/problem-about-fog-collection-of-common-programming-errors\/"},"modified":"2014-06-07T02:37:51","modified_gmt":"2014-06-07T02:37:51","slug":"problem-about-fog-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/06\/07\/problem-about-fog-collection-of-common-programming-errors\/","title":{"rendered":"problem about fog-Collection of common programming errors"},"content":{"rendered":"<ul>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/e50416e328e4ac2be879ee9d72327a77?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nuser2321289<br \/>\nruby-on-rails ruby gem fog<br \/>\nI am needing to install fog to use SDK to interface with openstack and create a plugin. So far I&#8217;m failing at the first step. I am looking for any advice on how I could debug these errors and any opinion on whether the install is okay with them still there. gem install fog Fetching: builder-3.2.2.gem (100%) Successfully installed builder-3.2.2 Fetching: excon-0.28.0.gem (100%) Successfully installed excon-0.28.0 Fetching: formatador-0.2.4.gem (100%) Successfully installed formatador-0.2.4 Fetch<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.stack.imgur.com\/Xks6u.jpg?s=32&amp;g=1\" \/><br \/>\nPaulo Fidalgo<br \/>\nruby-on-rails fog<br \/>\nI can&#8217;t figure out how to fix this error. I install libxml2 and nokogiri is also installed properly.Building native extensions. This could take a while&#8230; ERROR: Error installing fog:ERROR: Failed to build gem native extension.\/usr\/bin\/ruby extconf.rb checking for libxml\/parser.h&#8230; no &#8212;&#8211; libxml2 is missing. please visit http:\/\/nokogiri.org\/tutorials\/installing_nokogiri.html for help with installing dependencies. &#8212;&#8211; *** extconf.rb failed *** Could not create Makefile due to some reason,<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/2ffc48f8d32a6feee3772957c6cc8797?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nStephen Reid<br \/>\nruby heroku nokogiri fog<br \/>\nI&#8217;ve never had problems deploying this app but I&#8217;ve just pushed and now I&#8217;m getting this weird error, which is deep enough in the stack that it&#8217;s not even getting sent to Airbrake. I have a feeling it might be a problem at Heroku&#8217;s end, possibly relating to https:\/\/status.heroku.com\/incidents\/450? What do you think?2012-10-14T08:40:31+00:00 heroku[web.1]: State changed from starting to crashed 2012-10-14T08:40:31+00:00 heroku[web.1]: State changed from crashed to starting 2012-10-14T08:40:35+00:<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/64aa7d1e0eb006175565adb0a47a4452?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nmarcamillion<br \/>\nruby-on-rails ruby-on-rails-3 carrierwave fog<br \/>\nI am using Carrierwave &amp; Fog to push images str8 to S3.The creation action works just fine. The issue is whenever I go to update the record, say change the name attribute, and I don&#8217;t do anything to the image fields, I get an error that looks like this:Started PUT &#8220;\/vendors\/7&#8221; for 67.230.41.62 at 2012-12-09 07:00:51 +0000 2012-12-09T07:00:51+00:00 app[web.1]: app\/controllers\/vendors_controller.rb:65:in `update&#8217; 2012-12-09T07:00:51+00:00 app[web.1]: NoMethodError (undefined method `thumb_im<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/8792b5347d95c6e3d183598a5e28fc48?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nnightscent<br \/>\nruby-on-rails file-upload amazon-s3 carrierwave fog<br \/>\nI&#8217;m try to set up carrierwave_direct for some image uploading in my rails 3.2 application but seem unable to render the form by using the direct_upload_form_for tags.I&#8217;m getting the error &#8220;undefined method `direct_fog_url&#8217; for #&lt; PostmarkerImage:0x007fdbe07b39f0 &gt;&#8221; when loading the page containing the form.PostmarkerImage is the model in which I&#8217;ve mounted the uploader like so:class PostmarkerImage &lt; ActiveRecord::Baseattr_accessible :image, :image_cachebelongs_to :postmarkervalidates :ima<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/1a7480291b05a50a7416201b4e64fd26?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nuser749798<br \/>\nruby-on-rails amazon-s3 carrierwave fog recreate<br \/>\nI&#8217;m trying to recreate the images that I have uploaded using the following in my model&#8230;Post.all.each do |ym| ym.avatar.cache_stored_file! ym.avatar.retrieve_from_cache!(ym.avatar.cache_name) ym.avatar.recreate_versions! ym.save! endUnfortunately, I get the following error&#8230;.(undefined method `body&#8217; for nil:NilClass):My uploader is named AvatarUploader and is for my Post model. Any advice on how to fix this?<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/c7e0e40162322d4b6ffe36dd3c0f4802?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nyagudaev<br \/>\nruby-on-rails carrierwave fog<br \/>\nCarrierwave keeps returning the error below when i tried to save a remote url.photo = space.photos.build photo.remote_image_url = photo_url photo.save! # NoMethodError: undefined method `gsub!&#8217; for nil:NilClassAny ideas?<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/090330b177e40c4aeba3d4653c2e62da?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nuser1008933<br \/>\nurl path amazon-s3 carrierwave fog<br \/>\nI just cant figure out how to do this. I need to get the S3 path without the filename https:\/\/testphotobucket.s3.amazonaws.com\/uploads\/51237a37ff770df332000007\/and not like this https:\/\/testphotobucket.s3.amazonaws.com\/uploads\/51237a37ff770df332000007\/tiger.jpgbut i keep getting this error. undefined method gallery_photo_path&#8217; for #&lt;Gallery:0x007f94f4658778&gt; undefined methodgallery_photo_http_url&#8217; for #just how do i get the path if im using fog as the storage ?Thanks. below is my code snip<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/1900c159e4b89ccab33af7f7b111b140?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nmbajur<br \/>\nruby-on-rails ruby-on-rails-3 carrierwave fog<br \/>\nWhen i&#8217;m trying to run my application, i&#8217;m getting the following error:config\/initializers\/carrierwave.rb:4: undefined method `fog_host=&#8217; forCarrierWave::Uploader::Base:Class (NoMethodError)Here is my initializers\/carrierwave.rb file:CarrierWave.configure do |config|config.storage = :fogconfig.fog_directory = &#8216;media.domain.pl&#8217;config.fog_host = &#8216;http:\/\/s3-eu-west-1.amazonaws.com\/media.domain.pl&#8217;config.fog_credentials = {:provider =&gt; &#8216;AWS&#8217;,:aws_access_key_id =&gt; &#8216;***&#8217;,:aws_secret_access_key =<\/li>\n<\/ul>\n<p>Web site is in building<\/p>\n<p>I discovery a place to host code\u3001demo\u3001 blog and websites.<br \/>\nSite access is fast but not money<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/www.m5zn.com\/newuploads\/2014\/01\/30\/jpg\/e7da807964b1fff.jpg\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>user2321289 ruby-on-rails ruby gem fog I am needing to install fog to use SDK to interface with openstack and create a plugin. So far I&#8217;m failing at the first step. I am looking for any advice on how I could debug these errors and any opinion on whether the install is okay with them still [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-7376","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/7376","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=7376"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/7376\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=7376"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=7376"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=7376"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}