Presently on OS X 10.6.8 if I run
rvm get head
rvm reload
rvm get stable
The highest Ruby is [ruby-]1.9.3-head.
Running rvm get stable does not change this. If I want to install Ruby 2.2 RVM says Version '2.2.2' is to confusing to select ruby interpreter.
Do I have to download the latest (2.2.3) manually and install? Will this not gum up RVM?
You don't say what version of RVM you're running but RVM is plenty capable of handling the problem. From the documentation:
Is rvm get stable not working? Is rvm get latest telling you You already have the latest version! , but you know you don't? Try this:
$ rvm get head
$ rvm reload
$ rvm get stable
If that does not work for you, you can always use the installer to update:
$ \curl -sSL https://get.rvm.io | bash -s stable
$ rvm reload
Reloading RVM itself won't affect any previously installed Rubies or gems; In other words it's safe.
Related
I tried to reinstall Ruby 1.8.7 using RVM after having troubles with Homebrew. I reinstalled Homebrew and RVM, and I have Ruby 1.9.3 and 2.0.0 working fine.
One of my projects uses 1.8.7 so when I used:
rvm install 1.8.7
I got:
The requested url does not exist(22):'http://production.cf.rubygems.org/rubygems/rubygems-2.0.9.tgz'
Checking fallback: ftp://production.cf.rubygems.org/rubygems/rubygems-2.0.9.tgz
Checking fallback: http://www.mirrorservice.org/sites/production.cf.rubygems.org/rubygems/rubygems-2.0.9.tgz
No fallback URL could be found, try increasing timeout with:
echo "export rvm_max_time_flag=20" >> ~/.rvmrc
There has been an error while trying to fetch rubygems.
Halting the installation.
I tried to do:
rvm get stable
rvm get head
curl -L get.rvm.io | bash -s stable
Which I found on another Stack Overflow question with a similar error, but it's obviously a bit different.
I run:
RVM 1.22.9 (stable)
Homebrew 0.9.4
Mac OSX 10.8.4
This was an issue with rubygems release process - https://github.com/wayneeseguin/rvm/issues/2212 and https://github.com/rubygems/rubygems/issues/651
For next time it happens you can specify which version of rubygems to use when installing ruby with rvm like this:
rvm install 1.8.7 --rubygems 2.0.8
I'm seeing essentially the same error with a chef deploy of rvm under ubuntu - ruby 1.8.7 refuses to complete installation (the ruby is there, but no gem, etc) due to a problem with 'rubygems-2.0.9.tgz'
Edited to add - if you run 'rvm rubygems 2.0.7' (latest that seems to be really available right now) it seems to work.
So far I only know how to do commands like
rvm 2.0.0
Fortunately Google tells me
The current stable version is 2.0.0-p247.
But shouldn't I be able to use rvm to do that step for me? I can't figure out how to just tell rvm to install the latest version of ruby, without manually specifying it.
it is enough to:
rvm get stable
rvm use ruby --install --default
it will update rvm, check for latest ruby - install it if missing - and set as default
I don't know of a way to have rvm just install the latest version automatically, but here's three simple commands using just rvm:
rvm reload
rvm list known # This will show all the available versions, including the latest
rvm install <latest_version> # Replace <latest_version> with the latest shown by the last command
rvm install ruby-head should install the last known version.
I'm trying to upgrade Ruby from 1.8.7 to the latest version and Rails from 2.3.14 to the latest version. I ran:
\curl -L https://get.rvm.io | bash -s stable --ruby --autolibs=enable --auto-dotfiles
and then it tells me to run:
source /home/USER/.rvm/scripts/rvm
in all of my open shell windows, which is just the one so I do that. If I type:
ruby -v
It tells me I have 2.0.0p195 which is okay (although I kinda wanted 1.9.2), but if I close that window, and type the same thing any time I open a shell window again, it tells me I only have 1.8.7. Something similar happens if I try installing Rails after installing Ruby this way.
I'm on Ubuntu 12.04
EDIT:
I'm using RVM. I installed it according to the answer from this stackoverflow question because it was originally a broken version (that's where my command from above comes from):
Installed Ruby 1.9.3 with RVM but command line doesn't show ruby -v
Try this:
rvm use --default 2.0.0
It occurs probably because your default ruby version is 1.8.7. You can quickly check it with
rvm list
To install 1.9.2, simply type:
rvm install 1.9.2
I have an older mac mini (v10.5.8) I would like to put the latest version of rails on.
gem update --system gives me "no such file to load"
gem install rubygems-update gives me the same thing as above
So I manually downloaded from rubygems.org/pages/download and extracted the tar then tried running ruby setup.rb but that gives me...
./lib/rubygems/core_ext/kernel_require.rb:45:in 'gem_original_require': no such file to load -- stringio (LoadError)
...so I'm stuck now..I'm not sure where to go from here...running ruby -v gives me "1.8.7 (2008-05-31 patchlevel 0"
Instead of using the system ruby, you should try to use rvm to install a recent version of Ruby:
$ curl -L https://get.rvm.io | bash -s stable --rails --autolibs=enabled --ruby=1.9.3
Or, if you want more control
$ curl -L https://get.rvm.io | bash -s stable
$ rvm get head
$ rvm install 1.9.3
Either way, make sure you run
$ rvm --default use 1.9.3
Note that you may have to install XCode and XCode Command-Line Tools before all of this. Note also that you probably shouldn't use sudo... just have it install ruby for your user.
I installed RVM with a few versions of Ruby-interpreters some time ago.
How I can to update it, because new versions are already released?
I found only one way: rvm install 1.9.2-rc1 && rvm remove 1.9.2-preview1, but my gems are lost.
Can I update branches time to time? I haven't found any tips in the documentation.
Use the rvm upgrade 1.9.2-preview1 1.9.2-rc1 command or watch this screencast
[Edit: rvm has a new command to upgrade-- you likely want to use the answer by andy318]
AFAIK, there is no automatic way to do this at the moment, but something like this enables you to keep your gems:
rvm use 1.9.2-preview1
rvm gemset export
rvm install 1.9.2-rc1
rvm use 1.9.2-rc1
rvm gemset import
rvm remove 1.9.2-preview1
Now, for automating updates, you would have to detect version changes, that is easy, as you can simply use the return value of rvm use 1.9.2. Finding out what the new version is (1.9.2-rc1) is unnecessary, as it is aliased as 1.9.2. The trick is to find the latest installed version of 1.9.2. You could do something like this in a cron job:
# make sure you source rvm first
rvm update --head
rvm reload
if [ ! rvm use 1.9.2 ]; then
for ruby_version in `rvm list strings`; do
# find the latest version of 1.9.2
case $ruby_version in
ruby-1.9.2-*) latest192=$ruby_version;;
esac
done
rvm use $latest192
rvm gemset export 192.gems
rvm install 1.9.2
rvm use 1.9.2
rvm gemset import 192
rvm remove $latest192
fi
Did not try that, but I have similar code in my update script. I also slipped in a gem update and other stuff.
Feel free to visit the #rvm IRC channel on Freenode.
Current rvm version provides an easier way to do this. The 'upgrade' option will migrate gem sets, wrappers and environment files -
$ rvm upgrade 1.9.2-p136 1.9.2-p180
To find out if there is a more recent stable version of a ruby implementation for you to upgrade to, first get the latest version of RVM and then enumerate the known versions of Ruby.
$ rvm get stable
$ rvm list known
You can compare this the ruby versions installed on your system
$ rvm list rubies
you can install latest rvm and ruby by :
$ \curl -L https://get.rvm.io | bash -s stable --ruby
and check all the ruby version with stability
$ rvm list known
can also check details here : http://www.ruby-lang.org/en/downloads/
$ rvm install ruby 2.0.0-p247
Use when you want to download specific version or know this is stable.
There's a fantastic RVM GUI called JewelryBox that I use to manage my Ruby versions
http://jewelrybox.unfiniti.com
I think that is:
rvm all do gemset update