Solved

trying to install rails 2.3.11

Posted on 2011-09-05
9
911 Views
Last Modified: 2012-05-12
dont understand what i'm doing wrong here

[20:21:28]kevin[ndthub]$ sudo gem install rails -v 2.3.11 --no-ri --no-rdoc
Successfully installed rails-2.3.11
1 gem installed
[20:22:49]kevin[ndthub]$ ruby script/server
Missing the Rails 2.3.11 gem. Please `gem install -v=2.3.11 rails`, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed.
[20:23:49]kevin[ndthub]$ rails -v
Rails 2.3.5

0
Comment
Question by:depassion
  • 5
  • 2
  • 2
9 Comments
 
LVL 10

Expert Comment

by:Andrew Doades
ID: 36485261
I've seen this before with a newer version of Rack

Can you post the output of "gem list"

Andrew
0
 

Author Comment

by:depassion
ID: 36485386
*** LOCAL GEMS ***

actionmailer (2.3.5)
actionpack (2.3.5)
activemodel (3.1.0)
activerecord (3.1.0, 2.3.5)
activeresource (3.1.0, 2.3.5)
activesupport (3.1.0, 2.3.5)
arel (2.2.1)
bcrypt-ruby (3.0.0)
builder (3.0.0)
bundler (1.0.18)
capistrano (2.8.0)
erubis (2.7.0)
highline (1.6.2)
hike (1.2.1)
hoptoad_notifier (2.4.11)
i18n (0.6.0)
mail (2.3.0)
mime-types (1.16)
multi_json (1.0.3)
mysql2 (0.3.7, 0.3.6)
net-scp (1.0.4)
net-sftp (2.0.5)
net-ssh (2.2.1)
net-ssh-gateway (1.1.0)
polyglot (0.3.2)
rack (1.3.2, 1.0.1)
rack-cache (1.0.3)
rack-mount (0.8.3)
rack-ssl (1.3.2)
rack-test (0.6.1)
rails (2.3.5)
railties (3.1.0)
rake (0.9.2 ruby)
rdoc (3.9.4)
rubygems-update (1.8.10)
sprockets (2.0.0)
thor (0.14.6)
tilt (1.3.3)
treetop (1.4.10)
tzinfo (0.3.29)
xml-simple (1.1.0)
0
 
LVL 10

Expert Comment

by:Andrew Doades
ID: 36485398
I think its rack 1.3.2 that's causing the problem.

try running the following:

gem uninstall -v=1.3.2 rack

Then boot rails again.

Andrew
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

Author Comment

by:depassion
ID: 36485483
[21:03:52]kevin[ndthub]$ sudo gem uninstall -v=1.3.2 rack
Password:
INFO:  gem "rack" is not installed
[21:30:10]kevin[ndthub]$ ruby script/server
Missing the Rails 2.3.11 gem. Please `gem install -v=2.3.11 rails`, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed.
0
 
LVL 12

Expert Comment

by:JESii
ID: 36486499
You're getting the error message because the rails server can't find Rails 2.3.11.

I see from your gem list that you have Rails 2.3.5 installed, along with parts of rails 3.1.0.

First thing I'd do is uninstall all the 3.1.0 gems (activemodel, activerecord, ...) with
   gem uninstall activemodel -v=3.1.0  # do the same for all the others)

Then I'd try the gem install again:
   gem install rails -v=2.3.11

Then do another gem list to see what you have.
0
 

Author Comment

by:depassion
ID: 36488532
*** LOCAL GEMS ***

actionmailer (2.3.5)
actionpack (2.3.5)
activemodel (3.1.0)
activerecord (3.1.0, 2.3.5)
activeresource (3.1.0, 2.3.5)
activesupport (3.1.0, 2.3.5)
arel (2.2.1)
bcrypt-ruby (3.0.0)
builder (3.0.0)
bundler (1.0.18)
capistrano (2.8.0)
erubis (2.7.0)
highline (1.6.2)
hike (1.2.1)
hoptoad_notifier (2.4.11)
i18n (0.6.0)
mail (2.3.0)
mime-types (1.16)
multi_json (1.0.3)
mysql2 (0.3.7, 0.3.6)
net-scp (1.0.4)
net-sftp (2.0.5)
net-ssh (2.2.1)
net-ssh-gateway (1.1.0)
polyglot (0.3.2)
rack (1.3.2, 1.0.1)
rack-cache (1.0.3)
rack-mount (0.8.3)
rack-ssl (1.3.2)
rack-test (0.6.1)
rails (2.3.5)
railties (3.1.0)
rake (0.9.2 ruby)
rdoc (3.9.4)
rubygems-update (1.8.10)
sprockets (2.0.0)
thor (0.14.6)
tilt (1.3.3)
treetop (1.4.10)
tzinfo (0.3.29)
xml-simple (1.1.0)
[15:06:03]kevin[ndthub]$ sudo gem uninstall actionmailer -v=2.3.5
INFO:  gem "actionmailer" is not installed
[15:06:20]kevin[ndthub]$ sudo gem uninstall activemodel -v=2.3.5
Password:
INFO:  gem "activemodel" is not installed

this is crazy. how can i just start over and remove all gems from the ruby version. If i install a new patch version of 1.8.7 that will allow me to start from scratch right?
0
 

Author Comment

by:depassion
ID: 36488551
rvm rubies

=> ruby-1.8.7-p352 [ x86_64 ]
   ruby-1.9.2-p290 [ x86_64 ]
0
 

Author Comment

by:depassion
ID: 36490986
ok, i was using rvm so i created a new gemset and installed a fresh 2.3.11 version of rails.
0
 
LVL 12

Accepted Solution

by:
JESii earned 500 total points
ID: 36495497
rvm can be really confusing at times, as it picks up the gems it thinks are right.

What I've found works for me is that I explicitly set a default ruby (an explicit patch level, not head; otherwise the patch-level can change) and a default gemset so that everything is locked down.

rvm --default <ruby>
rvm gemset <gemsetname> --default

You also have to create the gemset the first time around (see http://beginrescueend.com/gemsets/basics/)

Once this is working correctly, rvm will display the ruby/gemset combination whenever you cd into your project.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Implementing a Cancel button for a modal dialog in Ruby on Rails 4 1,547
finding text after / 15 258
Rails URL Rewrite 1 419
is this a cms? 8 67
I recently rediscovered rails when I needed a holiday project and decided to build a management dashboard for the company where I work.  With it being a project done in my free time, I could focus my time on learning the basics rather than trying to…
Recently I spent hours debugging an issue in a Rails project where ActiveRecord was causing MySQL errors trying to create a User object of a class at the top level of a Single Table Inheritance model structure.  It turns out `.create` behaves differ…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question