0

I haven't upgrade my gems for a long time, just today, I decided to run a upgrade. I probably made a mistake at first running bundle install update, which didn't do anything. Then I ran bundle update, and it created a whole new folder called update in my rails directory containing all the gems, and it seems like my rails project is no longer linked to my rvm gem directory because if I remove the update folder it fuzzes about not being able to find gems. I'm just wondering if this is the new behavior to rails or it's because I did something wrong. Thanks!

Edit: The output of bundle config is: Settings are listed in order of priority. The top value will be used.

path Set for your local app (/Users/X/dev/tasker/.bundle/config): "update"

disable_shared_gems Set for your local app (/Users/X/dev/tasker/.bundle/config): "1"

This seems to be the problem. So how should I revert it to its state before by linking to the rvm gem directory? And is the problem caused by my 'bundle install update' command? Thanks!

Edit again: Thanks for the help guys. After finding out the root issue of my problem, I found this solution: bundle install --system at How can I fix an accidental 'sudo bundle install dir_name'?. Now the problem is solved. Thanks!

Community
  • 1
  • 1
gtr32x
  • 2,033
  • 4
  • 20
  • 32

1 Answers1

0

I made same mistake.

Check command line options for bundle. bundle install accepts directory. and if you type bundle install update, it install the bundle onto the directory.

If you did, bundler create .bundle/config file and store the given path in the file.

I think, just removing .bundle directory and run "bundle" will bundle the needed files, will use the gems in RVM (if RVM configured correctly).

shigeya
  • 4,862
  • 3
  • 32
  • 33