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:
  - 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
    - ruby
    - x86-mingw32
     - D:/development/ruby/Ruby193/lib/ruby/gems/1.9.1
     - C:/Users/Donghwan/.gem/ruby/1.9.1
     - :update_sources => true
     - :verbose => true
     - :backtrace => false
     - :bulk_threshold => 1000
     - 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
     - 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
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/
Exception `OpenSSL::SSL::SSLError' at D:/development/ruby/Ruby193/lib/ruby/1.9.1/openssl/buffering.rb:174 - read would b
Exception `OpenSSL::SSL::SSLError' at D:/development/ruby/Ruby193/lib/ruby/1.9.1/openssl/buffering.rb:174 - read would b
Exception `OpenSSL::SSL::SSLError' at D:/development/ruby/Ruby193/lib/ruby/1.9.1/openssl/buffering.rb:174 - read would b
Exception `Interrupt' at D:/development/ruby/Ruby193/lib/ruby/1.9.1/net/protocol.rb:143 -
ERROR: Interrupted
Terminate batch job (Y/N)?

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 ""

# 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.


    C:\Users\Donghwan\Documents\GitHub> gem install pygments.rb --version
    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

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

      D:/development/ruby/Ruby193/bin/ruby.exe -c

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

    The internal error was:

            (NoMethodError) undefined method `name' for

    ERROR: While executing gem ... (NoMethodError)
        undefined method `name' for #<RDoc::RubyToken::TkLPAREN:0x7775ad8>

  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


? 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