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!
Related
Parsing documentation for bundler-1.3.2
Installing ri documentation for bundler-1.3.2
Parsing documentation for rails-3.2.12
Installing ri documentation for rails-3.2.12
Done installing documentation for i18n, multi_json, activesupport, builder, activemodel, rack, rack-cache, rack-test, journey, hike, tilt, sprockets, erubis, actionpack, arel, tzinfo, activerecord, activeresource, mime-types, polyglot, treetop, mail, actionmailer, rack-ssl, thor, rdoc, railties, bundler, rails (58 sec).
29 gems installed
204-252:~ narendra$ rails -v
Rails 2.3.8
204-252:~ narendra$ gem update rails
Updating installed gems**strong text**
Nothing to update
If you're using rbenv you can try running rbenv rehash after updating rails.
If you're in a rails project folder that was built with Rails 2.3.8 then when you run rails -v in that folder it will return that version of rails instead of the latest one. So you could try moving to another folder and see if running rails -v gives you the version you're expecting.
Also, if you installed rails with sudo gem install rails sometimes /usr/bin/rails still points to the old version, so you could update that to point to the new one.
Since rails 3.2.12 is not included in the output of gem list, I suspect you installed the gem with sudo. Installing with sudo and then trying to list the gems without it (or other operations) can give you a different list. Try doing sudo gem list, and if rails 3.2.12 is in there, thats your problem. Try installing it without sudo.
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.
Hopefully this is an easy one - I'm trying to install rails on my netbook. I can#'t seem to get it to update to rails 3 (seems stuck on 2.3.5). Here's some terminal output to show you what I mean...
mike#Ubuntu-Netbook:~$ rails -v
Rails 2.3.5
mike#Ubuntu-Netbook:~$ gem update rails
Updating installed gems
Nothing to update
mike#Ubuntu-Netbook:~$ sudo gem install rails
[sudo] password for mike:
Successfully installed rails-3.1.0
1 gem installed
Installing ri documentation for rails-3.1.0...
file 'lib' not found
Installing RDoc documentation for rails-3.1.0...
file 'lib' not found
mike#Ubuntu-Netbook:~$ rails -v
Rails 2.3.5
See? Stuck at 2.3.5! I have done a whole bunch of rails installs on other machines and never had this problem before - what am I missing?
The 2.3.5 install is completely working.
EDIT: I did not get an answer to this question. I got around it by investigating rvm and installing that way instead.
Are you using bundler? Are you in an rvm gemset?
If you're using the latter, once you sudo, you're in a different user's rvm install, so installation won't be the same. If you're using bundler and have locked rails to 2.3.5, that's what it'll be regardless whether you run gem update or not.
If you can answer the above two questions, we can probably narrow down your issue.
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
I am trying to get my Instant Rails working on my Windows 7 laptop.
The error I keep getting when trying to access my site files are:
c:/rails/ruby/lib/site_ruby/1.8/rubygems.rb:779:in 'report_activate_error'
RubyGem version error: rack<1.1.0 not~> 1.0.1> <Gem::LoadError>
from c:/rails/ruby/lib/ruby.site_ruby/1.8/rubygems.rb:214:in 'activate'
from c:/rails/ruby/lib/ruby.site_ruby/1.8/rubygems.rb:1082:in 'gem'
from c:/depot/vendor/rails/actionpack/lib/action_controller.rb:34
from c://rails/ruby/lib/ruby.site_ruby/1.8/rubygems/custom_require.rb:31 in 'gem_original_require'
etc...
I have intalled Rubygems 1.3.7 and they work fine and when I run the test it works and the gem env shows that the 1.3.7 has been installed correctly.
What can I do to get this working?
Any prompt help would be VERY appreciated.
Thanks
Your rack gem is outdated. Try to run gem update rack. Or, if you use Rails with Bundler, just run bundle install in the root of your project and it will do everything for you.
I decided to write a little manual about the Ruby 1.8.7 and Rails stable installation.
Download RubyInstaller 1.8.7 from here. During the installation, check the 'Add Ruby executables to your PATH' box. After the installation, don't forget to restard cmd. Then try running ruby -v and gem -v to check for installed Ruby 1.8.7 and RubyGems 1.3.7;
Install the latest stable Rails 2.3.8 using gem install rails --no-ri --no-rdoc; Check it using rails -v;
Create a new application using rails myapp;
Test it: script/server. That's it!
gem install rack -v 1.0.1