I read some instructions here
https://coderwall.com/p/fltw9q/use-thin-as-your-default-server-in-rails-app
gem install thin
<-- works for me
I add gem 'thin' into my Gemfile
bundle install
<-- works for me
(so this question is not the same as a similar one where bundle install didn't work)
I then tried thin s
or thin start
C:\rubytest\paramstest1>thin s
Unable to load the EventMachine C extension; To use the pure-ruby reactor, require 'em/pure_ruby'
Unable to load the EventMachine C extension; To use the pure-ruby reactor, require 'em/pure_ruby'
C:/Ruby24-x64/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:120:in `require': cannot load such file -- 2.4/rubyeventm
from C:/Ruby24-x64/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:120:in `require'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/eventmachine-1.2.7-x64-mingw32/lib/rubyeventmachine.rb:2:in `<top (req
from C:/Ruby24-x64/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:133:in `require'
from C:/Ruby24-x64/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:133:in `rescue in require'
from C:/Ruby24-x64/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:40:in `require'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/eventmachine-1.2.7-x64-mingw32/lib/eventmachine.rb:8:in `<top (require
from C:/Ruby24-x64/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:133:in `require'
from C:/Ruby24-x64/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:133:in `rescue in require'
from C:/Ruby24-x64/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:40:in `require'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/thin-1.7.2/lib/thin.rb:7:in `<top (required)>'
from C:/Ruby24-x64/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:68:in `require'
from C:/Ruby24-x64/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:68:in `require'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/thin-1.7.2/bin/thin:5:in `<top (required)>'
from C:/Ruby24-x64/bin/thin:23:in `load'
from C:/Ruby24-x64/bin/thin:23:in `<main>'
I noticed another question from a guy that couldn't install thin, (Though his was on *nix rather than windows). Rails - cannot run app: Unable to load the EventMachine C extension; and an answer suggested adding an rb file that could be called event_machine.rb, and giving it this require line. require 'em/pure_ruby'
C:\rubytest\paramstest1\config\initializers>type event_machine.rb
require 'em/pure_ruby'
C:\rubytest\paramstest1\config\initializers>
It doesn't seem to many any difference, I still get that error
C:\rubytest\paramstest1>thin start
Unable to load the EventMachine C extension; To use the pure-ruby reactor, require 'em/pure_ruby'
An answer
Cannot install thin on windows
suggested
gem install eventmachine --pre
C:\rubytest\paramstest1>gem install eventmachine --pre
Successfully installed eventmachine-1.2.7-x64-mingw32
Parsing documentation for eventmachine-1.2.7-x64-mingw32
Done installing documentation for eventmachine after 2 seconds
1 gem installed
I might've had that one already anyway.
My gemfile has gem 'thin' and with or without gem 'eventmachine'
I try thin start
but get the same error
rails s
also gives that error now!