boxen / our-boxen

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

gem files not found after bundle install - el capitan #792

Closed brettswift closed 8 years ago

brettswift commented 8 years ago

I just updated my boxen from this upstream module and with or without my changes I see an error when I run boxen.

Below is a boxen run, and then a bundle exec gem list.. showing the gem is there.

BrettsMacBookPro 福 /opt/boxen/repo ➤ 9fa4911|upstream_master⚡
4509 ± : ./script/boxen                                                                                                                                                                                                                                           [4d14h1m] ✖ ✹
--> Preparing to auto-update...
--> Skipping auto-update, because your boxen checkout isn't on master

Working on something special, over here on a branch? That's cool! Once
you're done, you'll probably want to submit a pull request and get back
onto master so that you can get some sweet, sweet updates again, though.

For more info on how the simple git-based updates work, have a gander at
https://github.com/boxen/our-boxen/blob/master/docs/updates.md

Could not find rake-10.3.2 in any of the sources
Run `bundle install` to install missing gems.

BrettsMacBookPro 福 /opt/boxen/repo ➤ 9fa4911|upstream_master⚡
4510 ± : be gem list                   

*** LOCAL GEMS ***

addressable (2.3.8)
ansi (1.5.0)
boxen (2.8.0)
bundler (1.6.3)
CFPropertyList (2.2.8)
deep_merge (1.0.1)
diff-lcs (1.2.5)
facter (2.4.4 universal-darwin)
faraday (0.9.1)
hiera (1.3.4)
highline (1.6.21)
json (1.8.3)
json_pure (1.8.2)
librarian (0.1.2)
librarian-puppet (1.0.9)
metaclass (0.0.4)
mocha (1.1.0)
multipart-post (2.0.0)
octokit (2.7.2)
open4 (1.3.4)
puppet (3.7.1)
puppet-lint (0.3.2)
puppetlabs_spec_helper (0.4.1)
rake (10.3.2)
rspec (3.2.0)
rspec-core (3.2.3)
rspec-expectations (3.2.1)
rspec-mocks (3.2.1)
rspec-puppet (1.0.1)
rspec-support (3.2.2)
sawyer (0.5.5)
thor (0.19.1)

My ruby environment might be a bit mangled I'm guessing, but using rbenv local to try a few different rubies, and rbenv system to try my system ruby, nothing seems to get through this.

What am I missing here.. how could boxen report a missing gem, yet a bundle exec gem list show the exact version it wants... ???

kulte commented 8 years ago

@brettswift I just was able to successfully run boxen by rbenv use-ing, in my case, 2.0.0. I'm unsure if it was the fact that it was 2.0.0 or the fact that perhaps it was the Ruby version I initially used when I setup Boxen, or something else entirely, but was having the exact same issue as you were beforehand.

jdowning commented 8 years ago

I ran into the same issue and, like @kulte points out, it seems to have to do with the fact that El Capitan system ruby is now 2.2.3 and boxen works best (only?) with 2.0.0.

$ mkdir ruby-test                                         
$ cd ruby-test                                            
$ rbenv local system                            
$ ruby -v                                       
ruby 2.2.3p173 (2015-08-18 revision 51636) [x86_64-darwin14]

Here's how I fixed it:

cd /opt/boxen/repo
rbenv install 2.0.0-p647
rbenv local 2.0.0-p647
gem install bundler
rbenv rehash
script/boxen
brettswift commented 8 years ago

sorry for the delayed response, this worked on my home macbook, and just got it running on my work one. (I delay changes quite a bit here).

This fix might actually help me with a vagrant issue I'm having - specifically with beaker and rbenv and vagrant... ruby paths are a pain in the butt!

A late Thanks