I think I've got myself into a bit of a mess and I'd like some pointers in cleaning it up. I have RVM installed and Ruby 2.2.3 (that's the only version):
rvm list
rvm rubies
=* ruby-2.2.3 [ x86_64 ]
# => - current
# =* - current && default
# * - default
I've only got the basic gemsets:
rvm gemset list
gemsets for ruby-2.2.3 (found in /Users/Andrew/.rvm/gems/ruby-2.2.3)
=> (default)
global
If I look at a snipped directory structure I have:
~/.rvm/gems/ruby-2.2.3
~/.rvm/gems/ruby-2.2.3@global
If I run gem env, my paths are:
[..snip..]
- GEM PATHS:
- /Users/Andrew/.rvm/gems/ruby-2.2.3
- /Users/Andrew/.rvm/gems/ruby-2.2.3@global
[..snip..]
- SHELL PATH:
- /Users/Andrew/.rvm/gems/ruby-2.2.3/bin
- /Users/Andrew/.rvm/gems/ruby-2.2.3@global/bin
[..snip..]
To the best of my knowledge, the gems in ruby-2.2.3 are up to date but the ones in ruby-2.2.3@globabl aren't.
In IntelliJ IDEA, I have references to SDK for ruby-2.2.3 and ruby-2.2.3[Global]. In the Global gems directory it lists the gems for ruby-2.2.3[global] and I can some of these are at a different version to the gems for ruby-2.2.3.
I've researched quite a lot via google but I'm still confused on how to get the gems in ruby-2.2.3@globabl upgraded and whether I need to. I can't tell the relationship between these gems and the gemsets for which default is empty and global has around 4 gems listed.
I'm thinking I could do gem clean to get rid of older gem versions (but I've read in a number of places that's dangerous) but that wouldn't upgrade ruby-2.2.3@global. I'm also concerned it might screw up my IntelliJ Idea environment which I'm also struggling to get my head around!
What I'd like to do is this:
- Understand the relationship between the gems in the paths ruby-2.2.3, ruby-2.2.3@global
- Understand the relationship between these gems and the gemsets
default and global (if any). My understanding is that gemsets
should be created for each project with those gems defined in
Global available to all. Then I get confused between these and
Bundler! - How to upgrade the gems in path ruby-2.2.3@global
- How to cleanup and get rid of older gems safely. Particularly, without screwing up IntelliJ Idea
I haven't found an easy noob guide to all this. Perhaps the easiest thing to do is an rvm implode and start again? I'm trying to learn ruby, ruby on rails, rspec.