jedi4ever / veewee

Easing the building of vagrant boxes
MIT License
4.29k stars 779 forks source link

Build fails on chef.sh for Ubuntu 14.04 with rake conflict #1033

Open knservis opened 9 years ago

knservis commented 9 years ago

The error is:

Executing command: echo 'vagrant'|sudo -S sh './chef.sh'
ERROR:  Error installing chef:
    "rake" from rake conflicts with /opt/ruby/bin/rake

It looks like there is a dialog that asks the user whether to overwrite rake. A quick fix with unknown repercussions would be: yes | $GEM install chef --no-ri --no-rdoc in the chef.sh

The real solution probably would be to somehow use rvm for ruby and gemset management.

mpapis commented 9 years ago

please check older tickets, I thought I have seen this one already

knservis commented 9 years ago

Hey, thanks for the quick reply. I did a search but could not find it. Sorry if it's a dupe.

mpapis commented 9 years ago

please try harder, it has to be somewhere

knservis commented 9 years ago

As I said, I am sorry if this is a duplicate. I have actually solved my problem and I am reporting this for your benefit. Feel free to delete it if it is not helpful. Cheers

kha0s178 commented 9 years ago

Problem still exist.

mpapis commented 9 years ago

@kha0s178 / @knservis can one of you open a pull request with the proposed fix?

kha0s178 commented 9 years ago

Unfortunatly i don't used ruby. But if we starting chef via gem i think it mean we have already ruby and rake as part of it, or no? Any way - why we trying to install chef via gem instead of adding "apt-get -y install chef-zero" to apt.sh? apt will solve all dependency, install ruby and all that chef need.

ps: i tried @knservis solution - "yes | $GEM install chef --no-ri --no-rdoc" It's don't work.

Im so sory for bad english.

ksmyth commented 9 years ago

I ran into this issue and worked around it for Ubuntu 14.04.2: https://github.com/jedi4ever/veewee/pull/1063/files#diff-232f92b83a54eee82fb954e61733e565R4

I am not sure if this approach would fix it for 14.04.