Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
475 views
in Technique[技术] by (71.8m points)

ruby on rails - bundler/setup (LoadError)

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...