I’m a relatively new linux and rails dev and I’m attempting the following setup:
Debian 6 / Rails 3.1.3 / Ruby 1.9.3
FYI:
- My system is currently configured with Ruby 1.8.7…which is still installed and running
- I have rails websites up and running on a Linode vhost apache2 setup
Following instructions here > https://rvm.io/rvm/install/ I did the following:
- List item
- I installed RVM
- I reloaded my shell environment (btw I think Debian is $ source /etc/profile)
- I installed Ruby 1.9.3
- Run RVM use 1.9.3 –default
- Added…echo ‘[[ -s “$HOME/.rvm/scripts/rvm” ]] && . “$HOME/.rvm/scripts/rvm” # Load RVM function’ >> ~/.bashrc…to my bash script (I also tried .profile)
- Installed rails, gems etc
All seems well. When I run $ Ruby -v and it reads correctly. When I run gem list, all is good there too. When I run RVM list, it shows my versions and lists 1.9.3 as my default.
Issues:
- List item
- When I log out and log back in…if I run $ Ruby -v it shows version 1.8.7, not 1.9.3. So as far as my terminal goes, it’s not automatically using my default version.
- My rails app still uses the old gem path.
Questions:
- What am I missing here? Every tutorial I look at never goes past these steps. Am I missing something basic?
- How do i make my rails app use the ruby version controlled by RVM
- How do I make Debian recognize my bash function automatically?
- Can anybody give me or point me to a more in depth explanation on how this all fits together?
As you are using Debian my guess is you use gnome-terminal, it is known to not have enabled login shell by default: https://rvm.io/integration/gnome-terminal/
More details on what shell login is:
the document describes current state of shell login, this was not always like this and it was confused and misused / misunderstood for long time (and still is in few tools and by few developers)