I am confused with installing a gem

Hi
When I tried to install ‘sexp’ gem for first time (with this statement :
‘gem install sexp’ ) ruby gives me an error but when for second time I
tried with the same statement ruby didn’t give me an error . Why ruby
behave such this ?

** I take a picture from steps that I tried to install that gem **

Short version: It installed fine, but one of the dependencies’ for the
sexp gem documentation didn’t compile correctly (the gem will still
work, just not the documentation).

Long version: The error you got has to do with documentation (rdoc)
generation. The sexp gem installed fine, there was just an error in
the documentation generation for rparsec, a dependency for the sexp
gem. The second time you tried to install it, gem didn’t try to
redownload anything because it was already installed, and it didn’t
regenerate the rdoc for anything except what you wanted to install.

I could be wrong, though.
~Andrew (@andrew12_ on Twitter)

Hi
I am encountering the same problem
using gem install classifier
it gave me an error first time i tried again same error it does that
with all gems i am trying to install
so do you whats the problem and how can i solve this?
Thanks

This is the error message that appears on the command prompt

C:\Users\User> gem install classifier
ERROR: Could not find a valid gem ‘classifier’ (>= 0) in any repository
ERROR: Possible alternatives: classifier

On Sep 20, 2011, at 14:19 , Aya A. wrote:

This is the error message that appears on the command prompt

C:\Users\User> gem install classifier
ERROR: Could not find a valid gem ‘classifier’ (>= 0) in any repository
ERROR: Possible alternatives: classifier

Works fine for me. Please make sure you have an updated version of
rubygems (looks like you have a new enough one given the alternatives
line). Networking, proxy, firewall, etc could also be causing
complications… See “–help” and maybe run with “–debug”.

10000 % gem i -i xxx classifier
Fetching: fast-stemmer-1.0.0.gem (100%)
Building native extensions. This could take a while…
Fetching: classifier-1.3.3.gem (100%)
Successfully installed fast-stemmer-1.0.0
Successfully installed classifier-1.3.3
2 gems installed
Installing ri documentation for fast-stemmer-1.0.0…
Installing ri documentation for classifier-1.3.3…
Installing RDoc documentation for fast-stemmer-1.0.0…
Installing RDoc documentation for classifier-1.3.3…
10001 % gem list -d -r classifier

*** REMOTE GEMS ***

classifier (1.3.3)
Author: Lucas Carlson
Homepage: http://classifier.rufy.com/

A general classifier module to allow Bayesian and other types of
classifications.

10003 % GEM_HOME=xxx gem spec classifier
— !ruby/object:Gem::Specification
name: classifier
version: !ruby/object:Gem::Version
hash: 29
prerelease:
segments:

  • 1
  • 3
  • 3
    version: 1.3.3
    platform: ruby
    authors:
  • Lucas Carlson
    autorequire: classifier
    bindir: bin
    cert_chain: []

date: 2010-07-06 00:00:00 Z
dependencies:

  • !ruby/object:Gem::Dependency
    name: fast-stemmer
    prerelease: false
    requirement: &id001 !ruby/object:Gem::Requirement
    none: false
    requirements:
      • “>=”
      • !ruby/object:Gem::Version
        hash: 23
        segments:
        • 1
        • 0
        • 0
          version: 1.0.0
          type: :runtime
          version_requirements: *id001
          description: " A general classifier module to allow Bayesian and other
          types of classifications.\n"
          email: [email protected]
          executables: []

extensions: []

extra_rdoc_files: []

files: []

homepage: http://classifier.rufy.com/
licenses: []

post_install_message:
rdoc_options: []

require_paths:

  • lib
    required_ruby_version: !ruby/object:Gem::Requirement
    none: false
    requirements:
      • “>=”
      • !ruby/object:Gem::Version
        hash: 3
        segments:
        • 0
          version: “0”
          required_rubygems_version: !ruby/object:Gem::Requirement
          none: false
          requirements:
      • “>=”
      • !ruby/object:Gem::Version
        hash: 3
        segments:
        • 0
          version: “0”
          requirements:
  • A porter-stemmer module to split word stems.
    rubyforge_project:
    rubygems_version: 1.8.10
    signing_key:
    specification_version: 3
    summary: A general classifier module to allow Bayesian and other types
    of classifications.
    test_files: []

yes its the latest verison i am pretty sure (also my ruby version is
1.9.2 if that might be the problem)
May i ask in which file did you put your gem

On Sep 20, 2011, at 22:13 , Aya A. wrote:

May i ask in which file did you put your gem

In which file? Gems are files that are unpacked into your gem directory.
I installed into a temporary directory for demonstration purposes only
via the “-i” flag. See ‘gem install -h’.

Aya A. wrote in post #1023050:

yes its the latest verison i am pretty sure (also my ruby version is
1.9.2 if that might be the problem)
May i ask in which file did you put your gem

To find out where gems are installed type gem list -d. This command
displays the complete list of gems or if you just want to find a
specific gem type gem list -d [name of gem]. If you are having an issue
with a gem try uninstalling it with gem uninstall [gem name] and then
install again.

Lb Tr wrote in post #1023230:

To find out where gems are installed type gem list -d.
No That is not the problem its command prompt cant find any gems i
downloaded therefore it cant install them