Mess and gems and Rails

I know, the title is quite confusing, as much as I am.

The thing is : there must be something that slips aways from my
understanding, because every now and again I have to reinstall all the
gems, even though I already have them installed.

It happens sometimes that I'm executing a "rails console" and a "rails
server", and on a third terminal I'm doing various stuff (navigation,
tests etc), and from a moment to another I discover that all the gems
are gone, vanished.
In my "sudo libraries" they're still there, but I'm not able to find any
with a simple "gem list", even though I was actually executing them 5
seconds before!

Well, it doesn't happen every now and again maybe, but still quite
often.

What actually happens behind the scenes?

Cheers,
Leo

I know, the title is quite confusing, as much as I am.

The thing is : there must be something that slips aways from my
understanding, because every now and again I have to reinstall all the
gems, even though I already have them installed.

It happens sometimes that I'm executing a "rails console" and a "rails
server", and on a third terminal I'm doing various stuff (navigation,
tests etc), and from a moment to another I discover that all the gems
are gone, vanished.
In my "sudo libraries" they're still there, but I'm not able to find any
with a simple "gem list", even though I was actually executing them 5
seconds before!

Well, it doesn't happen every now and again maybe, but still quite
often.

What actually happens behind the scenes?

If you're using RVM, it's a matter of setting an .rvmrc file with the correct ruby to use, or calling rvm use 1.9.2 (or whatever) before you start using Rails. Each version of Ruby that you have installed through RVM will have its own set of gems, and switching Rubies can be as simple as opening a new Terminal window that lacks the current context. When you switch gem sets like this, then you will see the missing bundle error as you have.

Walter

I found it easiest to call rvm, with my "usual" Ruby, in
.bash_profile, *plus* put a .rvmrc as part of my standard Rails
project setup.

(In fact, I'm working on a script to start a new project with
everything the way I want it, including a User class with Devise stuff
on it. This helps me make SURE I have a .rvmrc there!)

-Dave