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

Issues with Ruby 2.0 #48

Closed
tknerr opened this issue Mar 12, 2014 · 2 comments
Closed

Issues with Ruby 2.0 #48

tknerr opened this issue Mar 12, 2014 · 2 comments

Comments

@tknerr
Copy link
Owner

tknerr commented Mar 12, 2014

Current issues when trying to get tknerr/sample-application-cookbook up and running using bill's kitchen master with omnibus chef and ruby 2.0.

Ruby 2.0 issues:

  1. with ruby 2.0 yajl fails (see Add support for Ruby 2.0 brianmario/yajl-ruby#116
    • check: updating to bundler > 1.4 might help?
    • re-installing the yajl gem via gem install yajl-ruby --platform=ruby helps
  2. similar to the above we now get this ruby 2.0 win32-api error ('require': incompatible library version)
    • re-installing the win32-api gem via gem install win32-api --platform=ruby helps
    • this is one of the reasons why omnibus ships with its own embedded ruby to prevent such issues...
  3. with ruby 2.0 64-bit compilation of nokogiri fails, see Support Ruby x64 on Windows sparklemotion/nokogiri#864
    • seems to be fixed in master, but not released yet
    • immediate solution: use 32-bit ruby

=> for 1. & 2.: can we somehow force bundler to install with the --platform=ruby flag? AFAIK this is not possible via configuration, but can we maybe fake our platform?

Issues due to omnibus chef:

  1. with omnibus our sh "knife ..." shellouts in the Rakefile don't work anymore (can not find gems even thoough they were bundle installed). More general: knife -v (uses omnibus chef) works but bundle exec knife -v (uses gem installed chef) does not.
    • the problem is that two rubies' bindirs are on the path and if it finds the omnibus knife command it will use the omnibus ruby, but the bundle installed gems are in the system ruby!
    • a) use the knife ruby API rather than shelling out
    • b) don't use omnibus - always use chef as a gem

=> using binstubs would probably solve this problem, but it did not work because bundle install --binstubs did not create .bat files?

Specific issues with the Gemfile:

  1. faraday 0.9 breaks ridley / berkshelf: Faraday 0.9.0 breaks ridley berkshelf/ridley#239
    • solution: lock to 0.8.9 in Gemfile
@tknerr
Copy link
Owner Author

tknerr commented Mar 13, 2014

Has been fixed by downgrading back to Ruby 1.9.3 within #49

Renamed the title and keeping it open so we are reminded once we try upgrading to Ruby 2.0 again

@tknerr
Copy link
Owner Author

tknerr commented Jul 17, 2014

No longer an issue, all tools (Vagrant, ChefDK) now use Ruby 2.x, and all acceptance tests are passing (since a while already).

The ChefDK approach using appbundler solved some of the issues mentioned above. The per-project Gemfiles with bundler are working too.

@tknerr tknerr closed this as completed Jul 17, 2014
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

1 participant