I cloned a repository and tried to run rails s
. However, I received the following error:
/Users/me/.rbenv/versions/1.9.3-p547/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- bundler/setup (LoadError) from /Users/me/.rbenv/versions/1.9.3-p547/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require' from /Users/me/workspace/bindo/config/boot.rb:7:in `<top (required)>' from /Users/me/.rbenv/versions/1.9.3-p547/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require' from /Users/me/.rbenv/versions/1.9.3-p547/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require' from bin/rails:9:in `<main>'
My ruby version is:
ruby 1.9.3p547 (2014-05-14 revision 45962) [x86_64-darwin13.3.0]
My gem env
command run from this project directory:
RubyGems Environment: - RUBYGEMS VERSION: 1.8.23.2 - RUBY VERSION: 1.9.3 (2014-05-14 patchlevel 547) [x86_64-darwin13.3.0] - INSTALLATION DIRECTORY: /usr/lib/ruby/gems/2.0.0 - RUBY EXECUTABLE: /Users/me/.rbenv/versions/1.9.3-p547/bin/ruby - EXECUTABLE DIRECTORY: /usr/lib/ruby/gems/2.0.0/bin - RUBYGEMS PLATFORMS: - ruby - x86_64-darwin-13 - GEM PATHS: - /usr/lib/ruby/gems/2.0.0 - /Users/me/.gem/ruby/1.9.1 - /Users/me/.rbenv/versions/1.9.3-p547/lib/ruby/gems/1.9.1 - GEM CONFIGURATION: - :update_sources => true - :verbose => true - :benchmark => false - :backtrace => false - :bulk_threshold => 1000 - REMOTE SOURCES: - http://rubygems.org/
I read on Stack Overflow that this is a path error, however, I am not familiar enough to figure out what to trace or change to make this work. I'm looking but I feel I need some direction.
Think of bundler as a package management tool. So bundle install command will install all gems to the system that are listed in Gemfile as well as their dependencies. If the gem was not previously installed it will grab it from the gemcutter repo.
What is Bundler? Bundler provides a consistent environment for Ruby projects by tracking and installing the exact gems and versions that are needed. Bundler is an exit from dependency hell, and ensures that the gems you need are present in development, staging, and production.
As of Ruby 2.6. 0preview3, Bundler is part of core Ruby.
You likely have bundler
gem missing.
To get it to work run (first command may need be executed with sudo
, depending on your environment):
[sudo] gem install bundler bundle install
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