Installing any gems fails!

I’m still a bit of a n00b. :slight_smile:

I’ve tried this on both Ruby 1.8.7 and 1.9.3 and result is identical. I
need to install a specific gem (bewildr) but when I try it I get this:

C:\Ruby187\bin>gem install bewildr
Fetching: bewildr-0.1.14.gem (100%)
ERROR: While executing gem … (Errno::EINVAL)
Invalid argument - "c:

C:\Ruby187\bin>gem update --system
Updating rubygems-update
Fetching: rubygems-update-1.8.17.gem (100%)
ERROR: While executing gem … (Errno::EINVAL)
Invalid argument - "c:

Any ideas on how to fix it? It happens on 2 different computers so
either there is a bug somewhere or I’m doing something wrong.

Eugene A. wrote in post #1049652:

I’m still a bit of a n00b. :slight_smile:

I’ve tried this on both Ruby 1.8.7 and 1.9.3 and result is identical. I
need to install a specific gem (bewildr) but when I try it I get this:

C:\Ruby187\bin>gem install bewildr
Fetching: bewildr-0.1.14.gem (100%)
ERROR: While executing gem … (Errno::EINVAL)
Invalid argument - "c:

It seems one environment variable is affecting RubyGems to work
properly.

There is a similar entry on RubyInstaller wiki:

https://github.com/oneclick/rubyinstaller/wiki/Troubleshooting#wiki-network_drive_home

Which is caused by setting a network drive as home.

Can you verify what are the values of the following variables?

SET HOME
SET HOMEDRIVE
SET HOMEPATH
SET USERPROFILE
SET RUBYOPT

And post it back?

That will help us help you better.


Luis L.

Luis L. wrote in post #1049659:

It seems one environment variable is affecting RubyGems to work
properly.

There is a similar entry on RubyInstaller wiki:

https://github.com/oneclick/rubyinstaller/wiki/Troubleshooting#wiki-network_drive_home

Which is caused by setting a network drive as home.

Can you verify what are the values of the following variables?

SET HOME
SET HOMEDRIVE
SET HOMEPATH
SET USERPROFILE
SET RUBYOPT

And post it back?

That will help us help you better.


Luis L.

Thanks for your response, Luis. Here are the values:

C:\Program Files (x86)\IronRuby 1.1\Lib\ruby\1.9.1\rubygems>SET HOME
HOMEDRIVE=C:
HOMEPATH=\Users\HST

C:\Program Files (x86)\IronRuby 1.1\Lib\ruby\1.9.1\rubygems>set
homedrive
HOMEDRIVE=C:

C:\Program Files (x86)\IronRuby 1.1\Lib\ruby\1.9.1\rubygems>set homepath
HOMEPATH=\Users\HST

C:\Program Files (x86)\IronRuby 1.1\Lib\ruby\1.9.1\rubygems>set
userprofile
USERPROFILE=C:\Users\HST

C:\Program Files (x86)\IronRuby 1.1\Lib\ruby\1.9.1\rubygems>set rubyopt
Environment variable rubyopt not defined

All but one of these appear normal, no? The only one is rubyopt which I
should probably define at some point.

Uninstall your Ruby and try rvm to manage your Ruby and gems

Rafal Z. - Ruby Dev: www.amidev.co.uk

Rafal Z. wrote in post #1049693:

Uninstall your Ruby and try rvm to manage your Ruby and gems

Rafal Z. - Ruby Dev: www.amidev.co.uk

I’m using Windows 7. RVM doesn’t work on Windows afaik.

Thanks for the advice, Bryan. I’m well aware of Linux and used Ubuntu,
CentoOS, RHEL and SLES previously. Unfortunately Linux is not an option
here as I’m going to be testing an app written using WPF in .NET. I wish
it was an option though, I’d much rather use Linux. Pik is nice but it’s
over 2 years old by now. I wonder why the development stopped?

I figured out what I needed to do using Ironruby instead.

Well there’s your problem; you’re using Windows. :stuck_out_tongue: Actually, you have
three options.

  1. Install Linux - While Windows 7 is a terrific OS (no sarcasm
    intended), Linux is just a better OS for development. With the
    all powerful terminal and a host of terrific, terminal-base
    development tools you couldn’t ask for more.

  2. Install cygwin - The benefit of this method is not only do
    you get to use RVM, but you also get all the great tools that
    come with Linux. Such as: gcc, vim, and bash (or zsh or whatever
    you prefer).

  3. Install pik - I actually have no experience with this, but
    the RVM FAQ mentions this as an alternative for Windows.
    You’ll need to read the README (no, really?) to figure out how to
    use it.

If you’re serious about programming, I would recommend going with option
one. Linux is one of the best OS’s out there and it is great for
serious developers. The only downside about Linux is your mouse (or
touchpad) might stop working due to dust from not using it. Did I scare
you there? :stuck_out_tongue:

Note: Yes, I know Linux is not an OS but a kernel. :stuck_out_tongue: Just throwing
this out for all you OCD (like me) people…

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs