Bundler installing gems in wrong location

前端 未结 4 764
迷失自我
迷失自我 2021-01-11 20:44

This is kind of bizarre. Any time I do a bundle install, Bundler installs all my gems to the path #{RAILS_ROOT}/json_pure/ruby/1.8/gems. I copied the Gemfile directly from a

相关标签:
4条回答
  • 2021-01-11 20:57

    Had the same issue after I upgraded Xcode

    I had to run: sudo xcode-select --switch /Library/Developer/CommandLineTools/
    then: sudo bundle install --system

    After that everything was fine.

    0 讨论(0)
  • 2021-01-11 20:58

    Hmm.. just guessing that somehow when you originally installed bundler to. Try a reinstall with this :

    You can specify this setting when installing via bundle install /path/to/bundle. Bundler will remember where you installed the dependencies to on a particular machine for future installs, loads, setups, etc.

    Also this is Carl Huda's recommendations for troubleshooting :

    rm -rf ~/.bundle/ ~/.gem/ .bundle/ Gemfile.lock
    bundle install
    
    0 讨论(0)
  • 2021-01-11 21:07

    you've probably got BUNDLE_PATH: set in .bundle/config . Change or remove that line.

    0 讨论(0)
  • 2021-01-11 21:08

    If you accidentally type bundle install SOME_GEM it seems to permanently set your gem directory to SOME_GEM.

    Looks like you can get back to normal with bundle install --system

    command-line-ui-fail

    Figured out from: http://www.theirishpenguin.com/2011/03/05/bundler-installing-gems-into-the-wrong-directory-mea-culpa/

    0 讨论(0)
提交回复
热议问题