Monday, June 3, 2013

Install Opscode Chef with Ruby 2.0 on FreeBSD Ports Collection

Opscode Chef version 10.x depends on JSON rubygem between 1.4.4 and 1.7.7. But, there are two points to solve:
  • Ports collection's rubygem-json146 does not support Ruby 2.0
  • The newest version of Ports collection's rubygem-json is 1.8.0
So that we must be some operations for install chef
  1. cd /usr/ports/devel/rubygem-json
  2. Install and do ports-mgmt/portdowngrade to downgrade to 1.7.7
    (or edit Makefile directly to write version 1.7.7)
  3. make install
  4. cd /usr/ports/sysutils/rubygem-chef
  5. edit Makefile
    rubygem-json>=1.4.4:${PORTSDIR}/devel/rubygem-json146 \ to rubygem-json>=1.4.4:${PORTSDIR}/devel/rubygem-json \
  6. make install
At last operation, ports collection fails because of rdoc, but Chef rubygem itself are succeeded.

No comments:

Post a Comment