Closed cjhubert closed 10 years ago
It seems like the same solution that applied to the PHP mongo driver applies here, if I run sudo apt-get install libsasl2-dev
it fixes it. Not sure how we solve this in the cookbook, though.
Because chef_gem is run in the compile phase, that dependency must also be satisfied in the compile phase. For the moment I'm using this hacky approach:
package 'libsasl2-dev' do
action :nothing
end.run_action(:install)
Interesting, with my changes I was able to kitchen converge
the ubuntu 12.04 boxes. Are you running on a different platform? What error were you getting?
To provide context to@agperson's comment:
--- a/recipes/mongo_gem.rb
+++ b/recipes/mongo_gem.rb
@@ -6,6 +6,10 @@ gcc = package 'gcc' do
end
gcc.run_action(:install)
+package 'libsasl2-dev' do
+ action :nothing
+end.run_action(:install)
+
node['mongodb']['ruby_gems'].each do |gem, version|
Right, I understand now that he means that instead of my change. I'm fine with that change instead, just not sure how to go about actually fixing this. Maybe logging a bug in mongo's jira to at least let them know about it?
@ceejh: Looks like csasl is now core to the ruby driver, so we'll probably just have to live with this. See https://github.com/mongodb/mongo-ruby-driver/pull/459
Here's the diff for RHEL also:
--- a/recipes/mongo_gem.rb
+++ b/recipes/mongo_gem.rb
@@ -6,6 +6,16 @@ gcc = package 'gcc' do
end
gcc.run_action(:install)
+if platform_family?('rhel')
+ sasldev_pkg = 'cyrus-sasl-devel'
+else
+ sasldev_pkg = 'libsasl2-dev'
+}
+
+package sasldev_pkg do
+ action :nothing
+end.run_action(:install)
+
node['mongodb']['ruby_gems'].each do |gem, version|
chef_gem gem do
version version
You want to use this in the PR, or shall I submit one? (you get the credit here for raising this - thanks!)
Feel free to submit it as a separate PR and I'll close this one, thanks for doing the research into it.
Submitted PR #355. Cheers, Peter
It seems like after an update to the mongo ruby gem, unable to run the recipe successfully on Ubuntu 12.04. Just am getting:
This change just locks it to a specific version that works, though ideally we'd want to eventually figure out why the change broke the cookbook.