Forum: Ruby on Rails gem cleanup and rails 1.2.6 problem

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Fc6f5b908cfa12868292f985e0de2788?d=identicon&s=25 elle (Guest)
on 2009-02-13 04:23
(Received via mailing list)
I've updated rails and other gems following:
http://wiki.rubyonrails.org/rails/pages/HowtoUpgrade
When I try to run: gem cleanup, I get the following error:

Cleaning up installed gems...
Attempting to uninstall rails-1.2.6
ERROR:  While executing gem ... (Gem::InstallError)
    Unknown gem rails = 1.2.6

Googling the problem, I found: http://www.ruby-forum.com/topic/170342
Running:
gem uninstall --install-dir -/System/Library/Frameworks/Ruby.framework/
Versions/1.8/usr/lib/ruby/gems/1.8 rails

I get:
ERROR:  While executing gem ... (Gem::InstallError)
    Unknown gem rails >= 0


How can I uninstall rails 1.2.6? also, since gem cleanup gets an
error, I can't clean up any other gems....


Elle
09b4d64ca074d04a272a713eb10319eb?d=identicon&s=25 Charles Johnson (Guest)
on 2009-02-13 16:53
(Received via mailing list)
On Thu, Feb 12, 2009 at 9:22 PM, elle <waznelle@gmail.com> wrote:

> Googling the problem, I found: http://www.ruby-forum.com/topic/170342
> Running:
> gem uninstall --install-dir -/System/Library/Frameworks/Ruby.framework/
> Versions/1.8/usr/lib/ruby/gems/1.8 rails
>

Become root, and then do it this way:

gem uninstall --install-dir
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8
 rails

HTH

Charles
Fc6f5b908cfa12868292f985e0de2788?d=identicon&s=25 elle (Guest)
on 2009-02-13 21:53
(Received via mailing list)
Running it with sudo I get:

ERROR:  While executing gem ... (Gem::InstallError)
    Unknown gem rails >= 0

Do I need to actually sign in as root?


Cheers,
Elle
09b4d64ca074d04a272a713eb10319eb?d=identicon&s=25 Charles Johnson (Guest)
on 2009-02-13 22:20
(Received via mailing list)
On Fri, Feb 13, 2009 at 2:43 PM, elle <waznelle@gmail.com> wrote:

> Elle
>
>
You should be OK with sudo. Can you post your *exact* command line, and
the
output from gem list -d rails

HTH

Charles
Fc6f5b908cfa12868292f985e0de2788?d=identicon&s=25 elle (Guest)
on 2009-02-13 22:36
(Received via mailing list)
gem list -d rails gives me:

*** LOCAL GEMS ***

rails (2.2.2, 1.2.6)
    Author: David Heinemeier Hansson
    Rubyforge: http://rubyforge.org/projects/rails
    Homepage: http://www.rubyonrails.org
    Installed at (2.2.2): /Library/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.

Then running:
sudo gem uninstall --install-dir -/System/Library/Frameworks/
Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8 rails
gives me:

ERROR:  While executing gem ... (Gem::InstallError)
    Unknown gem rails >= 0



Elle
09b4d64ca074d04a272a713eb10319eb?d=identicon&s=25 Charles Johnson (Guest)
on 2009-02-15 01:17
(Received via mailing list)
The problem is with your path. You want /System/Library...
but you are doing -/System/Library...

See the difference?

Cheers--

Charles
F953d975a72c116171897954a5589c58?d=identicon&s=25 kangghee (Guest)
on 2009-02-15 19:50
(Received via mailing list)
Ah...this is a good topic.
I'm new to Ruby while using the Mac.  So it seems that Mac's installed
Ruby can be uninstalled properly as well.  Then we can definitely
update it to get the latest version.

Thanks Charles.
Fc6f5b908cfa12868292f985e0de2788?d=identicon&s=25 elle (Guest)
on 2009-02-16 00:28
(Received via mailing list)
Sorry for the late reply -- for some reason missed your post till now.
Running the command with the correct path and sudo, asks me if I want
to remove executables: rails in addition to the gem? [Yn]
When I say y, I get an error:
ERROR:  While executing gem ... (Gem::FilePermissionError)
    You don't have write permissions into the /System/Library/
Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/bin
directory.

Should I sign in as root?

Cheers,
Elle
09b4d64ca074d04a272a713eb10319eb?d=identicon&s=25 Charles Johnson (Guest)
on 2009-02-16 19:53
(Received via mailing list)
Yes, please sign in as root, and be sure you get the path right: is
starts
/System... but not -/System...
Fc6f5b908cfa12868292f985e0de2788?d=identicon&s=25 elle (Guest)
on 2009-02-16 22:48
(Received via mailing list)
Signed in as root and made sure I have the correct path and the same
happens. It asks if I want to uninstall rails. I say yes and it gives
me an error:
ERROR:  While executing gem ... (Gem::FilePermissionError)
    You don't have write permissions into the /System/Library/
Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/bin
directory.

Why is this happening? What should I do?

Thanks,
Elle
09b4d64ca074d04a272a713eb10319eb?d=identicon&s=25 Charles Johnson (Guest)
on 2009-02-17 14:27
(Received via mailing list)
Log in as root, and go
to
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/binand
post the owner, group and permissions on one of the files. Also post the
output of "whoami" command.

Thanks.

Charles
Fc6f5b908cfa12868292f985e0de2788?d=identicon&s=25 elle (Guest)
on 2009-02-23 00:00
(Received via mailing list)
Logged as root, went to /System/Library/Frameworks/Ruby.framework/
Versions/1.8/usr/lib/ruby/gems/1.8
Running
% whoami
gives me:
root

Then running
% ls -l
gives me:
total 8
drwxr-xr-x  31 root  wheel  1054 31 Oct 16:51 cache
drwxr-xr-x  32 root  wheel  1088 31 Oct 16:51 doc
drwxr-xr-x  31 root  wheel  1054 31 Oct 16:51 gems
-rw-r--r--   1 root  wheel     4  5 Jan  2008 source_cache
drwxr-xr-x  31 root  wheel  1054 31 Oct 16:51 specifications

Thanks,
Elle
E24685d0c020430f691ea1abdab4f1a1?d=identicon&s=25 Chris Stump (cstump)
on 2009-08-29 22:57
I had the same problem as Elle. In my case
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/bin
didn't exist. I cd'd into
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8
and ran `sudo mkdir bin` and then I stopped getting the write
permissions error when trying to cleanup my gems.
This topic is locked and can not be replied to.