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

ArgumentError: comparison of String with Gem::Version failed #6

Open
htekgulds opened this issue Apr 27, 2015 · 3 comments
Open

ArgumentError: comparison of String with Gem::Version failed #6

htekgulds opened this issue Apr 27, 2015 · 3 comments

Comments

@htekgulds
Copy link

I used this cookbook in my own cookbook like this:

in metadata.rb

depends 'apt', '~> 2.7.0'
depends 'openoffice', '~> 0.2.2'

and in recipes/default.rb

include_recipe 'apt::default'
include_recipe 'setup-exo::packages'
include_recipe 'openoffice::headless'
include_recipe 'openoffice::apps'
include_recipe 'setup-exo::user'

And when i knife bootstrap (or knife ssh) it to a node I get the following error and compile fails:

192.168.33.10 ================================================================================
192.168.33.10 Recipe Compile Error in /var/chef/cache/cookbooks/openoffice/attributes/apps.rb
192.168.33.10 ================================================================================
192.168.33.10
192.168.33.10
192.168.33.10 ArgumentError
192.168.33.10 -------------
192.168.33.10 comparison of String with Gem::Version failed
192.168.33.10
192.168.33.10
192.168.33.10 Cookbook Trace:
192.168.33.10 ---------------
192.168.33.10   /var/chef/cache/cookbooks/openoffice/attributes/apps.rb:22:in `<='
192.168.33.10   /var/chef/cache/cookbooks/openoffice/attributes/apps.rb:22:in `from_file'
192.168.33.10
192.168.33.10
192.168.33.10 Relevant File Content:
192.168.33.10 ----------------------
192.168.33.10 /var/chef/cache/cookbooks/openoffice/attributes/apps.rb:
192.168.33.10
192.168.33.10  15:  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
192.168.33.10  16:  # See the License for the specific language governing permissions and
192.168.33.10  17:  # limitations under the License.
192.168.33.10  18:  #
192.168.33.10  19:
192.168.33.10  20:  case platform
192.168.33.10  21:  when "ubuntu"
192.168.33.10  22>>   if node['platform_version'] <= Gem::Version.new("10.04")
192.168.33.10  23:      node.set['openoffice']['apps_pkgs'] =
192.168.33.10  24:        %w{openoffice.org-writer openoffice.org-calc openoffice.org-impress}
192.168.33.10  25:    else
192.168.33.10  26:      node.set['openoffice']['apps_pkgs'] =
192.168.33.10  27:        %w{libreoffice-writer libreoffice-calc libreoffice-impress}
192.168.33.10  28:    end
192.168.33.10  29:  else
192.168.33.10  30:    node.set['openoffice']['apps_pkgs'] = []
192.168.33.10  31:  end
192.168.33.10
192.168.33.10
192.168.33.10
192.168.33.10 [2015-04-27T10:55:41+00:00] ERROR: Running exception handlers
192.168.33.10 [2015-04-27T10:55:41+00:00] ERROR: Exception handlers complete
192.168.33.10 [2015-04-27T10:55:41+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
192.168.33.10 Chef Client failed. 0 resources updated
192.168.33.10 [2015-04-27T10:55:41+00:00] ERROR: comparison of String with Gem::Version failed
192.168.33.10 [2015-04-27T10:55:41+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
@JayVem
Copy link

JayVem commented May 10, 2015

looks like one of the forks addressed it - https://github.com/rgauss/chef-openoffice
This cookbook still has issues - it needs to add repos to apt.

@JayVem
Copy link

JayVem commented May 10, 2015

actually, ignore the previous link, try this https://github.com/dhartford/chef-openoffice
This one seems to be the latest.

@CloCkWeRX
Copy link

d1227e5 fixed this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants