gem install doesn't work but work with Gemfile made by bundler

Donghwan Kim's Avatar

Donghwan Kim

19 Oct, 2013 03:46 PM

I'm newbie to ruby, and have tried to install pygments.rb for jekyll. Here is log for gem env and gem install something. OS is Windows 8 Pro 64 bit.

C:\Users\Donghwan\Documents\GitHub> gem env
RubyGems Environment:
  - RUBYGEMS VERSION: 2.1.7
  - RUBY VERSION: 1.9.3 (2013-06-27 patchlevel 448) [i386-mingw32]
  - INSTALLATION DIRECTORY: D:/development/ruby/Ruby193/lib/ruby/gems/1.9.1
  - RUBY EXECUTABLE: D:/development/ruby/Ruby193/bin/ruby.exe
  - EXECUTABLE DIRECTORY: D:/development/ruby/Ruby193/bin
  - SPEC CACHE DIRECTORY: C:/Users/Donghwan/.gem/specs
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86-mingw32
  - GEM PATHS:
     - D:/development/ruby/Ruby193/lib/ruby/gems/1.9.1
     - C:/Users/Donghwan/.gem/ruby/1.9.1
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - https://rubygems.org/
  - SHELL PATH:
     - C:\Users\Donghwan\AppData\Local\GitHub\PortableGit_015aa71ef18c047ce8509ffb2f9e4bb0e3e73f13\cmd
     - C:\Users\Donghwan\AppData\Local\GitHub\PortableGit_015aa71ef18c047ce8509ffb2f9e4bb0e3e73f13\bin
     - C:\Users\Donghwan\AppData\Local\Apps\2.0\CW4GJ5NW.VHL\9J463RGM.Q69\gith..tion_317444273a93ac29_0001.0002_b51370e7
f1965214
     - C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319
     - D:\development\python\Python27
     - D:\development\python\Python27\Scripts
     - C:\Program Files (x86)\Wizvera\Delfino
     - C:\WINDOWS\system32
     - C:\WINDOWS
     - C:\WINDOWS\System32\Wbem
     - C:\WINDOWS\System32\WindowsPowerShell\v1.0\
     - D:\development\java\jdk-7u40-windows-x64\bin
     - D:\development\maven\apache-maven-3.1.1\bin
     - D:\development\ruby\Ruby193\bin

C:\Users\Donghwan\Documents\GitHub> gem install pygments.rb --version "=0.5.0" --debug
Exception `Errno::EEXIST' at D:/development/ruby/Ruby193/lib/ruby/1.9.1/fileutils.rb:247 - File exists - C:/Users/Donghw
an/.gem/specs/rubygems.org%443
Exception `Errno::ENOENT' at D:/development/ruby/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/remote_fetcher.rb:287 - No su
ch file or directory - C:/Users/Donghwan/.gem/specs/rubygems.org%443/specs.4.8
Exception `OpenSSL::SSL::SSLError' at D:/development/ruby/Ruby193/lib/ruby/1.9.1/openssl/buffering.rb:174 - read would b
lock
Exception `OpenSSL::SSL::SSLError' at D:/development/ruby/Ruby193/lib/ruby/1.9.1/openssl/buffering.rb:174 - read would b
lock
Exception `OpenSSL::SSL::SSLError' at D:/development/ruby/Ruby193/lib/ruby/1.9.1/openssl/buffering.rb:174 - read would b
lock
Exception `Interrupt' at D:/development/ruby/Ruby193/lib/ruby/1.9.1/net/protocol.rb:143 -
ERROR: Interrupted
Terminate batch job (Y/N)?
^CC:\Users\Donghwan\Documents\GitHub>
C:\Users\Donghwan\Documents\GitHub>

You can see what I installed from the shell path from gem env. The interesting point is I installed it successfully through bundler.

With the following Gemfile:

# A sample Gemfile
source "https://rubygems.org"

# gem "github-pages"
gem "pygments.rb", "0.5.0"

I ran 'bundle install' and found the pygments.rb is installed by running gem list. I'm suspicious of the bundler since I installed it using 'gem install bundler' successfully. But, because I installed many things like devkit for ruby, python, easy-install for python, rubygem(update) after doing that, I'm not sure.

Thanks in advance,

-- Donghwan

  1. Support Staff 1 Posted by Eric Hodel on 19 Oct, 2013 05:57 PM

    Eric Hodel's Avatar

    Why did you cancel the install?

    When you run with --debug all exceptions raised are shown, you probably wanted --verbose.

  2. 2 Posted by Donghwan Kim on 19 Oct, 2013 06:40 PM

    Donghwan Kim's Avatar

    Ah... I canceled it since so many exceptions are logged and thought
    something goes wrong. Without --debug and with --verbose, it seems that the
    gem is installed well though there is an error with rdoc and test resource.
    Oh my god, I should have waited with patience.

    Thanks,

    C:\Users\Donghwan\Documents\GitHub> gem install pygments.rb --version
    "=0.5.0"
    Successfully installed pygments.rb-0.5.0
    unable to convert "\xE9" from ASCII-8BIT to UTF-8 for
    vendor/pygments-main/tests/examplefiles/example.cpp, skipping

    RDoc::Parser::Ruby failure around line 1 of
    vendor/pygments-main/tests/examplefiles/ruby_func_def.rb

    Before reporting this, could you check that the file you're documenting
    has proper syntax:

      D:/development/ruby/Ruby193/bin/ruby.exe -c
    vendor/pygments-main/tests/examplefiles/ruby_func_def.rb

    RDoc is not a full Ruby parser and will fail when fed invalid ruby programs.

    The internal error was:

            (NoMethodError) undefined method `name' for
    #<RDoc::RubyToken::TkLPAREN:0x7775ad8>

    ERROR: While executing gem ... (NoMethodError)
        undefined method `name' for #<RDoc::RubyToken::TkLPAREN:0x7775ad8>
    C:\Users\Donghwan\Documents\GitHub>

  3. Support Staff 3 Posted by Eric Hodel on 19 Oct, 2013 10:12 PM

    Eric Hodel's Avatar

    If you run bundler like ruby -d -S bundle you will see similar exception messages, as that is what debug mode is for.

    For the rdoc error, please file a report at the rdoc issue tracker

  4. Eric Hodel closed this discussion on 19 Oct, 2013 10:12 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac