fnichol / chef-openoffice

Chef cookbook to install the OpenOffice productivity suite.
http://fnichol.github.com/chef-openoffice
2 stars 5 forks source link

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

Open htekgulds opened 9 years ago

htekgulds commented 9 years ago

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 commented 9 years ago

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 commented 9 years ago

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

CloCkWeRX commented 8 years ago

d1227e584fe15cd41661c2b4aa9f008972e95c25 fixed this.