Bundle install tries to use cache file

前端 未结 5 1097
旧巷少年郎
旧巷少年郎 2021-02-09 22:40

When i try to do bundle install, my gem_path and gem_home point to /usr/local/rvm/gems/ which i don\'t have write access and it fails because of invalid permissions. because of

相关标签:
5条回答
  • 2021-02-09 22:50

    Try to tell to bundler which folder it must use, something like bundle install --path <myfolder> or bundle install --path gems.

    Note that I didn't test this yet, but it seems promising, please post the result for us.

    0 讨论(0)
  • 2021-02-09 22:54

    If it's feasible, I recommend installing your own copy of rvm in ~/.rvm so you aren't tied to the system one. Trying to have a hybrid system+user approach will likely lead to more headaches later on.

    Or, if you're open to alternate solutions, rbenv is a leaner & cleaner ruby manager.

    0 讨论(0)
  • 2021-02-09 22:59

    rvm reinstall all worked for me.

    Before you do that, I would try

    gem update --system
    gem pristine --all --no-extensions
    

    please note that rvm reinstall all takes a lot of time to complete...

    0 讨论(0)
  • 2021-02-09 23:03

    okay, first of all, you could solve all this issues easily by using rvm (user installation), see http://rvm.io, if that is not an option, you could try using project-specific gem paths. for example i have the following bundler config file (~/.bundle/config)

    ---
    BUNDLE_PATH: .bundle
    BUNDLE_DISABLE_SHARED_GEMS: "1"
    

    which causes bundler to install all gems in a .bundle sub directory (inside your project folder, where you run bundle install). now, if you remember to use bundle exec for your bins (e.g. cap(istrano)), you're fine.

    if you somehow f*cked up your bundler / cache, try deleting the .bundle folder (in your project folder)

    0 讨论(0)
  • 2021-02-09 23:14

    Fixed it by deleting cache file and re-running bundle install.

    rm -rf <location_of_cache>. In your case:

    rm -rf /afs/varda.io/user/b/br/bruno/test6/cache
    
    0 讨论(0)
提交回复
热议问题