-
-
Notifications
You must be signed in to change notification settings - Fork 352
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Doesn't work after upgrading to 0.1.2 #83
Comments
Damm. Try changing this: gem "fog", "~>1.20", require: "fog/aws/storage"
gem "asset_sync" to: gem "fog-aws"
gem "asset_sync" EDIT: If it works i will send a PR to |
yes, it's working fine after this change |
Awesome. I will send a PR. |
@morgoth Take a look at my PR: AssetSync/asset_sync#299 |
I'm running into an issue as well that just started happening today:
I assume it's related. This is using the Route53 Chef Cookbook found here: https://supermarket.chef.io/cookbooks/route53 |
Same here as we're experiencing the same in OpsWorks as update to fog-aws 0.1.2. |
@asanger Where is the code related to that plugin? |
@plribeiro3000 maybe we should add a file back to fog-aws in the expected location (which just requires the new location). That way we won't have to chase down all the unusual usage elsewhere. What do you think? |
Yeah. It makes sense @geemus. Im just not sure which file. Em qua, 8 de abr de 2015 12:28, Wesley Beary notifications@github.com
|
Got it. I'd guess |
@geemus On The issue seems to be that both I believe that as a short workaround we can add the @geemus @tokengeek Toughs? Perhaps i'm wrong. I will take a look at the route53 cookbook and see if it can be easily fixed. |
Sounds reasonable, worth a try anyway. |
I'm experiencing the same issue using the Route53 recipe with OpsWorks - it's happening since we upgraded to Amazon Linux 2015.03. Updating default['route53']['fog_version'] = '1.27' to '1.29' does not help. Error specifics from OpsWorks logs: NameErroruninitialized constant Fog::AWS::CredentialFetcher Cookbook Trace:/var/lib/aws/opsworks/cache.stage2/cookbooks/route53/providers/record.rb:82:in |
@tomalessi I believe the issue is not in Any version prior to Could you try to update your version of |
I can confirm that I am getting the same error as @tomalessi on Amazon Linux 2015.03. Rolling back to Amazon Linux 2014.09 allows me to use the gem without error. |
@asanger Perhaps you can provide us more information about those machines like diference between both. As i could find on the blog post there is no much that could be the culprit. This would help us track down further issues and perhaps even this one. |
As a PR for Comment back here or reopen if you think this issue still exists. Thanks! |
@plribeiro3000 I'm getting the same error with CarrierWave. /Users/karl/.rvm/gems/ruby-2.2.1/gems/fog-aws-0.1.2/lib/fog/aws/storage.rb:3:in `<module:Storage>': uninitialized constant Fog::Service (NameError) I fixed it by downgrading fog-aws gem 'fog-aws', '<= 0.1.1', require: false
gem 'fog', require: "fog/aws/storage" |
@threadhead Take a look at carrierwaveuploader/carrierwave#1620 and carrierwaveuploader/carrierwave#1625. They should fix that issue. As for now, if you update your carrrierwave dependency to the latest master and change the initializer block it should work without this patch you just made. Put in gem 'fog-aws'
# No need for fog if you are using only `fog-aws` In the initializer: CarrierWave.configure do |config|
config.fog_provider = 'fog-aws'
# your other configuration keys
end |
@plribeiro3000 I'm getting the |
@benholtz Yeah. It would be awesome if we can get more information to help debug.
Provide as much information as you can so we can do a better investigation. Thanks in advance for your time doing it! |
I'm getting the same error when using the bosh-cli (https://github.com/cloudfoundry/bosh/tree/master/bosh_cli):
And also in one of my own ruby scripts:
So, I try fixing it by adding `require 'fog/aws' to it, but then I get the uninitialized constant Fog::Service error:
I've been working around this issue so far by adding |
@JamesClonk could you try bumping the fog version? That one is a couple old and appears at least at times to be referring to files that no longer exist. Thanks! |
Did anybody ever bottom out on this? I ran into the same thing with Opsworks and the route53 chef recipe. I'm using Ubuntu 14.04. The very strange thing is that it works on a small instance, but fails on a medium. That makes absolutely no sense at all to me, because as far as I can tell the source AMI (I'm using the stock image) is the same either way. I'll be glad to document anything needed to help sort this out. I'm using route53 0.4.0, and I also tried a fog-aws based fork from https://github.com/josacar/route53. The interesting thing, which hopefully might be a clue, is that I got a different error message from josacar/s fork. It's returning uninitialized constant Fog::Service instead of uninitialized constant Fog::AWS::CredentialFetcher Message from josacar branchError executing action NameErroruninitialized constant Fog::Service Cookbook Trace:/var/lib/aws/opsworks/cache.stage2/cookbooks/route53/providers/record.rb:82:in |
@MikeStankavich are you on latest versions of fog and fog-aws? I think there is some historical conflict due to changes that if one got bumped without the other getting bumped it could end up in a situation similar to this. |
Sorry to say that didn't help. I was able to change the required version on the route53 recipe from fog-aws-0.1.1 to fog-aws-0.1.2, but the result is the same. Here's the log output showing the gem versions and the error. [2015-05-01T16:45:17+00:00] INFO: Processing chef_gem[fog-aws] action install (route53::default line 22) (snip) [2015-05-01T16:45:28+00:00] INFO: Processing chef_gem[fog-aws] action install (route53::default line 22) Error executing action NameError uninitialized constant Fog::Service Cookbook Trace: /var/lib/aws/opsworks/cache.stage2/cookbooks/route53/providers/record.rb:82:in Resource Declaration: In /var/lib/aws/opsworks/cache.stage2/cookbooks/qk-search/recipes/configure.rb 29: route53_record "create a record" do |
Howdy all. I was getting the same error To clean mine up i had to 'gem clean' now it's working. |
@kerr23 Awesome! @morgoth @asanger @nobeh @tomalessi @threadhead @benholtz @JamesClonk @MikeStankavich Could you guys try @kerr23 solution?
Thanks! |
Oh man, I didn't even consider that. I could see how it might complicate things though. @kerr23 thanks for the pro-tip! |
I spent a few happy hours attacking this issue today. gem clean did not help me, but what finally did work was going back to the main line route53 recipe https://github.com/hw-cookbooks/route53 and overriding the version attribute to force it to use fog 1.29.0 instead of fog 1.27.0. |
@MikeStankavich sorry to hear it caused so much trouble, but thanks for taking the time to share your findings. I'm hoping to make some more changes to improve the situation moving forward, but I think part of this has to do with the way in which the releases happen (so maybe not possible to go back and change it particularly). |
I have the same issue on ci.solanolabs.com, but everything works in my dev and prod environment, very strange. fog (1.30.0) Hack that helps me: change
to
|
You should be using: gem `fog-aws` # without the custom require.
gem `asset_assync` The issue here is that this custom require was an old workaround to decrease the amount of stuff loaded from fog. Since we are heading to a gem based architecture now, there is no reason to keep doing that. Bundler will do that now. |
I had this exact same issue. Using OpsWorks with the latest 03.2015 Amazon Linux AMI. I have my custom cookbook that is calling route53 0.4.0. I tried the fixes listed above what finally got me working was forcing the version of fog to be 1.33.0 (the current latest). I did this by putting in the following line in my custom cookbook's attributes/default.rb file: default['route53']['fog_version'] = '1.33.0' Cheers! |
wound up fixing this in April by moving to the Ruby AWS SDK for route53 management. |
Try add in OpsWorks "Custom JSON": |
I'm getting error:
I'm using https://github.com/rumblelabs/asset_sync gem - not sure if this issue should be addressed there or here.
The text was updated successfully, but these errors were encountered: