Link to home
Start Free TrialLog in
Avatar of depassion
depassionFlag for Philippines

asked on

Command line change & Fail to load gemrc

recently command line output  changed from

Mac-Pro:~ kevin$

to

112:~ kevin$

and now when ever i issue certain ruby commands i get an error:

Failed to load /Users/kevin/.gemrc

this is the permissions:

-rw-r--r--   1 kevin  staff    189 Dec  4 00:12 .gemrc


Avatar of F. Dominicus
F. Dominicus
Flag of Germany image

what command are you typing ?
gem ?
irb ?
ruby?

That the content of .gemrc?
Does it contain a line like
#!/usr/bin/env ruby

or the like?

If yes the path may be messed up.

Avatar of depassion

ASKER

.gemrc:
---
:benchmark: false
:update_sources: true
:backtrace: false
:bulk_threshold: 1000
:verbose: true
:sources:
- http://gems.rubyforge.org/
- http://gems.github.com
_ http://gemcutter.org

112:~ kevin$ gem list
Failed to load /Users/kevin/.gemrc
Failed to load /Users/kevin/.gemrc

*** LOCAL GEMS ***

actionmailer (2.3.4)
......

irb command is ok, no error.

112:ndthub kevin$ ruby script/server
Failed to load /Users/kevin/.gemrc
=> Booting Mongrel
.......

112:ndthub kevin$ rails --version
Failed to load /Users/kevin/.gemrc
Rails 2.3.4
I'd start with updating gem itself. Or you may just rename .gemrc and
run something like gem update or the like
ASKER CERTIFIED SOLUTION
Avatar of dimonic
dimonic

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
cat does not give you any error message on text file. This stuff is Ruby, and some part of the Ruby installation has to read this file. Because of it's name it should be gem. So gem  is the first one has to check.
Well the easiers would be, just rename the .germrc and I bet it will be re-established on first command like gem update or the like. It would be really nice to get some feedback about it BTW.
112:~ kevin$ cat /Users/kevin/.gemrc
---
:benchmark: false
:update_sources: true
:backtrace: false
:bulk_threshold: 1000
:verbose: true
:sources:
- http://gems.rubyforge.org/
- http://gems.github.com
_ http://gemcutter.org

it was an underscore, should be a dash.

i tried gem update before, same error.