I encountered this issue:
gabriele # osiris { ~ } [ ven nov 15 ] [ 12:57 ]
> jekyll
/var/lib/gems/1.8/gems/highline-1.6.19/lib/highline/system_extensions.rb:210: warning: Insecure world writable dir /home/gabriele in PATH, mode 040777
/var/lib/gems/1.8/gems/commander-4.1.3/lib/commander/runner.rb:365:in `require_program': program version required (Commander::Runner::CommandError)
from /var/lib/gems/1.8/gems/commander-4.1.3/lib/commander/runner.rb:364:in `each'
from /var/lib/gems/1.8/gems/commander-4.1.3/lib/commander/runner.rb:364:in `require_program'
from /var/lib/gems/1.8/gems/commander-4.1.3/lib/commander/runner.rb:52:in `run!'
from /var/lib/gems/1.8/gems/commander-4.1.3/lib/commander/delegates.rb:7:in `run!'
from /var/lib/gems/1.8/gems/commander-4.1.3/lib/commander/import.rb:10
from /usr/local/bin/jekyll:19
/usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require': no such file to load -- json (LoadError)
from /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in `require'
from /var/lib/gems/1.8/gems/jekyll-1.3.0/bin/../lib/jekyll/filters.rb:2
from /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
from /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in `require'
from /var/lib/gems/1.8/gems/jekyll-1.3.0/bin/../lib/jekyll.rb:43
from /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
from /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in `require'
from /var/lib/gems/1.8/gems/jekyll-1.3.0/bin/jekyll:7
from /usr/local/bin/jekyll:19:in `load'
from /usr/local/bin/jekyll:19
after I've installed jekyll on Ubuntu 12.04 with
sudo apt-get install ruby1.9.1-dev && sudo gem install jekyll
This is my gem env:
RubyGems Environment:
- RUBYGEMS VERSION: 1.8.15
- RUBY VERSION: 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]
- INSTALLATION DIRECTORY: /var/lib/gems/1.8
- RUBY EXECUTABLE: /usr/bin/ruby1.8
- EXECUTABLE DIRECTORY: /usr/local/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-linux
- GEM PATHS:
- /var/lib/gems/1.8
- /home/gabriele/.gem/ruby/1.8
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- http://rubygems.org/
How can i solve it?
Running gem install json should fix the LoadError.
Commander throws that program version required error whenever there is a problem loading in the executable (in this case, bin/jekyll). As 1.8.7 can't load an internal json library (introduced in 1.9), you'll need to install the gem.
Related
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'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 have a simple script:
require 'rubygems'
require 'mechanize'
p 'Success!'
When I run the script, I get:
/Users/.../.rvm/rubies/ruby-1.9.3-p385/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- mechanize.rb (LoadError)
from /Users/.../.rvm/rubies/ruby-1.9.3-p385/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from test.rb:2:in `<main>'
In desperation I installed RVM and updated ruby from system 1.8.7. Yet I am still getting the same error as before I installed rvm. I am now running:
mute:nfg ..$ ruby -v
ruby 1.9.3p385 (2013-02-06 revision 39114) [x86_64-darwin10.8.0]
irb reports the same:
1.9.3p385 :001 > require 'rubygems'
=> false
1.9.3p385 :002 > require 'mechanize'
LoadError: cannot load such file -- mechanize
from /Users/../.rvm/rubies/ruby-1.9.3-p385/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /Users/../.rvm/rubies/ruby-1.9.3-p385/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from (irb):2
from /Users/../.rvm/rubies/ruby-1.9.3-p385/bin/irb:16:in `<main>'
I have re-installed mechanize, using sudo and without, several times from the project directory.
I have tried manually requiring the gem, along with its full path.
mute:nfg ..$ ruby -l ~/.gems/gems/mechanize-2.5.1/lib/mechanize.rb
/Users/../.rvm/rubies/ruby-1.9.3-p385/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- mime/types (LoadError)
from /Users/../.rvm/rubies/ruby-1.9.3-p385/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /Users/../.gems/gems/mechanize-2.5.1/lib/mechanize.rb:4:in `<main>'
(I have tried installing mime-types, too.)
RVM lists the gem fine:
mute:nfg ..$ rvm all do gem list
*** LOCAL GEMS ***
...
libxml-ruby (2.3.3, 1.1.2)
mechanize (2.5.1)
mime-types (1.21, 1.19)
...
As does gem:
mute:nfg ..$ gem list
*** LOCAL GEMS ***
...
libxml-ruby (2.3.3, 1.1.2)
mechanize (2.5.1)
mime-types (1.21, 1.19)
...
Curiously, the $GEM_PATHs ~/.rvm/gems/ruby-1.9.3-p385, ~/.rvm/gems/ruby-1.9.3-p385#global and ~/.rvm/gems/ruby-1.9.3-p385#project appear mostly empty (two gems in the first, none in either of the last). However, the GUI JewelleryBox confirms that all three gemsets contain Mechanize.
EDIT: Here is the result of gem env:
RubyGems Environment:
- RUBYGEMS VERSION: 1.8.25
- RUBY VERSION: 1.9.3 (2013-02-06 patchlevel 385) [x86_64-darwin10.8.0]
- INSTALLATION DIRECTORY: /Users/../.gems
- RUBY EXECUTABLE: /Users/../.rvm/rubies/ruby-1.9.3-p385/bin/ruby
- EXECUTABLE DIRECTORY: /Users/../.gems/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-darwin-10
- GEM PATHS:
- /Users/../.gems
- /Users/../.gem
- /usr/lib/ruby/gems/1.8
- /Library/Ruby/Gems/1.8
- /usr/bin
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- :sources => ["http://gems.rubyforge.org/", "http://gems.github.com"]
- "gemhome" => "/Users/../.gems"
- "gempath" => ["/Users/../.gem", "/usr/lib/ruby/gems/1.8", "/Library/Ruby/Gems/1.8", "/usr/bin"]
- REMOTE SOURCES:
- http://gems.rubyforge.org/
- http://gems.github.com
Can anyone help?
your environment is set to use custom paths for gems, this confuses rubygems as you install to places which are not available in PATH
run rvm get head and carefully read the outputs, it will warn you about entries in *gemrc that break rubygems / RVM
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
I'm working off these instructions: http://github.com/dcparker/ruby-gmail
From the home directory I do a standard install and good stuff happens:
Johnny-Goodmans-MacBook-Pro:gmail johnnygoodman$ sudo gem install ruby-gmail
Successfully installed ruby-gmail-0.2.1
1 gem installed
Installing ri documentation for ruby-gmail-0.2.1...
Installing RDoc documentation for ruby-gmail-0.2.1...
I head over to my ~/www dir where I run scripts that include other rubygems successfully and create a gmail directory. I create a script that includes rubygems and gmail, but does nothing else:
Johnny-Goodmans-MacBook-Pro:gmail johnnygoodman$ pwd
/Users/johnnygoodman/www/gmail
Johnny-Goodmans-MacBook-Pro:gmail johnnygoodman$ ls
test-send.rb
Johnny-Goodmans-MacBook-Pro:gmail johnnygoodman$ cat test-send.rb
require 'rubygems'
require 'gmail'
I run this script and the errors begin:
Johnny-Goodmans-MacBook-Pro:gmail johnnygoodman$ ruby test-send.rb
/Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- mime/message (LoadError)
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require'
from /Library/Ruby/Gems/1.8/gems/ruby-gmail-0.2.1/lib/gmail/message.rb:1
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require'
from /Library/Ruby/Gems/1.8/gems/ruby-gmail-0.2.1/lib/gmail.rb:168
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:36:in `require'
from test-send.rb:2
Johnny-Goodmans-MacBook-Pro:gmail johnnygoodman$
Here's my gem env:
Johnny-Goodmans-MacBook-Pro:gmail johnnygoodman$ gem environment
RubyGems Environment:
- RUBYGEMS VERSION: 1.3.7
- RUBY VERSION: 1.8.7 (2009-06-08 patchlevel 173) [universal-darwin10.0]
- INSTALLATION DIRECTORY: /Library/Ruby/Gems/1.8
- RUBY EXECUTABLE: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
- EXECUTABLE DIRECTORY: /usr/bin
- RUBYGEMS PLATFORMS:
- ruby
- universal-darwin-10
- GEM PATHS:
- /Library/Ruby/Gems/1.8
- /Users/johnnygoodman/.gem/ruby/1.8
- /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- :sources => ["http://rubygems.org/", "http://gems.github.com"]
- REMOTE SOURCES:
- http://rubygems.org/
- http://gems.github.com
The path that the errors give when I run the script is not the same as the GEM PATHS given in the env output. However, I don't know how to make them match or if that's the significant thing here.
sudo gem install mime
the problem with the Asif solution is than mime/message is necessary for atach any file to the mail, if you comment this line u are unable do it