Hassan Schroeder wrote in post #966940:
> On Tue, Dec 7, 2010 at 10:06 AM, Colin Law <clan...@googlemail.com>
> wrote:
>
>> Correct me if I am wrong but your fundamental problem is that somehow
>> the rails environment is messed up. Your proposed solution is to
>> delete it all and start again. No-one seems to know how to do this,
>> though you do know how to remove individual gems (you did it for rails
>> 2.3.8) so you could do this for each of the gems you do not want. You
>> still have the problem that somehow
>> rails -v
>> does not work so somehow you have lost the rails startup script.
>
> Uh, "somehow"?? It was deleted when the gem was uninstalled, as a
> previous post showed.
> -----------------------------
> Select gem to uninstall:
>  1. rails-2.3.8
>  2. rails-2.3.8
>  3. All versions
>> 3
> Remove executables:
>  rails
>
> in addition to the gem? [Yn]
> Removing rails
> Successfully uninstalled rails-2.3.8
> -----------------------------
>
> The easiest thing to do would be `sudo gem uninstall rails` to get rid
> of *all* the rails versions and then install the one you want.
>
> I would certainly do that before trying to manually remove the gems,
> though that's trivial (use `gem env` to find where they are and delete).
>
> --
> Hassan Schroeder ------------------------ hassan.schroe...@gmail.com
> twitter: @hassan

I thought uninstalling rails 2.3.8 would uninstall that version then a 
different version would be "current". I paused at that question. I have 
to admit.

BTW...
gem list --local

*** LOCAL GEMS ***

actionmailer (2.3.5, 2.2.2, 1.3.6)
actionpack (2.3.5, 2.2.2, 1.13.6)
actionwebservice (1.2.6)
activerecord (2.3.5, 2.2.2, 1.15.6)
activeresource (2.3.5, 2.2.2)
activesupport (2.3.5, 2.2.2, 1.4.4)
acts_as_ferret (0.4.3)
capistrano (2.5.2)
cgi_multipart_eof_fix (2.5.0)
daemons (1.0.10)
dnssd (0.6.0)
fastthread (1.0.1)
fcgi (0.8.7)
ferret (0.11.6)
gem_plugin (0.2.3)
highline (1.5.0)
hpricot (0.6.164)
libxml-ruby (1.1.2)
mongrel (1.1.5)
needle (1.3.0)
net-scp (1.0.1)
net-sftp (2.0.1, 1.1.1)
net-ssh (2.0.4, 1.1.4)
net-ssh-gateway (1.0.0)
rack (1.0.1)
rails (2.3.5, 2.2.2, 1.2.6)
rake (0.8.3)
RedCloth (4.1.1)
ruby-openid (2.1.2)
ruby-yadis (0.3.4)
rubynode (0.1.5)
rvm (1.1.3)
sqlite3-ruby (1.2.4)
termios (0.9.4)
xmpp4r (0.4)

Looks like several versions of rails are still hanging around!

But...

sudo gem uninstall rails
ERROR:  While executing gem ... (Gem::InstallError)
    cannot uninstall, check `gem list -d rails`


And...
gem list -d rails

*** LOCAL GEMS ***

rails (2.3.5, 2.2.2, 1.2.6)
    Author: David Heinemeier Hansson
    Rubyforge: http://rubyforge.org/projects/rails
    Homepage: http://www.rubyonrails.org
    Installed at (2.3.5): 
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8
                 (2.2.2): 
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8
                 (1.2.6): 
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8

    Web-application framework with template engine, control-flow layer,
    and ORM.

FYI

So it looks like heading over to 
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8
and deleting gems/* may do it. In this directory there is an alias to 
/Library/Ruby/Site and one to /Library/Ruby/Gems, which has some 
interesting content.

So, Mr Schroeder, given this:
gem env
RubyGems Environment:
  - RUBYGEMS VERSION: 1.3.5
  - RUBY VERSION: 1.8.7 (2009-06-12 patchlevel 174) 
[universal-darwin10.0]
  - INSTALLATION DIRECTORY: /Library/Ruby/Gems/1.8
  - RUBY EXECUTABLE: 
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
  - EXECUTABLE DIRECTORY: /usr/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - universal-darwin-10
  - GEM PATHS:
     - /Library/Ruby/Gems/1.8
     - /Users/rob/.gem/ruby/1.8
     - 
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - http://gems.rubyforge.org/

What do I drag to the trash? Looks like the stuff in the three GEM 
PATHS?

-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to