I'm using Ubuntu 10.10. When I run rails -v, I get 2.3.5. I want to upgrade to 3.0.5, so I run sudo gem install rails. I get
Successfully installed rails-3.0.5
1 gem installed
Installing ri documentation for rails-3.0.5...
Installing RDoc documentation for rails-3.0.5...
I run rails -v again. It still returns 2.3.5. I run sudo apt-get install rails, I get
Reading state information... Done
rails is already the newest version.
Anybody know what I'm doing wrong?
Look at your current gemfile, probably it has record only for rails 2.3.5, if it does then change to 3.0.5. After this just run bundle install
Related
Need a bit of help with installing Ruby and RoR
I installed everything initially last weekend (15/09/2012) including
Ruby, RoR and RubyMine. I've just opened a Command Prompt on my win 7
64bit box and ran:
$ rails --version
which to my surprise returned 2.3.14 as I was expecting to see 3.2.8
I then ran:
$ gem install rails
Which output:
Successfully installed rails-3.2.8
1 gem installed
Installing ri documentation for rails-3.2.8...
Installing RDoc documentation for rails-3.2.8...
Then running rails --version again still outputs 2.3.14
I'm a bit confused why a new install (following the instructions here
http://rubyonrails.org/download) seems to have installed a very old
version.
How do I get the latest version installed?
Thanks,
Sounds like you have both versions installed. Run "gem uninstall rails" and it will list the versions and ask which one you want to remove. Then chose the old one to remove.
I've gotten a bit further now. I ran:
F:\>gem cleanup rails
Cleaning up installed gems... Attempting to uninstall rails-2.3.14
You have requested to uninstall the gem:
rails-2.3.14
restful_authentication-1.1.6 depends on [rails (~> 2.3.4)]
If you remove this gems, one or more dependencies will not be met.
Continue with Uninstall? [Yn] y
Executables and scripts will remain installed.
Successfully uninstalled rails-2.3.14
Clean Up Complete
F:\>gem uninstall restful_authentication
Successfully uninstalled restful_authentication-1.1.6
F:\>gem install rails
Successfully installed rails-3.2.8
1 gem installed
Installing ri documentation for rails-3.2.8...
Installing RDoc documentation for rails-3.2.8...
F:\>rails -v
C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems.rb:317:in `bin_path': can't find ge
m rails ([">= 0"]) with executable rails (Gem::GemNotFoundException)
from C:/Ruby193/bin/rails:23:in `<main>'
So now it's telling me that it's installed rails successfully but now errors when I query it's version.
I'm trying to install rails for the 1st time.
I can't seem to get it to install beyond Rails 2.2.3.
I have followed the instructions at:
http://rubyonrails.org/download
I downloaded the latest RubyGems and ran 'ruby setup.rb'.
$ gem -v
1.8.11
I ran 'gem install rails' and got Rails 2.2.3.
I ran 'gem update' several times and I get:
$ gem update
Updating installed gems
Updating rails
Successfully installed rails-2.2.3
Gems updated: rails
Installing ri documentation for rails-2.2.3...
Installing RDoc documentation for rails-2.2.3...
I tried gem1.8:
$ gem1.8 update
Updating installed gems
Updating rails
Successfully installed rails-2.2.3
Gems updated: rails
Installing ri documentation for rails-2.2.3...
Installing RDoc documentation for rails-2.2.3...
$ rails -v
Rails 2.2.3
$ ruby -v
ruby 1.8.7 (2010-08-16 patchlevel 302) [i486-linux]
I'm using Debian 'unstable' (Wheezy/Sid).
I'm new to rails and don't understand what I'm doing wrong.
I've searched by so far nothing specific to this issue.
I thought the latsted gem would just get Rails 3.1
just as the install docs at the site say?
Any advise much appreciated.
Have you tried this ?
gem install rails --pre
I tried again and it worked fine now.
This time I pointed direct to the
fresh new copy of gem.
All good. Cheers!
$ sudo gem install rails
Successfully installed rails-3.1.1
1 gem installed
Installing ri documentation for rails-3.1.1...
Installing RDoc documentation for rails-3.1.1...
This did not properly work, as when I run rails, I get
The program 'rails' is currently not installed. You can install it by typing: sudo apt-get install rails
And doing ruby --version gives
ruby 1.8.7 (2010-08-16 patchlevel 302) [i686-linux]
and doing which rails returns nothing. Anyone have any ideas about how I would go about installing the latest version of Rails? I've tries using the apt-get method, but I got Rails 2, however I need Rails 3 for my purposes.
I've had the similar problem with my Ubuntu installation.
Solved it following to steps:
Make sure rubygems is installed
created the following symlink:
sudo ln -s /usr/bin/gem1.8 /usr/bin/gem
So I run this command successfully: sudo gem install rails
It outputs: Successfully installed rails-3.0.10
However, whenever I type in rails -v it shows: Rails 1.2.6
How can this be? Whenever I create a new project and do rails server, localhost:3000 doesn't work.
It's likely that your system has rails preinstalled, and the rubygems version is not overriding it.
You might have luck installing rvm and then installing rails within an rvm gemset.
I have an older Ubuntu server with a Rails app running on version 2.3.5 that I'd like to move to version 2.3.8. The server doesn't seem to know that there is an update available, no matter how many times I run a "gem update" or "gem update --system" or "update_rubygems"
root#server:~# gem install rails -v 2.3.8
ERROR: could not find gem rails locally or in a repository
root#server:~# gem install rails
Successfully installed rails-2.3.5
1 gem installed
Installing ri documentation for rails-2.3.5...
Installing RDoc documentation for rails-2.3.5...
RubyGems 1.3.5 is installed.
I don't remember having to do anything special for any of my other servers when making this upgrade.
Any ideas?
Try:
gem install rails --source http://rubygems.org
with --source and without -v.