Skip to content
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

fog conflict errors #130

Closed
agentgonzo opened this issue Apr 17, 2012 · 7 comments
Closed

fog conflict errors #130

agentgonzo opened this issue Apr 17, 2012 · 7 comments
Labels

Comments

@agentgonzo
Copy link

I’m trying (and failing!) to set up ironfan

I’m getting to the situadion where I’ve installed it, but when I do a ‘knife cluster list’ I get the following error:
ERROR: Gem::LoadError: Unable to activate ironfan-3.1.5, because fog-0.8.2 conflicts with fog (~> 1.2.0)

I have fog 1.2.0 and 0.8.2 installed. I tried the obvious thing of uninstalling 0.8.2 but then get the following error that it can’t find fog 0.8.2:
/usr/local/lib/ruby/gems/1.9.1/gems/ironfan-3.1.5/lib/ironfan.rb:34:in cluster_path': undefined methodmap' for "/home/steve/poc/chef/chef-repo/cookbooks":String (NoMethodError)

Ditto if I install only 0.8.2 I get the original message:
ERROR: Gem::LoadError: Unable to activate ironfan-3.1.5, because fog-0.8.2 conflicts with fog (~> 1.2.0)

I’m running ruby 1.9.3p125 and gem 1.8.11 on Centos. Any help would be appreciated. fog 0.8.2 is required by knife-ec2 and I need to run both.

@temujin9
Copy link
Contributor

It looks like you've passed a string to cookbook_path in your knife.rb. It expects an array.

I'm not sure why it would complain about the old fog with the new one available. I can't promise an immediate solution; in the interim, gemsets might be a way to work around the underlying problem.

@mrflip
Copy link
Member

mrflip commented Apr 18, 2012

  • I think when you uninstalled 0.8.2 things worked and you hit a different problem: the cluster path should be an array not a string. Can you change your cluster_path to ["/home/steve/poc/chef/chef-repo/cookbooks"] and try again?
  • I don't have a good recollection of whether there were changes necessitated when we moved from fog 0.87 to fog 1.x; this was done in @276bc54c1 Nov 22 2011. That's a while ago. Would you mind doing a local git checkout of knife-ec2, changing https://github.com/opscode/knife-ec2/blob/master/knife-ec2.gemspec to be '>= 0.8.2' (or '~> 1.2.0') and see if that works for you? (I believe the steps are: check out the repo, do a gem build knife-ec2.gemspec then gem install knife-ec2 )

@agentgonzo
Copy link
Author

Yep. That did it. Thanks guys. Normal knife commands seemed to work before, so maybe they are more tolerant to String/Map entries in knife.rb rather than ironfan. Still a very beginner at Ruby. :-(

@agentgonzo
Copy link
Author

Again, I'm new to ruby so this is a very cheap hack, but I've found that the following patch to knife-ec2-0.5.10.gemspec fixed the version issue in ironfan (quite why, I don't know):

     s.specification_version = 3

     if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
-      s.add_runtime_dependency(%q<fog>, ["~> 0.8.2"])
+      s.add_runtime_dependency(%q<fog>, ["~> 1.2.0"])
     else
       s.add_dependency(%q<fog>, ["~> 0.8.2"])
     end

@temujin9
Copy link
Contributor

The ~> construct in a Gemspec says "pin me to a close version". So ~> 0.8.2 will work for 0.8.2 through 0.8.42 (or whatever), but not 0.9.0 or above. Using just a > 0.8.2 will also accomplish the same task, without forcing an upgrade if it's not needed.

@temujin9
Copy link
Contributor

@agentgonzo - you're right, that does differ from Chef semantics. Fixed it to accept both.

@mrflip
Copy link
Member

mrflip commented Apr 18, 2012

(use ">= 0.8.2" not "> 0.8.2")

On Wed, Apr 18, 2012 at 11:13 AM, Nathaniel Eliot <
reply@reply.github.com

wrote:

@agentgonzo - you're right, that does differ from Chef semantics. Fixed it
to accept both.


Reply to this email directly or view it on GitHub:
#130 (comment)

infochimps.com - discover data

AsherBond pushed a commit to AsherBond/ironfan that referenced this issue Jun 8, 2012
* 'master' of github.com:infochimps-labs/ironfan:
  Removing completed TODO items related to Cluster Chef -> Ironfan rename
  Removing completed TODO item
  From conversation with Flip: the remainder of infochimps-labs#81 should be a TODO item, not an issue
  Make ironfan work with string (in addition to array) for cluster_path, to conform to chef semantics (fixes infochimps-labs#130)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants