Jenny Chen
Jenny Chen

Reputation: 317

Rails - Bundle: command not found

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...

Upvotes: 30

Views: 43360

Answers (2)

Gupta
Gupta

Reputation: 10358

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 !!!

Upvotes: 83

K M Rakibul Islam
K M Rakibul Islam

Reputation: 34338

Open a new terminal window and run:

gem install bundler

Then, try again.

See the documentation.

Upvotes: 1

Related Questions