Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 941
  • Last Modified:

trying to install rails 2.3.11

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
depassion
Asked:
depassion
  • 5
  • 2
  • 2
1 Solution
 
Andrew DoadesIT TechnicianCommented:
I've seen this before with a newer version of Rack

Can you post the output of "gem list"

Andrew
0
 
depassionAuthor Commented:
*** 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
 
Andrew DoadesIT TechnicianCommented:
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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
depassionAuthor Commented:
[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
 
JESiiCommented:
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
 
depassionAuthor Commented:
*** 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
 
depassionAuthor Commented:
rvm rubies

=> ruby-1.8.7-p352 [ x86_64 ]
   ruby-1.9.2-p290 [ x86_64 ]
0
 
depassionAuthor Commented:
ok, i was using rvm so i created a new gemset and installed a fresh 2.3.11 version of rails.
0
 
JESiiCommented:
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

Become an Android App Developer

Ready to kick start your career in 2018? Learn how to build an Android app in January’s Course of the Month and open the door to new opportunities.

  • 5
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now