Re: gem command line tool (for ruby) not working
Re: gem command line tool (for ruby) not working
- Subject: Re: gem command line tool (for ruby) not working
- From: Chuck Soper <email@hidden>
- Date: Mon, 12 Oct 2009 01:16:30 -0700
- Thread-topic: gem command line tool (for ruby) not working
Thanks for responding.
On 10/11/09 9:55 PM, "Jens Alfke" <email@hidden> wrote:
> On Oct 11, 2009, at 2:56 PM, Chuck Soper wrote:
>
>> When I attempt to run 'gem -v' I get the following error.
>> $ gem -v
>> /usr/bin/gem:14: undefined method `ruby_version' for Gem:Module
>> (NoMethodError)
>
> How stock is this system? You say you don't have MacPorts, but have
> you installed any Ruby code or other versions of Ruby?
> I'm not an expert, but it seems like there's a version mismatch
> between the 'gem' tool itself and the libraries it uses.
>
I installed rails and some gems about a year ago. I thought that I did
everything in a standard way. Now, that I but I think that I did the
install on Tiger. Leopard, if I recall correctly, shipped with Ruby,
RubyGems and Rails.
> - Check what /usr/bin/gem links to it should be a symlink into the
> shadow usr/bin tree inside the system Ruby.framework.
> - Check the usr/lib/ruby/1.8/rubygem* files inside /System/Library/
> Frameworks/Ruby/.
>
Before I sent the message, I confirmed that I have the gem command:
$ ls -la /usr/bin/gem
lrwxr-xr-x 1 root wheel 71 Aug 28 23:39 /usr/bin/gem ->
../../System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/gem
I'm not sure if this is standard.
> I would suspect that a Ruby list/forum would have the best
> concentration of experts, not an Apple list.
>
I totally agree. I'm working with a Rails developer and he sent me the
following:
> There's a thread here from early September:
> http://aspn.activestate.com/ASPN/Mail/Message/ruby-talk/3748569
>
> But no resolution...
> This was what suggested, but it appears it didn't help this guy...
> maybe it will help you?
>
>> I suggest you grab the tgz from here:
>> http://rubyforge.org/frs/download.php/60718/rubygems-1.3.5.tgz
>> unarchive it, then run "sudo ruby setup.rb"
I manually installed RubyGems 1.3.5 and that fixed my issue.
Here's the manual: http://docs.rubygems.org/read/chapter/3
If you're working with rails or gems on Snow Leopard, you may want to read
this post:
http://weblog.rubyonrails.org/2009/8/30/upgrading-to-snow-leopard
Thanks,
Chuck
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden