boxen / our-boxen

Copy me for your team.
https://github.com/boxen/our-boxen/
MIT License
2.58k stars 883 forks source link

Update `PATH` to include correct bundler version #804

Closed jacobbednarz closed 8 years ago

jacobbednarz commented 8 years ago

After upgrading to El Capitan bundler could not be found within $PATH which caused gem installation issues. To fix this, the $PATH has been updated to include the correct path for bundler. Along with this change, I've bumped the version of bundler used because 1.5.3 is outdated by a couple of years now.

The original patches can be found at https://github.com/boxen/our-boxen/issues/794#issuecomment-159541053

Fixes #794.

/cc @henscu @lyzadanger @fivetanley @abuxton to please test this on your machines and confirm this works as expected.

bbck commented 8 years ago

I just ran into this issue and this kind of fixed it. The gem install bundler -v 1.10.5 command failed complaining it couldn't write to /usr/bin. I needed to manually run gem install bundler -v 1.10.5 -n /usr/local/bin.

jacobbednarz commented 8 years ago

@bbck Odd :confused: . As I mentioned in #794 we were running this internally via a custom fork and never encountered this. Did you nuke Boxen and start fresh after an upgrade? The only thing that changed on that line was the version and it should have been using sudo so I'm not sure why you encountered permission issues.

bbck commented 8 years ago

I honestly have no idea how I lost the bundler executable for the system ruby, but reinstalling it on El Capitan will try to put it in /usr/bin which is now protected, which is #794.

chris.boyle@CHRIBOYL-MBP ~/Developer/my-boxen (master) $ sudo gem install bundler
Password:
ERROR:  While executing gem ... (Errno::EPERM)
    Operation not permitted - /usr/bin/bundle
henscu commented 8 years ago

This fixes #794 too, so that should be closed when this (#804) is merged.

owenthereal commented 8 years ago

Any update on this?

jacobbednarz commented 8 years ago

@jingweno after @bbck mentioned this didn't work for him I was a little unsure of whether we should merge it. If you can confirm it works for you, I'm happy to land this one.

owenthereal commented 8 years ago

@jacobbednarz Yes, it works for me. But I didn't use this script but setting my path when running boxen: PATH="/Library/Ruby/bin:$(gem which bundler | sed -e 's!lib/bundler.rb!bin!'):$PATH" boxen

jacobbednarz commented 8 years ago

No worries - That is pretty much the patch so I'm happy there 😛