Can't install gems (Windows)

I am unable to install any gems now on my Windows 7 machine running
Ruby 1.9.1. Earlier today I was updating a gem and it failed. Since
then, I can’t install or update ANY gems. I tried un/reinstalling ruby
with no luck. The error is:

ERROR: While executing gem… (Errno(EEXIST)
File exists - C:

On Jan 17, 7:27 pm, Sal [email protected] wrote:

I am unable to install any gems now on my Windows 7 machine running
Ruby 1.9.1. Earlier today I was updating a gem and it failed. Since
then, I can’t install or update ANY gems. I tried un/reinstalling ruby
with no luck. The error is:

ERROR: While executing gem… (Errno(EEXIST)
File exists - C:

Please, provide more information about your ruby installation and the
version of RubyGems being used.

(‘gem env’ will provide all that information)

Also, provide the complete output of the gem installation command with
debug and verbose mode turned on:

gem install foobar --debug -V

Paste the complete output.

Help us help you.

I don’t think you should be using 1.9.1 on windows to begin with. I’m a
windows system admin and it’s very difficult to begin to understand how
to build 1.9.1 from binaries. A lot of people, especially good people
like Luis and Roger have gone out of their way to work on a package that
is built around MinGW. For windows installations we’re pretty much
stuck with either a MinGW or cygwin.

First, Luis is correct that you need to supply all of the information
for your current ruby setup.

Personally, I would not use 1.9.1. A lot of people make the mistake in
wanting to use the latest and greatest and after awhile they realize the
difficulties with trying to find gems that are compiled not only for
their ruby environment but gems that include OS dependencies. With
1.9.1 you need to install gems based on those dependency checks.

So, you have a few options you should consider here.

If you are hell bent on developing with windows, then go to the 1.8.6
one-click installer, or move to netbeans 6.8 and jruby. You can’t use
Ruby EE (enterprise edition) on a windows environment so that’s not a
good option. While you could go with a 1.8.7 setup, you are probably
going to run into similar compiler issues, especially with windows 7.
And, if you are trying to use 64-bit, this is a whole other headache in
itself.

So, outlining your options here if you are bent on developing on
windows:

1.8.6 - One Click Installer (no headaches)
JRuby 1.4 - use Netbeans 6.8 IDE ( very few headaches)

OR, you can do the following:

Install VMWare or Virtualbox, create a linux distro for either CentOS
5.4 OR Ubuntu 9.x, and follow numerous threads for getting your
development going.

My setup is as follows:

I develop on Windows and on Linux (CentOS and Ubuntu). On Windows I
have Ruby 1.8.6, Ruby 1.9.1(ming…), Jruby 1.2 and 1.4. On my vmware I
run two distros (centos and ubuntu) and both of those distros use Ruby
EE (which is very fast and stable version 1.8.7) I also use netbeans
6.8 on linux and it runs fine after you set it up properly.

I know this might be a lot of information to take in, but I can think of
about 5 things off the top of my head and I bet Luis can to, on what has
gone wrong with your environment.

I’m willing to help you out if you need it.

  1. Where did you build your 1.9.1 binaries from?

Did you use this one?

  1. Add http://gems.github.com to your gem sources

  2. Run gem update.

  3. Run gem list and post your gems.

On Jan 18, 12:22 am, Sal [email protected] wrote:

  • RUBYGEMS PLATFORMS:
    • :bulk_threshold => 1000
      File exis
      ts - C:
      Exception `Errno::EEXIST’ at c:/Ruby/lib/ruby/1.9.1/fileutils.rb:219 -
      File exis
      ts - C:
      ERROR: While executing gem … (Errno::EEXIST)
      File exists - C:

[…]
Thank you guys so much. I appreciate nay assistance you can provide me!

Please change directory into one of the gem installation directories:

cd c:/Ruby/lib/ruby/gems/1.9.1

And try yo create a file there:

ruby -rfileutils -e “FileUtils.touch ‘foobar’”

Repeat the same process with the second directory shown by gem env (C:/
Users/Matt/.gem/ruby/1.9.1)

If you or Ruby cannot write to these directories, it will fail.

If you installed Ruby with administrative privileges and you’re not a
member of Administrator group, then you’re hitting a permission issue.

I would recommend setting GEM_HOME and GEM_PATH environment variables
to a different place (one that you have control) and try installation
again.

Also, please remove gemcutter from your gem sources:

gem sources -r http://gemcutter.org

As Gemcutter is now gems.rubyforge.org

Alpha B. wrote:

If you are hell bent on developing with windows, then go to the 1.8.6
one-click installer, or move to netbeans 6.8 and jruby. You can’t use
Ruby EE (enterprise edition) on a windows environment so that’s not a
good option. While you could go with a 1.8.7 setup, you are probably
going to run into similar compiler issues, especially with windows 7.
And, if you are trying to use 64-bit, this is a whole other headache in
itself.

Hopefully not to confuse the issue, but depending on one’s requirements
there are significant benefits from using 1.9.x or 1.9.2 on windows.

1.9.x provides, for the first time in FOREVER on windows ruby, a popen()
that only blocks its own thread, rather than the whole process.

And 1.9.2 provides Unicode path support on windows. (Last I checked,
Unicode path support was only partially implemented so far in 1.9.2,
but they’re working on it.)

Both a non-process-blocking popen() and Unicode path support are
critical
to my current application, so 1.9.2 is a must for me on Windows.

Thankfully, so far I’ve found it relatively simple to build ruby from
the command line using the Microsoft compiler. (Haven’t tried the MinGW
route, but I presume it’s at least as well-behaved.)

Regards,

Bill

On Jan 17, 10:38 pm, Alpha B. [email protected] wrote:

  1. Where did you build your 1.9.1 binaries from?

I am using the installer from Rubyforge.

I did what you suggested but when running list I still show no gems.
Weird…

I am using the latest ruby 1.9.1 windows installer.

gem env yields:

RubyGems Environment:

  • RUBYGEMS VERSION: 1.3.5
  • RUBY VERSION: 1.9.1 (2009-07-16 patchlevel 243) [i386-mingw32]
  • INSTALLATION DIRECTORY: c:/Ruby/lib/ruby/gems/1.9.1
  • RUBY EXECUTABLE: c:/Ruby/bin/ruby.exe
  • EXECUTABLE DIRECTORY: c:/Ruby/bin
  • RUBYGEMS PLATFORMS:
    • ruby
    • x86-mingw32
  • GEM PATHS:
    • c:/Ruby/lib/ruby/gems/1.9.1
    • C:/Users/Matt/.gem/ruby/1.9.1
  • GEM CONFIGURATION:
  • REMOTE SOURCES:

Any gem install fails, but for example here is the attempt to install
rails:

Exception NameError' at c:/Ruby/lib/ruby/site_ruby/1.9.1/rubygems/ command_manag er.rb:161 - uninitialized constant Gem::Commands::InstallCommand Exception Gem::LoadError’ at c:/Ruby/lib/ruby/site_ruby/1.9.1/
rubygems.rb:827 -
Could not find RubyGem test-unit (>= 0)

Exception Errno::EEXIST' at c:/Ruby/lib/ruby/1.9.1/fileutils.rb:243 - File exis ts - C:/Users/Matt/.gem/specs/gems.rubyforge.org%80 Exception Errno::EEXIST’ at c:/Ruby/lib/ruby/1.9.1/fileutils.rb:243 -
File exis
ts - C:/Users/Matt/.gem/specs/gemcutter.org%80
Exception Errno::ENOENT' at c:/Ruby/lib/ruby/1.9.1/fileutils.rb:243 - No such f ile or directory - C:/Users/Matt/.gem/specs/gemcutter.org%80/quick/ Marshal.4.8 Exception Errno::EEXIST’ at c:/Ruby/lib/ruby/1.9.1/fileutils.rb:243 -
File exis
ts - C:
Exception Errno::EEXIST' at c:/Ruby/lib/ruby/1.9.1/fileutils.rb:219 - File exis ts - C: ERROR: While executing gem ... (Errno::EEXIST) File exists - C: c:/Ruby/lib/ruby/1.9.1/fileutils.rb:243:in mkdir’
c:/Ruby/lib/ruby/1.9.1/fileutils.rb:243:in fu_mkdir' c:/Ruby/lib/ruby/1.9.1/fileutils.rb:217:in block (2 levels)
in mkdir_p’

    c:/Ruby/lib/ruby/1.9.1/fileutils.rb:215:in `reverse_each'
    c:/Ruby/lib/ruby/1.9.1/fileutils.rb:215:in `block in mkdir_p'
    c:/Ruby/lib/ruby/1.9.1/fileutils.rb:201:in `each'
    c:/Ruby/lib/ruby/1.9.1/fileutils.rb:201:in `mkdir_p'
    c:/Ruby/lib/ruby/site_ruby/1.9.1/rubygems/spec_fetcher.rb:

103:in fetch_ spec' c:/Ruby/lib/ruby/site_ruby/1.9.1/rubygems/spec_fetcher.rb: 72:in block i
n fetch’
c:/Ruby/lib/ruby/site_ruby/1.9.1/rubygems/spec_fetcher.rb:
71:in map' c:/Ruby/lib/ruby/site_ruby/1.9.1/rubygems/spec_fetcher.rb: 71:in fetch’
c:/Ruby/lib/ruby/site_ruby/1.9.1/rubygems/
dependency_installer.rb:99:in
find_gems_with_sources' c:/Ruby/lib/ruby/site_ruby/1.9.1/rubygems/ dependency_installer.rb:192:in find_spec_by_name_and_version’
c:/Ruby/lib/ruby/site_ruby/1.9.1/rubygems/
dependency_installer.rb:213:in
install' c:/Ruby/lib/ruby/site_ruby/1.9.1/rubygems/commands/ install_command.rb:11 8:in block in execute’
c:/Ruby/lib/ruby/site_ruby/1.9.1/rubygems/commands/
install_command.rb:11
5:in each' c:/Ruby/lib/ruby/site_ruby/1.9.1/rubygems/commands/ install_command.rb:11 5:in execute’
c:/Ruby/lib/ruby/site_ruby/1.9.1/rubygems/command.rb:257:in
invoke' c:/Ruby/lib/ruby/site_ruby/1.9.1/rubygems/command_manager.rb: 132:in pro
cess_args’
c:/Ruby/lib/ruby/site_ruby/1.9.1/rubygems/command_manager.rb:
102:in run ' c:/Ruby/lib/ruby/site_ruby/1.9.1/rubygems/gem_runner.rb:58:in run’
c:/Ruby/bin/gem:21:in `’

Thank you guys so much. I appreciate nay assistance you can provide me!

Sal wrote:

On Jan 17, 10:38�pm, Alpha B. [email protected] wrote:

  1. �Where did you build your 1.9.1 binaries from?

I am using the installer from Rubyforge.

I did what you suggested but when running list I still show no gems.
Weird…

I’ll build a new package with the one from Rubyforge on Win 7 and see if
I encounter any similar issues. Provide me a short list of gems you
were trying to install as well. I’ll post my results.

I have tried all of your suggestions and the problem persists. I was
able to write in those directories (not a permissions problem), and
changing the gem path/home yielded the same result.

I am really baffled as this WAS working yesterday until I had issues
with a gem called cucumber.

Any suggestions? I am really stumped here.

I know the post above is a long one but it was necessary to showcase
some of the problems a person may encounter on windows. However, it’s
all working fine with the same release that you are using.

My suggestions is for you to uninstall the current version of ruby you
are using and check your windows paths to ensure that no traces are left
of ruby or ruby 19.

Then download and install the latest ruby19 from the source I provided
(which is the same source you are using). Install the latest ruby19.
Download and install the latest devkit and unzip it and place it inside
C:\ruby19.

The directory structure will be such:

Directory of C:\Ruby19

01/18/2010 09:02 AM .
01/18/2010 09:02 AM …
01/18/2010 09:02 AM bin
01/18/2010 09:02 AM devkit
01/18/2010 08:28 AM doc
01/18/2010 08:28 AM include
04/11/2009 10:52 AM 304 INSTALL.txt
01/18/2010 08:28 AM lib
01/18/2010 08:28 AM share
01/18/2010 08:28 AM 126,093 unins000.dat
01/18/2010 08:26 AM 1,167,576 unins000.exe
01/18/2010 08:28 AM 20,709 unins000.msg
4 File(s) 1,314,682 bytes
8 Dir(s) 291,281,985,536 bytes free

Notice that the devkit is in the Ruby19 folder and the bin folder that
comes with the devkit is forceably copied over the Ruby19 bin which will
just add the contents into the bin directory.

Then, once you do this you can begin installing gems. Start with the
same ones I installed for starters and use the same options.

Always, always, always test your gems right after installation. You do
this by going to irb and then running a require “gemname” and if it’s
good it will show => true. If it’s bad it will show => false or give
you a lot of errors.

If you get a lot of errors like you saw I did with mongrel above, it
just needs to be built from source. With the devkit installed, you can
do just that.

Remember that when you need platform specific gems to declare it that
way:

gem install “gemname” --platform x86-mingw32

If you need to install from a particular source, then include all of it
like I did with mongrel.

The big question that you might ask me later on is how did I know to use
that particular gem source? Well go visit http://isitruby19.com and do
a search for the gem you want to download. People will give you the
info on what gems work and which gems don’t and in this case, mongrel
had a good build listed at the following gem source I provided above.

I hope this helps you isolate and fix your issues now.

I’ll build a new package with the one from Rubyforge on Win 7 and see if
I encounter any similar issues. Provide me a short list of gems you
were trying to install as well. I’ll post my results.

Thanks, but I ‘think’ I have it resolved. And…it WAS a permissions
issue. I realized that a “critical” windows 7 security update was
installed yesterday. Automatic updates was “magically” turned on again
for some reason.

After more digging, I noticed it had marked many of the directories in
my /User directory as read-only. After removing the read only
attribute I was able to install gems again. Gotta love Windows… I
would really like to know exactly what it did.

Thanks to all for your help!

  1. Downloaded Installer from (http://rubyforge.org/frs/?group_id=167)
    – rubyinstaller-1.9.1-p243-rc1.exe
  2. Right-click (run as administrator) and execute.
  3. Install Directory is Ruby19 and options for add/associate are
    checked.

Installation finished

C:\Users\Joel>ruby -v

ruby 1.9.1p243 (2009-07-16 revision 24175) [i386-mingw32]

C:\Users\Joel>path

PATH=C:\Ruby19\bin;C:\Program Files (x86)\Common Files\Business
Objects\3.0\bin
NOTES;C:\Program Files (x86)\Common Files\Business
Objects\3.0\bin\NOTES\DATA;
C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Ruby\bin;C:\mysql;C:
wamp\bin\mysql\mysql5.1.36\bin;C:\Tcl\bin;C:\zlib;C:\Program Files
(x86)\Git\cmd
;C:\Program Files (x86)\SWiSH
Studio2\burner;C:\Windows\System32\WindowsPowerShe
ll\v1.0;C:\OpenSSL;C:\OpenSSL\bin;C:\Program Files
(x86)\Java\jdk1.6.0_14\bin;
C:\Program Files (x86)\QuickTime\QTSystem;C:\Program Files
(x86)\Microsoft SQL
Server\90\Tools\binn;C:\Program Files (x86)\jruby-1.4.0\bin

Note that I use many different versions of Ruby so the new installation
does not remove the old ruby paths still set. This could create issues
later on but for now I’m going to leave everything the way it is.

C:\Users\Joel>gem env
RubyGems Environment:

  • RUBYGEMS VERSION: 1.3.5
  • RUBY VERSION: 1.9.1 (2009-07-16 patchlevel 243) [i386-mingw32]
  • INSTALLATION DIRECTORY: C:/Ruby19/lib/ruby/gems/1.9.1
  • RUBY EXECUTABLE: C:/Ruby19/bin/ruby.exe
  • EXECUTABLE DIRECTORY: C:/Ruby19/bin
  • RUBYGEMS PLATFORMS:
    • ruby
    • x86-mingw32
  • GEM PATHS:
    • C:/Ruby19/lib/ruby/gems/1.9.1
    • C:/Users/Joel/.gem/ruby/1.9.1
  • GEM CONFIGURATION:
  • REMOTE SOURCES:

Note that the sources are already set correctly. If they weren’t set,
I’d have added github.com manually.

C:\Users\Joel>gem list

*** LOCAL GEMS ***

No gems are listed.

Performing “gem update --system”

Updating RubyGems
Nothing to update

Performing “gem -v”
1.3.5

Okay, so far so good. Everything is fine so far.

(Installation of Gems commencing)

Installing Rails First

C:\Users\Joel>gem install rails
Successfully installed rake-0.8.7
Successfully installed activesupport-2.3.5
Successfully installed activerecord-2.3.5
Successfully installed rack-1.0.1
Successfully installed actionpack-2.3.5
Successfully installed actionmailer-2.3.5
Successfully installed activeresource-2.3.5
Successfully installed rails-2.3.5
8 gems installed
Installing ri documentation for rake-0.8.7…
Installing ri documentation for activesupport-2.3.5…
Installing ri documentation for activerecord-2.3.5…
Installing ri documentation for rack-1.0.1…
Installing ri documentation for actionpack-2.3.5…
Installing ri documentation for actionmailer-2.3.5…
Installing ri documentation for activeresource-2.3.5…
Installing ri documentation for rails-2.3.5…
Updating class cache with 0 classes…
Installing RDoc documentation for rake-0.8.7…
Installing RDoc documentation for activesupport-2.3.5…
Installing RDoc documentation for activerecord-2.3.5…
Installing RDoc documentation for rack-1.0.1…
Installing RDoc documentation for actionpack-2.3.5…
Installing RDoc documentation for actionmailer-2.3.5…
Installing RDoc documentation for activeresource-2.3.5…
Installing RDoc documentation for rails-2.3.5…

Installing Rack or you will receive an error when launching rails
because it’s not using the correct version.

C:\Users\Joel>gem install rack
Successfully installed rack-1.1.0
1 gem installed
Installing ri documentation for rack-1.1.0…
Updating class cache with 1030 classes…
Installing RDoc documentation for rack-1.1.0…

Installing Mongrel so I have an appropriate server, other than WEBrick.

C:\Users\Joel>gem install mongrel
Successfully installed gem_plugin-0.2.3
Successfully installed cgi_multipart_eof_fix-2.5.0
Successfully installed mongrel-1.1.5-x86-mingw32
3 gems installed
Installing ri documentation for gem_plugin-0.2.3…
Installing ri documentation for cgi_multipart_eof_fix-2.5.0…
Installing ri documentation for mongrel-1.1.5-x86-mingw32…
Updating class cache with 1035 classes…
Installing RDoc documentation for gem_plugin-0.2.3…
Installing RDoc documentation for cgi_multipart_eof_fix-2.5.0…
Installing RDoc documentation for mongrel-1.1.5-x86-mingw32…

Installing MySQL

C:\Users\Joel>gem install mysql
Successfully installed mysql-2.8.1-x86-mingw32
1 gem installed
Installing ri documentation for mysql-2.8.1-x86-mingw32…
Updating class cache with 1085 classes…
Installing RDoc documentation for mysql-2.8.1-x86-mingw32…

Performing some quick tests to make sure these gems are all compatible
since I didn’t provide platform dependencies (note that I’m using
64-bit).

C:\Users\Joel>gem list

*** LOCAL GEMS ***

actionmailer (2.3.5)
actionpack (2.3.5)
activerecord (2.3.5)
activeresource (2.3.5)
activesupport (2.3.5)
cgi_multipart_eof_fix (2.5.0)
gem_plugin (0.2.3)
mongrel (1.1.5)
mysql (2.8.1)
rack (1.1.0, 1.0.1)
rails (2.3.5)
rake (0.8.7)

C:\Users\Joel>irb
irb(main):001:0> require “mysql”
=> true
irb(main):002:0>

Mysql is fine…

C:\Users\Joel>irb
irb(main):001:0> require “rack”
=> true
irb(main):002:0>

Rack is fine…

C:\Users\Joel>irb
irb(main):001:0> require “mongrel”
C:/Ruby19/lib/ruby/gems/1.9.1/gems/mongrel-1.1.5-x86-mingw32/lib/http11.so:
[BUG
] Segmentation fault
ruby 1.9.1p243 (2009-07-16 revision 24175) [i386-mingw32]

– control frame ----------
c:0028 p:-13491064 s:0096 b:0096 l:000095 d:000095 TOP
c:0027 p:---- s:0094 b:0094 l:000093 d:000093 CFUNC :require
c:0026 p:0095 s:0090 b:0090 l:000089 d:000089 TOP
C:/Ruby19/lib/ruby/gems/1.9
.1/gems/mongrel-1.1.5-x86-mingw32/lib/mongrel.rb:12
c:0025 p:---- s:0088 b:0088 l:000087 d:000087 FINISH
c:0024 p:---- s:0086 b:0086 l:000085 d:000085 CFUNC :require
c:0023 p:0011 s:0082 b:0082 l:0002f4 d:0006cc EVAL (irb):1
c:0022 p:---- s:0080 b:0080 l:000079 d:000079 FINISH
c:0021 p:---- s:0078 b:0078 l:000077 d:000077 CFUNC :eval
c:0020 p:0027 s:0071 b:0071 l:000070 d:000070 METHOD
C:/Ruby19/lib/ruby/1.9.1/ir
b/workspace.rb:80
c:0019 p:0031 s:0064 b:0063 l:000062 d:000062 METHOD
C:/Ruby19/lib/ruby/1.9.1/ir
b/context.rb:218
c:0018 p:0030 s:0058 b:0058 l:00042c d:000057 BLOCK
C:/Ruby19/lib/ruby/1.9.1/ir
b.rb:149
c:0017 p:0037 s:0050 b:0050 l:000049 d:000049 METHOD
C:/Ruby19/lib/ruby/1.9.1/ir
b.rb:263
c:0016 p:0011 s:0045 b:0045 l:00042c d:000044 BLOCK
C:/Ruby19/lib/ruby/1.9.1/ir
b.rb:146
c:0015 p:0132 s:0041 b:0041 l:000024 d:000040 BLOCK
C:/Ruby19/lib/ruby/1.9.1/ir
b/ruby-lex.rb:244
c:0014 p:---- s:0038 b:0038 l:000037 d:000037 FINISH
c:0013 p:---- s:0036 b:0036 l:000035 d:000035 CFUNC :loop
c:0012 p:0009 s:0033 b:0033 l:000024 d:000032 BLOCK
C:/Ruby19/lib/ruby/1.9.1/ir
b/ruby-lex.rb:230
c:0011 p:---- s:0031 b:0031 l:000030 d:000030 FINISH
c:0010 p:---- s:0029 b:0029 l:000028 d:000028 CFUNC :catch
c:0009 p:0023 s:0025 b:0025 l:000024 d:000024 METHOD
C:/Ruby19/lib/ruby/1.9.1/ir
b/ruby-lex.rb:229
c:0008 p:0042 s:0022 b:0022 l:00042c d:00042c METHOD
C:/Ruby19/lib/ruby/1.9.1/ir
b.rb:145
c:0007 p:0011 s:0019 b:0019 l:0024ac d:000018 BLOCK
C:/Ruby19/lib/ruby/1.9.1/ir
b.rb:69
c:0006 p:---- s:0017 b:0017 l:000016 d:000016 FINISH
c:0005 p:---- s:0015 b:0015 l:000014 d:000014 CFUNC :catch
c:0004 p:0172 s:0011 b:0011 l:0024ac d:0024ac METHOD
C:/Ruby19/lib/ruby/1.9.1/ir
b.rb:68
c:0003 p:0039 s:0006 b:0006 l:001d4c d:0002cc EVAL
C:/Ruby19/bin/irb:12
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:0000 s:0002 b:0002 l:001d4c d:001d4c TOP

– Ruby level backtrace
information-----------------------------------------
C:/Ruby19/lib/ruby/gems/1.9.1/gems/mongrel-1.1.5-x86-mingw32/lib/mongrel.rb:12:i
n require' C:/Ruby19/lib/ruby/gems/1.9.1/gems/mongrel-1.1.5-x86-mingw32/lib/mongrel.rb:12:i n <top (required)>’
(irb):1:in require' (irb):1:in irb_binding’
C:/Ruby19/lib/ruby/1.9.1/irb/workspace.rb:80:in eval' C:/Ruby19/lib/ruby/1.9.1/irb/workspace.rb:80:in evaluate’
C:/Ruby19/lib/ruby/1.9.1/irb/context.rb:218:in evaluate' C:/Ruby19/lib/ruby/1.9.1/irb.rb:149:in block (2 levels) in eval_input’
C:/Ruby19/lib/ruby/1.9.1/irb.rb:263:in signal_status' C:/Ruby19/lib/ruby/1.9.1/irb.rb:146:in block in eval_input’
C:/Ruby19/lib/ruby/1.9.1/irb/ruby-lex.rb:244:in block (2 levels) in each_top_le vel_statement' C:/Ruby19/lib/ruby/1.9.1/irb/ruby-lex.rb:230:in loop’
C:/Ruby19/lib/ruby/1.9.1/irb/ruby-lex.rb:230:in block in each_top_level_stateme nt' C:/Ruby19/lib/ruby/1.9.1/irb/ruby-lex.rb:229:in catch’
C:/Ruby19/lib/ruby/1.9.1/irb/ruby-lex.rb:229:in
each_top_level_statement' C:/Ruby19/lib/ruby/1.9.1/irb.rb:145:in eval_input’
C:/Ruby19/lib/ruby/1.9.1/irb.rb:69:in block in start' C:/Ruby19/lib/ruby/1.9.1/irb.rb:68:in catch’
C:/Ruby19/lib/ruby/1.9.1/irb.rb:68:in start' C:/Ruby19/bin/irb:12:in

[NOTE]
You may encounter a bug of Ruby interpreter. Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html

This application has requested the Runtime to terminate it in an unusual
way.
Please contact the application’s support team for more information.

=======

Mongrel is not fine. Going to perform an uninstall of mongrel and try
dependencies…

C:\Users\Joel>gem uninstall mongrel
Remove executables:
mongrel_rails

in addition to the gem? [Yn] y
Removing mongrel_rails

You have requested to uninstall the gem:
mongrel-1.1.5-x86-mingw32
rack-1.0.1 depends on [mongrel (>= 0)]
rack-1.1.0 depends on [mongrel (>= 0)]
If you remove this gems, one or more dependencies will not be met.
Continue with Uninstall? [Yn] y
Successfully uninstalled mongrel-1.1.5-x86-mingw32

======

Reinstalling Mongrel

C:\Users\Joel>gem install mongrel --source http://gems.rubyinstaller.org
–platf
orm x86-ming32
Building native extensions. This could take a while…
ERROR: Error installing mongrel:
ERROR: Failed to build gem native extension.

C:/Ruby19/bin/ruby.exe extconf.rb
checking for main() in -lc… *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.

You have to install development tools first.

As you can see, a very long error appears with a nice message mixed into
it all saying I need to install development tools first. So, going to
install development tools.

So, I download the devkit from:

http://rubyforge.org/frs/download.php/66888/devkit-3.4.5r3-20091110.7z

I unzip it and read the install file and it says to move it to the same
level as the ruby installation.

So I force copy and paste the entire contents to:

C:\Ruby19 and it pastes over the bin, adding the appropriate contents
and the new devkit folder is in there as well.

I re-run the mongrel installation:

C:\Users\Joel>gem install mongrel --source http://gems.rubyinstaller.org
–platf
orm x86-ming32
Building native extensions. This could take a while…
Successfully installed mongrel-1.1.6
1 gem installed
Installing ri documentation for mongrel-1.1.6…
Updating class cache with 1050 classes…
Installing RDoc documentation for mongrel-1.1.6…

Boom - perfect!

Testing

C:\Users\Joel>irb
irb(main):001:0> require “mongrel”
=> true
irb(main):002:0>

Everything is now fine.

So, here’s the post notes. The reason why I forced a platform specific
to x86-ming32 and not mswin is because when you run gem env it tells you
the gem platform you are using. With this particular install I’m using
ming so that’s what I’ll build with.

Hopefully you using these instructions will get you going now in the
right area. Everything looks fine for me now, even with the post
install hiccups.

On Jan 18, 11:08 am, Alpha B. [email protected] wrote:

C:/Ruby19/lib/ruby/gems/1.9.1/gems/mongrel-1.1.5-x86-mingw32/lib/http11.so:
[BUG
] Segmentation fault
ruby 1.9.1p243 (2009-07-16 revision 24175) [i386-mingw32]

Mongrel is not fine. Going to perform an uninstall of mongrel and try
dependencies…

Mongrel 1.1.5 has not been prepared for 1.9.1. Even more, the binary
version do not support both 1.8 and 1.9

I’m working on a release of 1.1.6 that support these versions.

As for the issue related to the installation process, seems you
resolved the permission issue that was associated with the directory.

Next version of RubyInstaller (rc2) will not require admin privileges
even if you are a member of Administrator group with UAC high.

Regards,

even if you are a member of Administrator group with UAC high.

Regards,

Luis L.

Someone has released a patched version of mongrel 1.1.5 that will
compile its extensions against 1.9.1 just fine… the link is all over
the comments for mongrel on isitruby19.com, let me look real quick…

This one: gem install mongrel --source http://gems.rubyinstaller.org

Works great for me (just tested it against ruby 1.9.1 on cygwin… it
is a little slow as mongrel on windows tends to be for some reason,
I’ll have to try it on my linux box later)

-Jonathan N.

Hopefully you using these instructions will get you going now in the
right area. Everything looks fine for me now, even with the post
install hiccups.

Wow, thanks! I am going to need this because I want to use Mongrel!

Mongrel 1.1.5 has not been prepared for 1.9.1. Even more, the binary
version do not support both 1.8 and 1.9

I’m working on a release of 1.1.6 that support these versions.

Regards,

Hi Luis, as Jonathan pointed out and I did earlier in my thread, I’m
using 1.1.6 for Mongrel from the source I outlined. It works great and
it’s fully tested for 1.9.1.

Just an fyi…

On Sun, Jan 17, 2010 at 8:54 PM, Alpha B. [email protected] wrote:

1.8.6 - One Click Installer (no headaches)
JRuby 1.4 - use Netbeans 6.8 IDE ( very few headaches)

We would love to know what the few headaches are for JRuby. In my
estimation, it’s the easiest way by far to get Ruby running on
Windows, and we have recently spent a great deal of effort on
Windows-related issues in our bug tracker. Plus for libraries like
Mongrel or Hpricot, there’s no compile phase ever and if you need to
write fast “native” code, there are options like java-inline.

Support for Ruby 1.9 is a work in progress, but then so is Ruby 1.9 :slight_smile:

  • Charlie

On Jan 18, 2:20 pm, Jonathan N. [email protected] wrote:

Regards,

Luis L.

Someone has released a patched version of mongrel 1.1.5 that will
compile its extensions against 1.9.1 just fine… the link is all over
the comments for mongrel on isitruby19.com, let me look real quick…

This one: gem install mongrel --source http://gems.rubyinstaller.org

That ‘someone’ is me, so I’m pretty aware of that release and its
limitations :slight_smile:

That release was done as proof of concept, but should not be used as
production environment since lot of tests didn’t complete.

Works great for me (just tested it against ruby 1.9.1 on cygwin… it
is a little slow as mongrel on windows tends to be for some reason,
I’ll have to try it on my linux box later)

It will work, but again: I advise against it until official 1.1.6
release is made.

I’m working on it but JRuby parser is still giving me some issues.
Once that is ironed, expect an official release with 1.9 support.

Cheers,

OK, thanks for clarifying that 1.1.6. All I really knew about it was
it was a lot easier than patching 1.1.5 with all the RSTRING_PTRs and
whatever else like I did until I found that :slight_smile:

-Jonathan N.