gem list --remote --details gives "ERROR: While executing gem ...(NoMethodError)"

M

Markus Fischer

Hi,

when trying

$ gem list --remote --details

I get

*** REMOTE GEMS ***

ERROR: While executing gem ... (NoMethodError)
undefined method `empty?' for #<Syck::privateType:0x99f0804
@value="", @type_id="null">

$ ruby -v
ruby 1.9.2p180 (2011-02-18 revision 30909) [i686-linux]


Installed via rvm.

Is there anything I can do to fix this?

gem list --remote works, but I'd like to see more information. The
default output doesn't describe what the package really does and often
the names are ambiguous.

thx,
- Markus
 
M

Markus Fischer

Hi,

I figure the problem

"undefined method `empty?' for #<Syck::privateType:0x99f0804
@value="", @type_id="null">"

comes from rubygems/commands/query_command.rb line 222:

if spec.rubyforge_project and not spec.rubyforge_project.empty? then


I figured something must be mixed up here and spec.rubyforge_project
should not be a Syck::privateType .

When I change it to

if spec.rubyforge_project and
spec.rubyforge_project.respond_to?:)empty?) and not
spec.rubyforge_project.empty? then

the command "gem list --remote --details" does not abort but runs ...
after about seven minutes I get this:

$ time gem list --remote --details > gems-details
ERROR: While executing gem ... (NameError)
uninitialized constant Syck::Syck

real 7m4.031s
user 0m21.269s
sys 0m7.144s


Maybe the command isn't supposed to work this way?

thx,
- Markus
 
N

Nick Klauer

[Note: parts of this message were removed to make it a legal post.]

I guess we should bring this conversation back around to the heart of the
matter: what is it that you want to accomplish by listing all 22,000+ gems
on your local machine?

I mean, there are search engines devoted specifically to listing out gems
for you (http://www.gemcutter.org, http://www.rubydoc.info/) and giving you
some pertinent details about the gem itself (such as where to go for more
information). There are resources to help you find the best gem for the
task at hand (http://ruby-toolbox.com/), and plenty of other places to find
out about gems.

-Nick Klauer
 
M

Markus Fischer

Hi,

I guess we should bring this conversation back around to the heart of the
matter: what is it that you want to accomplish by listing all 22,000+ gems
on your local machine?

I mean, there are search engines devoted specifically to listing out gems
for you (http://www.gemcutter.org, http://www.rubydoc.info/) and giving you
some pertinent details about the gem itself (such as where to go for more
information). There are resources to help you find the best gem for the
task at hand (http://ruby-toolbox.com/), and plenty of other places to find
out about gems.

indeed .. I didn't realize this, seriously. Whenever I used a ruby
software before, which required a certain gem, not every software
clearly says "use this or that gem", I mostly used "gem list --remote| |
grep name" to figure the right one. I use this because the default
pattern you can pass to gem only checks for gems beginning with that
name ... There are other such inconveniences, like "gem help" telling me
I need "gem help commands" to see all of them. I'd expect "gem help" or
"gem --help" telling my that. I there weren't the examples, "gem help"
by itself would only be another help pointer .. not that helpful :/

Now I thought, before installing the gem and I located it already with
the above grep command, I wanted to have more details. So since I cannot
pass a pattern to gem which matches anywhere in it's name, only from the
beginning, I thought I just fetch all of it.

Didn't realize there where sooooo many. I didn't knew all the links you
posted (especially gemcuttter.org and ruby-toolbox), for me it was just
the "gem" tool available and I thought I'd use it more or less like I
use e.g. aptitude/dpkg/apt-cache search and friends (where I seldom
visited the Debian project web page). It seems it doesn't maintain a
local package cache dir from the remote site(s?).

As it stands now, it's just a matter for me to realize what "gem" and
it's objective is and what it isn't. Guess that has been cleared up for
some points ;-)

thanks,
- Markus
 
N

Nick Klauer

[Note: parts of this message were removed to make it a legal post.]

Apologies for sounding snarky. I didn't intend to. Don't forget that gem
search is a way to search gem listings as well (and saves you typing the
pipe to grep)

gem search -r <gemName>

And if you want some more details besides just --details,

gem spec -r <gemName>

but I'd lean on those other sites (especially Ruby Toolbox, that site
rocks). There's also podcasts that try to round up the latest goings-on in
the Ruby community:


- Ruby5 - http://ruby5.envylabs.com/
- Ruby Show - http://rubyshow.com/



-Nick Klauer
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,962
Messages
2,570,134
Members
46,690
Latest member
MacGyver

Latest Threads

Top