Reputation: 1463
Upon cloning my first Rails 3.1.1 app, my first bundle install choked on the eventmachine 0.12.10 gem. (I'm running Windows 7 32 bit)
I'm also using gem 'thin' as well.
I found this post that had the same problem.
Which version of eventmachine is able to work in windows?
Which I integrated with this line in my gemfile:
gem "eventmachine", ">= 1.0.0.beta"
That allowed the bundle install to run but when I start the rails server I get a Ruby popup with the header ruby.exe - System Error and the text
The program can't start because libgcc_s_sjlj-1.dll is missing from your computer. Try reinstalling the program to fix this problem.
After I click OK I get this message in the console
Unable to load the EventMachine C extension; To use the pure-ruby reactor, require 'em/pure_ruby'
followed by a long stack trace (request to see if you think this will help).
I see that EventMachine gem requires a C++ compiler. I reinstalled MinGW on my 32 bit Windows 7 machine and I added MinGW\bin to my PATH variable.
But when I look into that bin folder, the file libgcc_s_sjlj-1.dll isn't there and the same error message persists. I found this thread about the lack of that folder from 2009 but I'm not really sure what to do about it.
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=539033
Thanks for any help you can give me.
Upvotes: 5
Views: 2478
Reputation: 51
I solved this problem by adding
require "em/pure_ruby"
in the config/application.rb
Hope this could help.
Upvotes: 5
Reputation: 61
This is probably because eventmachine is dynamically linked to the mingw dlls.
You can:
require 'devkit'
on the top of your script. This will temporarily enhance your path with the path to the mingw devkit.
Upvotes: 0
Reputation: 762
Add this to your gem file
gem 'eventmachine', '1.0.0.beta.4.1'
Also note that if you switch back to a unix based OS, you will have to use 1.0.0.beta.4
.
Upvotes: 0