I am trying to create a brand new Rails application and it is asking me to run 'bundle install'. However, whenever I do this I get a command not found error.
My path has both ruby and the gem folder on it. Is bundle a executable file? Where is it commonly stored?
I think it could be a path issue, with multiple Ruby versions installed.
Path: /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/usr/X11/bin
gem env:
RubyGems Environment: RUBYGEMS VERSION: 1.8.10 RUBY VERSION: 1.8.7 (2010-01-10 patchlevel 249) [universal-darwin10.0] INSTALLATION DIRECTORY: /Library/Ruby/Gems/1.8 RUBY EXECUTABLE: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby EXECUTABLE DIRECTORY: /usr/bin RUBYGEMS PLATFORMS: - ruby - universal-darwin-10 GEM PATHS: - /Library/Ruby/Gems/1.8 - /Users/john/.gem/ruby/1.8 - /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8 GEM CONFIGURATION: - :update_sources => true - :verbose => true - :benchmark => false - :backtrace => false - :bulk_threshold => 1000 REMOTE SOURCES: - http://rubygems.org/
which ruby returns /usr/bin/ruby
I think the ruby executable gem is trying to run is not pointing to the right place..
I had a similar issue, and the following worked for me:
gem install bundler
echo $PATH
which gem
if the gem executable is not in your path, then add it to your ~/.bash_profile by editing the line: export PATH="$PATH:/usr/local/var/rbenv/shims/gem"
In my example above, the existing path is referenced by $PATH, and I've pasted the location returned by which gem
, separated by a colon :
I'm on a OSX 10.8.3 and gem was installed via homebrew. my path has a bunch of additions, so it looks like:
export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/share/npm/bin:~/bin:/usr/local/var/rbenv/shims/gem:$PATH"
Each path is separated by a colon, and the $PATH variable sits at the end. not sure if it matters :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With