Encountered a problem when I tried to run/check bundle on on Mac Bundler/bundler are in the local gem list when I did gem list --local
Gem env returns the following
RubyGems Environment: - RUBYGEMS VERSION: 2.0.14 - RUBY VERSION: 2.0.0 (2014-05-08 patchlevel 481) [universal.x86_64-darwin14] - INSTALLATION DIRECTORY: /Library/Ruby/Gems/2.0.0 - RUBY EXECUTABLE: /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby - EXECUTABLE DIRECTORY: /usr/bin - RUBYGEMS PLATFORMS: - ruby - universal-darwin-14 - GEM PATHS: - /Library/Ruby/Gems/2.0.0 - /Users/jenny0322/.gem/ruby/2.0.0 - /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/gems/2.0.0 - GEM CONFIGURATION: - :update_sources => true - :verbose => true - :backtrace => false - :bulk_threshold => 1000 - REMOTE SOURCES: - https://rubygems.org/
Echo Path returns
/Library/Frameworks/Python.framework/Versions/3.4/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/local/git/bin
which gem returns
/usr/bin/gem
How do I add path to the directory? I tried
export PATH ="/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin:$PATH"
and have no luck...
When you get the rbenv: bundle: command not found error it is most likely the case that you have installed a new Ruby version and you are trying to run a bundle command inside an existing project directory. For every new Ruby version you install, you also need to install the Bundler gem.
The bundle exec command ensures that executable programs installed by Gems don't interfere with your app's requirements. For instance, if your app needs a specific version of rake but the default version of rake differs, bundle exec ensures that you can still run the specific rake version compatible with your app.
Bundler makes sure that Ruby applications always use the exact gems and versions that you need while keeping a consistent environment and gem dependencies satisfied. This is done by ensuring that the gems you need are present in the development, staging, and production stages.
It seems that Bundler is not installed in your machine.
You have to install bundler first for that.
1: gem install bundler
2: bundle install
Hope this help you !!!
Open a new terminal window and run:
gem install bundler
Then, try again.
See the documentation.
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