How can I change Ruby to version 1.9.3 (again) with RVM?
You are not in the login shell. To enter the login shell try this command:
/bin/bash --login
After that you will be able to use RVM to select Ruby.
Also, there is permanent way, that you won't have to write this line everytime you open your terminal.
Try this:
Edit menu -> Profile Preferences
A dialog will appear, now select Run command in login shell
.
After that, whenever you open your terminal, you will enter into the login shell, and you will be able to use RVM.
There is another way, you can write /bin/bash --login
in your .bash_profile
which will load every time when you reboot.
How do I change my Ruby version using RVM?
Fixed it. I needed to add:
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # This loads RVM
to .zshrc
Installation of ruby-1.9.3-p392 using rvm
Solution 1
Set rvm to default by using --default
flag
rvm use ruby-1.9.3-p392 --default
NOTE: You might need to close and open the terminal.
Type rvm
for usage details
== Flags
--default :: with 'rvm use X', sets the default ruby for new shells to X.
Solution 2
Create .ruby-version
file in your project with the following content
.ruby-version
1.9.3-p392
This will change the ruby version to use 1.9.3-p392
automatically whenever you enter in project directory
How to upgrade Ruby patch level for 1.9.3 in RVM?
Apparently I already had ruby 1.9.3-p194 installed, so I had both that and 1.9.3-p0. That's why the upgrade command was confusing. It won't upgrade 1.9.3-p0 if a newer version is already there...
Installed Ruby 1.9.3 with RVM but command line doesn't show ruby -v
You have broken version of RVM. Ubuntu does something to RVM that produces lots of errors, the only safe way of fixing for now is to:
sudo apt-get --purge remove ruby-rvm
sudo rm -rf /usr/share/ruby-rvm /etc/rvmrc /etc/profile.d/rvm.sh
open new terminal and validate environment is clean from old RVM settings (should be no output):
env | grep rvm
if there was output, try to open new terminal, if it does not help then restart your computer.
install RVM:
\curl -L https://get.rvm.io |
bash -s stable --ruby --autolibs=enable --auto-dotfiles
If you find you need some hand-holding, take a look at Installing Ruby on Ubuntu 12.04, which gives a bit more explanation.
Ruby version 1.9.3 vs 2.0.0
Take a look at: https://rvm.io/ Thanks to this tool you have ability to awesome things with ruby versions. To have multiple versions of RoR you can use: http://rvm.io/gemsets
Sure, RoR 4.x is fully compatible with Ruby 1.9.3
How do I upgrade a rails 4.1 app from ruby 1.9.3 to ruby 2.1.5 without using rvm
You're on Windows? Check out Ruby installer here: http://rubyinstaller.org/. Should be able to update Ruby that way.
Your Ruby version is 1.9.3, but your Gemfile specified 2.1.0
The problem is your PATH
environment variable, it has to match GEM_PATH
and in your case it does not. To fix it run:
rvm get stable --auto-dotfiles
This will update your shell initialization files and make sure rvm is properly loaded. Then open a new terminal (close the application and open it again), and run:
rvm use 2.1.0
On both steps read all the messages printed to you. They are important and contain information about how to fix your problems. RVM detects problems and tries to fix them or warns you about them if they can not or should not be fixed automatically.
Related Topics
What Orm to Use in One Process Multiple Db Connections Sinatra Application
Accessing the Child Instance in a Rabl Template
Cron Is Running in Home Directory Instead of File Directory
Why Is the << Operation on an Array in Ruby Not Atomic
Garbage Collector in Ruby 2.2 Provokes Unexpected Cow
Error When Installing Libv8 3.11.8.3
Arbitrary Precision Arithmetic with Ruby
How to Mock an Instance Method of an Already Mocked Object
Ruby: Mass Initializing Instance Variables
What Is the Equivalent to Rspec's 'It "Should …", Focus: True Do' in Minitest/Spec
How to Call a Method That Is a Hash Value
How to Simplify or Clean Up This Anagram Method
What Is the Advantage of Creating an Enumerable Object Using To_Enum in Ruby
Ruby Minitest Assert_Output Syntax