[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

RubyGems setup

alex_land

7/8/2007 12:39:00 AM

Hi:

I have tried everything i can think of to install RubyGems, but no
success. I would be grateful for any assistance. In sum, my problem
is that i can't install the Gems' System (so obviously my problem is
not with a particular library/Gem-i haven't got that far yet).

Here are the details:

1. My rig: a MacBook Core 2 Duo; It's my personal Mac and i have the
admin password.

2. version of Ruby i'm running (v. 1.82)

3. What i've done: went to rubyforge, downloaded and upacked 0.9.4
RubyGems (tried one prior release just in case, same result)

4. tried to do an install from my Terminal (% ruby setup.rb <--that's
hat the readme file says to do, and indeed, that file is in the
distribution.

5. I know the install failed because none of the *gem* commands work
from my Terminal (e.g., "gem help).

6. Here's my Terminal window output i got when i tried to run the
setup file (which i'll copy in tedious detail in case some small piece
of this is the key):

---> bin
<--- bin
---> lib
---> lib/rbconfig
<--- lib/rbconfig
---> lib/rubygems
---> lib/rubygems/commands
<--- lib/rubygems/commands
---> lib/rubygems/digest
<--- lib/rubygems/digest
<--- lib/rubygems
<--- lib
---> bin
<--- bin
---> lib
---> lib/rbconfig
<--- lib/rbconfig
---> lib/rubygems
---> lib/rubygems/commands
<--- lib/rubygems/commands
---> lib/rubygems/digest
<--- lib/rubygems/digest
<--- lib/rubygems
<--- lib
rm -f InstalledFiles
---> bin
mkdir -p /usr/bin/
install gem /usr/bin/
setup.rb:633:in `initialize': Permission denied - /usr/bin/gem
(Errno::EACCES)
from setup.rb:633:in `open'
from setup.rb:633:in `install'
from setup.rb:1377:in `install_files'
from setup.rb:1376:in `each'
from setup.rb:1376:in `install_files'
from setup.rb:1346:in `install_dir_bin'
from setup.rb:1532:in `__send__'
from setup.rb:1532:in `traverse'
... 6 levels...
from setup.rb:1000:in `exec_install'
from setup.rb:814:in `invoke'
from setup.rb:773:in `invoke'
from setup.rb:1578


7. I used, i think, Macaroni or something similar to repair my
permissions (did this several times), then tried to re-install, same
result.


Thanks,

-Alex

3 Answers

Anupam Sengupta

7/9/2007 2:57:00 AM

0

>>>>> "Alex" == alex land <doug.ybarbo@gmail.com> writes:

Alex> Hi: I have tried everything i can think of to install RubyGems, but no
Alex> success. I would be grateful for any assistance. In sum, my problem
Alex> is that i can't install the Gems' System (so obviously my problem is
Alex> not with a particular library/Gem-i haven't got that far yet).

Alex> 1. My rig: a MacBook Core 2 Duo; It's my personal Mac and i have the
Alex> admin password.

That is good. You will need the admin password for 'sudo' to install the
rubygems install.

Alex> 2. version of Ruby i'm running (v. 1.82)

This version of Ruby *should* work. Later upto date versions are available at
Darwinports though (see the link below):

http://darwin...

Alex> 3. What i've done: went to rubyforge, downloaded and upacked 0.9.4
Alex> RubyGems (tried one prior release just in case, same result)

Use the latest version.

Alex> 4. tried to do an install from my Terminal (% ruby setup.rb <--that's
Alex> hat the readme file says to do, and indeed, that file is in the
Alex> distribution.

That is correct. However, you need to install as root (via sudo).


[...]


Alex> 6. Here's my Terminal window output i got when i tried to run the
Alex> setup file (which i'll copy in tedious detail in case some small piece
Alex> of this is the key):


[...]


Alex> mkdir -p /usr/bin/ install gem
Alex> /usr/bin/ setup.rb:633:in `initialize':
Alex> Permission denied - /usr/bin/gem (Errno::EACCES) from setup.rb:633:in
^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^

This says it all. You were trying to install using your normal user ID; you will
need a root ID (i.e., the 'Admin' user ID) to install the ruby gems system.

So, instead of typing the following in terminal:

ruby setup.rb

Do this:

sudo ruby setup.rb

and provide the admin password when the password prompt comes up.

[...]

Alex> 7. I used, i think, Macaroni or something similar to repair my
Alex> permissions (did this several times), then tried to re-install, same
Alex> result.

Your system permissions are fine. This was an access level issue.

HTH,
--
Anupam

alex_land

7/10/2007 12:42:00 PM

0

On Jul 9, 4:56 am, Anupam Sengupta <anupa...@gmail.com> wrote:
> >>>>> "Alex" == alex land <doug.yba...@gmail.com> writes:
>
> Alex> Hi: I have tried everything i can think of to install RubyGems, but no
> Alex> success. I would be grateful for any assistance. In sum, my problem
> Alex> is that i can't install the Gems' System (so obviously my problem is
> Alex> not with a particular library/Gem-i haven't got that far yet).
>
> Alex> 1. My rig: a MacBook Core 2 Duo; It's my personal Mac and i have the
> Alex> admin password.
>
> That is good. You will need the admin password for 'sudo' to install the
> rubygems install.
>
> Alex> 2. version of Ruby i'm running (v. 1.82)
>
> This version of Ruby *should* work. Later upto date versions are available at
> Darwinports though (see the link below):
>
> http://darwin...
>
> Alex> 3. What i've done: went to rubyforge, downloaded and upacked 0.9.4
> Alex> RubyGems (tried one prior release just in case, same result)
>
> Use the latest version.
>
> Alex> 4. tried to do an install from my Terminal (% ruby setup.rb <--that's
> Alex> hat the readme file says to do, and indeed, that file is in the
> Alex> distribution.
>
> That is correct. However, you need to install as root (via sudo).
>
> [...]
>
> Alex> 6. Here's my Terminal window output i got when i tried to run the
> Alex> setup file (which i'll copy in tedious detail in case some small piece
> Alex> of this is the key):
>
> [...]
>
> Alex> mkdir -p /usr/bin/ install gem
> Alex> /usr/bin/ setup.rb:633:in `initialize':
> Alex> Permission denied - /usr/bin/gem (Errno::EACCES) from setup.rb:633:in
> ^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^
>
> This says it all. You were trying to install using your normal user ID; you will
> need a root ID (i.e., the 'Admin' user ID) to install the ruby gems system.
>
> So, instead of typing the following in terminal:
>
> ruby setup.rb
>
> Do this:
>
> sudo ruby setup.rb
>
> and provide the admin password when the password prompt comes up.
>
> [...]
>
> Alex> 7. I used, i think, Macaroni or something similar to repair my
> Alex> permissions (did this several times), then tried to re-install, same
> Alex> result.
>
> Your system permissions are fine. This was an access level issue.
>
> HTH,
> --
> Anupam

Hello Anupam:


Yes that worked immediately, thanks! (it also worked when i just
installed a few libraries via R/G, e.g., Mechanize).

Regards,

-Alex

John Joyce

7/11/2007 1:46:00 PM

0

Visit the Hivelogic tutorial.
Google this: hivelogic install ruby