I have a very weird issue and I am not sure what is the cause of that. I am trying to install some gems after installing JRuby. Whatever way (through scoop, manually, .exe file) I have used to install the JRuby I was not able to install any gem and the error I always get is the following:
ERROR: While executing gem ... (Errno::EACCES)
Permission denied - NUL
org/jruby/RubyIO.java:1255:in `sysopen'
org/jruby/RubyFile.java:362:in `initialize'
org/jruby/RubyClass.java:931:in `new'
org/jruby/RubyIO.java:1174:in `open'
C:/Users/kraptis91/scoop/apps/jruby/current/lib/ruby/stdlib/rubygems/resolver.rb:176:in `output'
C:/Users/kraptis91/scoop/apps/jruby/current/lib/ruby/stdlib/rubygems/resolver/molinillo/lib/molinillo/modules/ui.rb:41:in `after_resolution'
C:/Users/kraptis91/scoop/apps/jruby/current/lib/ruby/stdlib/rubygems/resolver/molinillo/lib/molinillo/resolution.rb:232:in `end_resolution'
C:/Users/kraptis91/scoop/apps/jruby/current/lib/ruby/stdlib/rubygems/resolver/molinillo/lib/molinillo/resolution.rb:187:in `resolve'
C:/Users/kraptis91/scoop/apps/jruby/current/lib/ruby/stdlib/rubygems/resolver/molinillo/lib/molinillo/resolver.rb:43:in `resolve'
C:/Users/kraptis91/scoop/apps/jruby/current/lib/ruby/stdlib/rubygems/resolver.rb:190:in `resolve'
C:/Users/kraptis91/scoop/apps/jruby/current/lib/ruby/stdlib/rubygems/request_set.rb:411:in `resolve'
C:/Users/kraptis91/scoop/apps/jruby/current/lib/ruby/stdlib/rubygems/dependency_installer.rb:333:in `resolve_dependencies'
C:/Users/kraptis91/scoop/apps/jruby/current/lib/ruby/stdlib/rubygems/commands/install_command.rb:201:in `install_gem'
C:/Users/kraptis91/scoop/apps/jruby/current/lib/ruby/stdlib/rubygems/commands/install_command.rb:226:in `block in install_gems'
org/jruby/RubyArray.java:1988:in `each'
C:/Users/kraptis91/scoop/apps/jruby/current/lib/ruby/stdlib/rubygems/commands/install_command.rb:219:in `install_gems'
C:/Users/kraptis91/scoop/apps/jruby/current/lib/ruby/stdlib/rubygems/commands/install_command.rb:167:in `execute'
C:/Users/kraptis91/scoop/apps/jruby/current/lib/ruby/stdlib/rubygems/command.rb:323:in `invoke_with_build_args'
C:/Users/kraptis91/scoop/apps/jruby/current/lib/ruby/stdlib/rubygems/command_manager.rb:185:in `process_args'
C:/Users/kraptis91/scoop/apps/jruby/current/lib/ruby/stdlib/rubygems/command_manager.rb:149:in `run'
C:/Users/kraptis91/scoop/apps/jruby/current/lib/ruby/stdlib/rubygems/gem_runner.rb:51:in `run'
C:/Users/kraptis91/scoop/apps/jruby/current/bin/jgem:21:in `<main>'
org/jruby/RubyKernel.java:1091:in `load'
C:/Users/kraptis91/scoop/apps/jruby/current/bin/gem:4:in `<main>'
my gem environment:
RubyGems Environment:
- RUBYGEMS VERSION: 3.3.25
- RUBY VERSION: 3.1.0 (2022-11-23 patchlevel 0) [java]
- INSTALLATION DIRECTORY: C:/Users/kraptis91/scoop/apps/jruby/current/gems
- USER INSTALLATION DIRECTORY: C:\Users\kraptis91/.local/share/gem/jruby/3.1.0
- RUBY EXECUTABLE: C:/Users/kraptis91/scoop/apps/jruby/current/bin/jruby.exe
- GIT EXECUTABLE: C:\Program Files\Git\cmd/git.EXE
- EXECUTABLE DIRECTORY: C:/Users/kraptis91/scoop/apps/jruby/current/gems/bin
- SPEC CACHE DIRECTORY: C:\Users\kraptis91/.local/share/gem/specs
- SYSTEM CONFIGURATION DIRECTORY: C:/Users/kraptis91/scoop/apps/jruby/current/etc
- RUBYGEMS PLATFORMS:
- ruby
- universal-java-11
- GEM PATHS:
- C:/Users/kraptis91/scoop/apps/jruby/current/gems
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :backtrace => true
- :bulk_threshold => 1000
- "install" => "--env-shebang"
- "update" => "--env-shebang"
- "setup" => "--env-shebang"
- "pristine" => "--env-shebang"
- REMOTE SOURCES:
- https://rubygems.org/
- SHELL PATH:
- C:\WINDOWS\system32
- C:\WINDOWS
- C:\WINDOWS\System32\Wbem
- C:\WINDOWS\System32\WindowsPowerShell\v1.0\
- C:\Program Files\Intel\WiFi\bin\
- C:\Program Files\Common Files\Intel\WirelessCommon\
- C:\WINDOWS\System32\OpenSSH\
- C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR
- C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common
- C:\Program Files\dotnet\
- C:\Users\kraptis91\jdk-11.0.15+10\bin
- C:\Users\kraptis91\gradle-7.2\bin
- C:\Program Files\Git\cmd
- C:\Program Files\Docker\Docker\resources\bin
- C:\ProgramData\DockerDesktop\version-bin
- C:\Users\kraptis91\apache-maven-3.8.2\bin
- C:\Program Files\nodejs\
- C:\Program Files\Amazon\AWSCLIV2\
- C:\Program Files\PuTTY\
- C:\Users\kraptis91\scoop\apps\jruby\current\bin
- C:\Users\kraptis91\scoop\apps\jruby\current\gems\bin
- C:\Users\kraptis91\scoop\shims
- c:\jruby-9.3.4.0\bin
- C:\Program Files\Intel\WiFi\bin\
- C:\Program Files\Common Files\Intel\WirelessCommon\
- C:\Users\kraptis91\AppData\Local\Microsoft\WindowsApps
- C:\Users\kraptis91\AppData\Local\Programs\Microsoft VS Code\bin
- C:\Users\kraptis91\AppData\Roaming\npm
- C:\Users\kraptis91\AppData\Local\GitHubDesktop\bin
What I have already tried:
From what I have read this is maybe a permissions issue therefore I
tried to open a CMD as an administrator and attempt to install any
gem this way, but the issue persisted.
Related
When trying to execute my ruby script I receive the following error message
C:/Ruby24-x64/lib/ruby/2.4.0/rubygems/dependency.rb:308:in `to_specs': Could
not find 'rubyzip' (~> 1.0) among 14 total gem(s) (Gem::MissingSpecError)
Checked in 'GEM_PATH=C:/Users/me/.gem/ruby/2.4.0;C:/Ruby24-
x64/lib/ruby/gems/2.4.0', execute `gem env` for more information
from C:/Ruby24-x64/lib/ruby/2.4.0/rubygems/specification.rb:1442:in
`block in activate_dependencies'
from C:/Ruby24-x64/lib/ruby/2.4.0/rubygems/specification.rb:1431:in
`each'
from C:/Ruby24-x64/lib/ruby/2.4.0/rubygems/specification.rb:1431:in
`activate_dependencies'
from C:/Ruby24-x64/lib/ruby/2.4.0/rubygems/specification.rb:1413:in
`activate'
from C:/Ruby24-x64/lib/ruby/2.4.0/rubygems.rb:220:in `rescue in
try_activate'
from C:/Ruby24-x64/lib/ruby/2.4.0/rubygems.rb:213:in `try_activate'
from C:/Ruby24-
x64/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:126:in `rescue in
require'
from C:/Ruby24-
x64/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:40:in `require'
from setupscript.rb:2:in `<main>'
I run gem env and the following is returned
RubyGems Environment:
- RUBYGEMS VERSION: 2.6.11
- RUBY VERSION: 2.4.1 (2017-03-22 patchlevel 111) [x64-mingw32]
- INSTALLATION DIRECTORY: C:/Ruby24-x64/lib/ruby/gems/2.4.0
- USER INSTALLATION DIRECTORY: C:/Users/me/.gem/ruby/2.4.0
- RUBY EXECUTABLE: C:/Ruby24-x64/bin/ruby.exe
- EXECUTABLE DIRECTORY: C:/Ruby24-x64/bin
- SPEC CACHE DIRECTORY: C:/Users/me/.gem/specs
- SYSTEM CONFIGURATION DIRECTORY: C:/ProgramData
- RUBYGEMS PLATFORMS:
- ruby
- x64-mingw32
- GEM PATHS:
- C:/Ruby24-x64/lib/ruby/gems/2.4.0
- C:/Users/me/.gem/ruby/2.4.0
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :backtrace => false
- :bulk_threshold => 1000
- :sources => []
- REMOTE SOURCES:
- SHELL PATH:
- C:\Program Files\ConEmu\ConEmu\Scripts
- C:\Program Files\ConEmu
- C:\Program Files\ConEmu\ConEmu
- C:\ProgramData\Oracle\Java\javapath
- C:\Windows\system32
- C:\Windows
- C:\Windows\System32\Wbem
- C:\Windows\System32\WindowsPowerShell\v1.0\
- C:\Program Files (x86)\Oracle\instantclient_11_2
- C:\Program Files (x86)\WebEx\Productivity Tools
- C:\Program Files\nodejs\
- C:\Program Files (x86)\Silk\SilkTest
- C:\Program Files (x86)\Silk\SilkTest\ng\gui
- C:\Program Files\Microsoft SQL Server\130\Tools\Binn\
- C:\Program Files\dotnet\
- C:\Ruby24-x64\bin
C:\Users\me\AppData\Local\Microsoft\WindowsApps,C:\Users\me\Documents\Automation\SeleniumBrowserDrivers\IEDriverServer_Win32_3.4.0\
- C:\Users\me\AppData\Local\Programs\Fiddler
- C:\Users\me\AppData\Roaming\npm"
My script is the sample ruby script on seleniumhq page.
require 'rubygems'
require 'selenium-webdriver'
driver = Selenium::WebDriver.for :IE
driver.get "http://google.com"
element = driver.find_element :name => "q"
element.send_keys "Cheese!"
element.submit
puts "Page title is #{driver.title}"
wait = Selenium::WebDriver::Wait.new(:timeout => 10)
wait.until { driver.title.downcase.start_with? "cheese!" }
puts "Page title is #{driver.title}"
driver.quit
Thanks,
Scott
For some reason I was unable to install rubyzip. I needed to
download the gem into my system
navigate to the folder
execute gem install --force --local *.gem
When I did the above steps the gem was installed.
Hello and thanks for your help in advance.
I'm having trouble installing Jekyll because I receive the following error:
ERROR: While executing gem ... (Errno::EINVAL)
Invalid argument
This is slightly different than the question already posted, here I've also followed all of those recommendations but nothing is working.
Current xCode version: 8
Current Ruby version: ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin15]
Here is the backtrace of the install:
Lisas-MBP:gems LMS$ gem install jekyll --backtrace
ERROR: While executing gem ... (Errno::EINVAL)
Invalid argument
/usr/local/Cellar/ruby/2.3.1_1/lib/ruby/2.3.0/resolv.rb:672:in `clock_gettime'
/usr/local/Cellar/ruby/2.3.1_1/lib/ruby/2.3.0/resolv.rb:672:in `request'
/usr/local/Cellar/ruby/2.3.1_1/lib/ruby/2.3.0/resolv.rb:531:in `block in fetch_resource'
/usr/local/Cellar/ruby/2.3.1_1/lib/ruby/2.3.0/resolv.rb:1103:in `block (3 levels) in resolv'
/usr/local/Cellar/ruby/2.3.1_1/lib/ruby/2.3.0/resolv.rb:1101:in `each'
/usr/local/Cellar/ruby/2.3.1_1/lib/ruby/2.3.0/resolv.rb:1101:in `block (2 levels) in resolv'
/usr/local/Cellar/ruby/2.3.1_1/lib/ruby/2.3.0/resolv.rb:1100:in `each'
/usr/local/Cellar/ruby/2.3.1_1/lib/ruby/2.3.0/resolv.rb:1100:in `block in resolv'
/usr/local/Cellar/ruby/2.3.1_1/lib/ruby/2.3.0/resolv.rb:1098:in `each'
/usr/local/Cellar/ruby/2.3.1_1/lib/ruby/2.3.0/resolv.rb:1098:in `resolv'
/usr/local/Cellar/ruby/2.3.1_1/lib/ruby/2.3.0/resolv.rb:522:in `fetch_resource'
/usr/local/Cellar/ruby/2.3.1_1/lib/ruby/2.3.0/resolv.rb:512:in `each_resource'
/usr/local/Cellar/ruby/2.3.1_1/lib/ruby/2.3.0/resolv.rb:493:in `getresource'
/usr/local/Cellar/ruby/2.3.1_1/lib/ruby/2.3.0/rubygems/remote_fetcher.rb:99:in `api_endpoint'
/usr/local/Cellar/ruby/2.3.1_1/lib/ruby/2.3.0/rubygems/source.rb:47:in `api_uri'
/usr/local/Cellar/ruby/2.3.1_1/lib/ruby/2.3.0/rubygems/source.rb:86:in `dependency_resolver_set'
/usr/local/Cellar/ruby/2.3.1_1/lib/ruby/2.3.0/rubygems/resolver/best_set.rb:24:in `block in pick_sets'
/usr/local/Cellar/ruby/2.3.1_1/lib/ruby/2.3.0/rubygems/source_list.rb:98:in `each'
/usr/local/Cellar/ruby/2.3.1_1/lib/ruby/2.3.0/rubygems/source_list.rb:98:in `each_source'
/usr/local/Cellar/ruby/2.3.1_1/lib/ruby/2.3.0/rubygems/resolver/best_set.rb:23:in `pick_sets'
/usr/local/Cellar/ruby/2.3.1_1/lib/ruby/2.3.0/rubygems/resolver/best_set.rb:29:in `find_all'
/usr/local/Cellar/ruby/2.3.1_1/lib/ruby/2.3.0/rubygems/resolver/installer_set.rb:152:in `find_all'
/usr/local/Cellar/ruby/2.3.1_1/lib/ruby/2.3.0/rubygems/resolver/installer_set.rb:55:in `add_always_install'
/usr/local/Cellar/ruby/2.3.1_1/lib/ruby/2.3.0/rubygems/dependency_installer.rb:474:in `resolve_dependencies'
/usr/local/Cellar/ruby/2.3.1_1/lib/ruby/2.3.0/rubygems/commands/install_command.rb:239:in `install_gem'
/usr/local/Cellar/ruby/2.3.1_1/lib/ruby/2.3.0/rubygems/commands/install_command.rb:300:in `block in install_gems'
/usr/local/Cellar/ruby/2.3.1_1/lib/ruby/2.3.0/rubygems/commands/install_command.rb:296:in `each'
/usr/local/Cellar/ruby/2.3.1_1/lib/ruby/2.3.0/rubygems/commands/install_command.rb:296:in `install_gems'
/usr/local/Cellar/ruby/2.3.1_1/lib/ruby/2.3.0/rubygems/commands/install_command.rb:203:in `execute'
/usr/local/Cellar/ruby/2.3.1_1/lib/ruby/2.3.0/rubygems/command.rb:308:in `invoke_with_build_args'
/usr/local/Cellar/ruby/2.3.1_1/lib/ruby/2.3.0/rubygems/command_manager.rb:169:in `process_args'
/usr/local/Cellar/ruby/2.3.1_1/lib/ruby/2.3.0/rubygems/command_manager.rb:139:in `run'
/usr/local/Cellar/ruby/2.3.1_1/lib/ruby/2.3.0/rubygems/gem_runner.rb:55:in `run'
/usr/local/bin/gem:21:in `<main>'
Here is my gem env
Lisas-MBP:Code LMS$ gem env
RubyGems Environment:
- RUBYGEMS VERSION: 2.5.1
- RUBY VERSION: 2.3.1 (2016-04-26 patchlevel 112) [x86_64-darwin15]
- INSTALLATION DIRECTORY: /usr/local/lib/ruby/gems/2.3.0
- USER INSTALLATION DIRECTORY: /Users/LMS/.gem/ruby/2.3.0
- RUBY EXECUTABLE: /usr/local/opt/ruby/bin/ruby
- EXECUTABLE DIRECTORY: /usr/local/bin
- SPEC CACHE DIRECTORY: /Users/LMS/.gem/specs
- SYSTEM CONFIGURATION DIRECTORY: /usr/local/Cellar/ruby/2.3.1_1/etc
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-darwin-15
- GEM PATHS:
- /usr/local/lib/ruby/gems/2.3.0
- /Users/LMS/.gem/ruby/2.3.0
- /usr/local/Cellar/ruby/2.3.1_1/lib/ruby/gems/2.3.0
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- https://rubygems.org/
- SHELL PATH:
- /Library/Frameworks/Python.framework/Versions/3.4/bin
- /Library/Frameworks/Python.framework/Versions/3.4/bin
- /Library/Frameworks/Python.framework/Versions/3.5/bin
- /Library/Frameworks/Python.framework/Versions/3.5/bin
- /opt/local/bin
- /opt/local/sbin
- /usr/local/bin
- /usr/local/bin
- /usr/bin
- /bin
- /usr/sbin
- /sbin
- /user/local/bin
- /Users/LMS/.rvm/bin
- /Applications/Postgres.app/Contents/Versions/9.4/bin
I'm able to successfully install jekyll on my Mac but I'm not using system Ruby. I'd highly recommend using RBEnv to manage your Ruby installation on OSX. You'll find it much easier to work with than trying to deal with the system version or the Brew version. With it you can swap out Ruby versions easily and gem management is simpler.
Thanks for all the responses.
I ended up uninstalling ruby and re-installing it.
Then I started getting other issues, but new issues are good!
And this finally fixed it.
sudo gem install -n /usr/local/bin/ jekyll
Now I'm running ruby 2.0. Hope this helps, let me know if anyone has any questions!
I have installed ruby -v 2.2.4 (64x) on Windows 10 from it's official website. The setup completed successfully, but ruby isn't able to require gems. Whenever I run the following command from IRB:
require 'minitest'
It fails with the output:
LoadError: cannot load such file --
from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in
'require'
from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in
'require'
from (irb):1
from C:/Ruby22-x64/bin/irb:11:in '< main>'
Gem list:
bigdecimal (1.2.6)
io-console (0.4.3)
json (1.8.1)
minitest (5.4.3)
power_assert (0.2.2)
psych (2.0.8)
rake (10.4.2)
rdoc (4.2.0)
test-unit (3.0.8)
RubyGems Environment:
- RUBYGEMS VERSION: 2.4.5.1
- RUBY VERSION: 2.2.4 (2015-12-16 patchlevel 230) [i386-mingw32]
- INSTALLATION DIRECTORY: C:/Ruby22/lib/ruby/gems/2.2.0
- RUBY EXECUTABLE: C:/Ruby22/bin/ruby.exe
- EXECUTABLE DIRECTORY: C:/Ruby22/bin
- SPEC CACHE DIRECTORY: C:/Users/alexl/.gem/specs
- SYSTEM CONFIGURATION DIRECTORY: C:/ProgramData
- RUBYGEMS PLATFORMS:
- ruby
- x86-mingw32
- GEM PATHS:
- C:/Ruby22/lib/ruby/gems/2.2.0
- C:/Users/alexl/.gem/ruby/2.2.0
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- https://rubygems.org/
- SHELL PATH:
- C:\Users\alexl\bin
- C:\Program Files\Git\mingw64\bin
- C:\Program Files\Git\usr\local\bin
- C:\Program Files\Git\usr\bin
- C:\Program Files\Git\usr\bin
- C:\Program Files\Git\mingw64\bin
- C:\Program Files\Git\usr\bin
- C:\Users\alexl\bin
- C:\ProgramData\Oracle\Java\javapath
- C:\Windows\system32
- C:\Windows
- C:\Windows\System32\Wbem
- C:\Windows\System32\WindowsPowerShell\v1.0
- C:\Program Files (x86)\Skype\Phone
- C:\HashiCorp\Vagrant\bin
- C:\Program Files (x86)\EaseUS\Todo Backup\bin
- C:\wamp\bin\php\php5.6.15
- C:\ProgramData\ComposerSetup\bin
- C:\Ruby22\bin
- C:\Users\alexl\AppData\Local\atom\bin
- C:\Program Files\Git\usr\bin\vendor_perl
- C:\Program Files\Git\usr\bin\core_perl
I have googled around for some time, but could not find any useful information about resolving this issue.
Edit 1
I have uninstalled the x64 version and installed the x86 one. The error still persists
I'm using Linux Mint. I've already installed jruby and jdk.
When I check ruby version it gives me correct message
ruby -v
jruby 1.7.11 (1.9.3p392) 2014-02-24 86339bb on Java HotSpot(TM) Server VM 1.8.0_05-b13 +indy [linux-i386]
But when I try to install some gems like this:
gem install bundler
It gives me this message:
ERROR: While executing gem ... (SocketError)
recv: name or service not known
which jruby
/home/msdc/.rvm/rubies/jruby-1.7.11/bin/jruby
which gem
/home/msdc/.rvm/rubies/jruby-1.7.11/bin/gem
gem env
RubyGems Environment:
- RUBYGEMS VERSION: 2.2.2
- RUBY VERSION: 1.9.3 (2014-02-24 patchlevel 392) [java]
- INSTALLATION DIRECTORY: /home/msdc/.rvm/gems/jruby-1.7.11
- RUBY EXECUTABLE: /home/msdc/.rvm/rubies/jruby-1.7.11/bin/jruby
- EXECUTABLE DIRECTORY: /home/msdc/.rvm/gems/jruby-1.7.11/bin
- SPEC CACHE DIRECTORY: /home/msdc/.gem/specs
- RUBYGEMS PLATFORMS:
- ruby
- universal-java-1.8
- GEM PATHS:
- /home/msdc/.rvm/gems/jruby-1.7.11
- /home/msdc/.rvm/gems/jruby-1.7.11#global
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :backtrace => false
- :bulk_threshold => 1000
- "install" => "--no-rdoc --no-ri --env-shebang"
- "update" => "--no-rdoc --no-ri --env-shebang"
- REMOTE SOURCES:
- https://rubygems.org/
- SHELL PATH:
- /home/msdc/.rvm/gems/jruby-1.7.11/bin
- /home/msdc/.rvm/gems/jruby-1.7.11#global/bin
- /home/msdc/.rvm/rubies/jruby-1.7.11/bin
- /usr/local/sbin
- /usr/local/bin
- /usr/sbin
- /usr/bin
- /sbin
- /bin
- /usr/games
- /home/msdc/bin
- /usr/local/java/jdk1.8.0_05/bin
- /home/msdc/bin
- /usr/local/java/jdk1.8.0_05/jre/bin
- /home/msdc/bin
- /usr/local/java/jdk1.8.0_05/bin
- /home/msdc/bin
- /usr/local/java/jdk1.8.0_05/jre/bin
- /home/msdc/.rvm/bin
When I run gem install bundler in debug mode it gives me this:
/home/msdc/.rvm/rubies/jruby-1.7.11/lib/ruby/1.9/resolv.rb:775:in `recv_reply'
/home/msdc/.rvm/rubies/jruby-1.7.11/lib/ruby/1.9/resolv.rb:663:in `request'
/home/msdc/.rvm/rubies/jruby-1.7.11/lib/ruby/1.9/resolv.rb:511:in `each_resource'
/home/msdc/.rvm/rubies/jruby-1.7.11/lib/ruby/1.9/resolv.rb:0:in `resolv'
org/jruby/RubyArray.java:1613:in `each'
/home/msdc/.rvm/rubies/jruby-1.7.11/lib/ruby/1.9/resolv.rb:1026:in `resolv'
org/jruby/RubyArray.java:1613:in `each'
/home/msdc/.rvm/rubies/jruby-1.7.11/lib/ruby/1.9/resolv.rb:1025:in `resolv'
org/jruby/RubyArray.java:1613:in `each'
/home/msdc/.rvm/rubies/jruby-1.7.11/lib/ruby/1.9/resolv.rb:1023:in `resolv'
/home/msdc/.rvm/rubies/jruby-1.7.11/lib/ruby/1.9/resolv.rb:503:in `each_resource'
/home/msdc/.rvm/rubies/jruby-1.7.11/lib/ruby/1.9/resolv.rb:480:in `getresource'
/home/msdc/.rvm/rubies/jruby-1.7.11/lib/ruby/shared/rubygems/remote_fetcher.rb:88:in `api_endpoint'
/home/msdc/.rvm/rubies/jruby-1.7.11/lib/ruby/shared/rubygems/source.rb:42:in `api_uri'
/home/msdc/.rvm/rubies/jruby-1.7.11/lib/ruby/shared/rubygems/source.rb:170:in `load_specs'
/home/msdc/.rvm/rubies/jruby-1.7.11/lib/ruby/shared/rubygems/spec_fetcher.rb:265:in `tuples_for'
/home/msdc/.rvm/rubies/jruby-1.7.11/lib/ruby/shared/rubygems/spec_fetcher.rb:226:in `available_specs'
org/jruby/RubyArray.java:1613:in `each'
/home/msdc/.rvm/rubies/jruby-1.7.11/lib/ruby/shared/rubygems/source_list.rb:97:in `each_source'
/home/msdc/.rvm/rubies/jruby-1.7.11/lib/ruby/shared/rubygems/spec_fetcher.rb:222:in `available_specs'
/home/msdc/.rvm/rubies/jruby-1.7.11/lib/ruby/shared/rubygems/spec_fetcher.rb:102:in `search_for_dependency'
/home/msdc/.rvm/rubies/jruby-1.7.11/lib/ruby/shared/rubygems/dependency_installer.rb:216:in `find_gems_with_sources'
/home/msdc/.rvm/rubies/jruby-1.7.11/lib/ruby/shared/rubygems/dependency_installer.rb:292:in `find_spec_by_name_and_version'
/home/msdc/.rvm/rubies/jruby-1.7.11/lib/ruby/shared/rubygems/dependency_installer.rb:166:in `available_set_for'
/home/msdc/.rvm/rubies/jruby-1.7.11/lib/ruby/shared/rubygems/dependency_installer.rb:418:in `resolve_dependencies'
/home/msdc/.rvm/rubies/jruby-1.7.11/lib/ruby/shared/rubygems/dependency_installer.rb:371:in `install'
/home/msdc/.rvm/rubies/jruby-1.7.11/lib/ruby/shared/rubygems/commands/install_command.rb:219:in `install_gem'
/home/msdc/.rvm/rubies/jruby-1.7.11/lib/ruby/shared/rubygems/commands/install_command.rb:263:in `install_gems'
org/jruby/RubyArray.java:1613:in `each'
/home/msdc/.rvm/rubies/jruby-1.7.11/lib/ruby/shared/rubygems/commands/install_command.rb:259:in `install_gems'
/home/msdc/.rvm/rubies/jruby-1.7.11/lib/ruby/shared/rubygems/commands/install_command.rb:171:in `execute'
/home/msdc/.rvm/rubies/jruby-1.7.11/lib/ruby/shared/rubygems/command.rb:305:in `invoke_with_build_args'
/home/msdc/.rvm/rubies/jruby-1.7.11/lib/ruby/shared/rubygems/command_manager.rb:167:in `process_args'
/home/msdc/.rvm/rubies/jruby-1.7.11/lib/ruby/shared/rubygems/command_manager.rb:137:in `run'
/home/msdc/.rvm/rubies/jruby-1.7.11/lib/ruby/shared/rubygems/gem_runner.rb:54:in `run'
/home/msdc/.rvm/rubies/jruby-1.7.11/bin/jgem:21:in `(root)'
org/jruby/RubyKernel.java:1101:in `load'
/home/msdc/.rvm/rubies/jruby-1.7.11/bin/gem:4:in `(root)'
Exception `Gem::SystemExitException' at /home/msdc/.rvm/rubies/jruby-1.7.11/lib/ruby/shared/rubygems/user_interaction.rb:381 - Exiting RubyGems with exit_code 1
I'd suggest trying http://rubygems.org and seeing if that works. https should work, but at least then you'd know more precisely what the problem is. You'll probably find this config information in your ~/.gemrc file.
I installed ruby for windows and then rubygems but am getting the following error when trying to use rubygems to install bundler.
C:\Users\tgandrews\Ruby\rubygems-1.8.24>gem install bundler --verbose --debug
Exception `NameError' at C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/command_manager.rb:177 - uninitialized constant Gem::Commands::InstallCommand
Exception `Errno::ENOENT' at C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/spec_fetcher.rb:54 - No such file or directory - Z:/
ERROR: While executing gem ... (Errno::ENOENT)
No such file or directory - Z:/
C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/spec_fetcher.rb:54:in `stat'
C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/spec_fetcher.rb:54:in `initialize'
C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/spec_fetcher.rb:43:in `new'
C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/spec_fetcher.rb:43:in `fetcher'
C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/dependency_installer.rb:110:in `find_gems_with_sources'
C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/dependency_installer.rb:228:in `find_spec_by_name_and_version'
C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/dependency_installer.rb:259:in `install'
C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/commands/install_command.rb:121:in `block in execute'
C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/commands/install_command.rb:115:in `each'
C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/commands/install_command.rb:115:in `execute'
C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/command.rb:278:in `invoke'
C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/command_manager.rb:147:in `process_args'
C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/command_manager.rb:117:in `run'
C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/gem_runner.rb:65:in `run'
C:/Ruby193/bin/gem:30:in `<main>'
My gem env returns the following
C:\Users\tgandrews\Ruby\rubygems-1.8.24>gem env
RubyGems Environment:
- RUBYGEMS VERSION: 1.8.24
- RUBY VERSION: 1.9.3 (2012-04-20 patchlevel 194) [i386-mingw32]
- INSTALLATION DIRECTORY: C:/Ruby193/lib/ruby/gems/1.9.1
- RUBY EXECUTABLE: C:/Ruby193/bin/ruby.exe
- EXECUTABLE DIRECTORY: C:/Ruby193/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86-mingw32
- GEM PATHS:
- C:/Ruby193/lib/ruby/gems/1.9.1
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- http://rubygems.org/
This might be caused by a network drive and incorrect configuration of environment variables like HOME, HOMEDRIVE and/or HOMEPATH
Please see the following section of RubyInstaller troubleshooting section:
https://github.com/oneclick/rubyinstaller/wiki/Troubleshooting#wiki-network_drive_home