Reputation: 6088
I am trying to run a simple application with Sinatra and I am not able to install the reloader.
I tried with
gem install sinatra-contrib
and I have in my source file a line like this:
require "sinatra/reloader" if development?
and in my Gemfile
gem "sinatra-contrib", "~> "1.3.1"
gem 'sinatra-reloader'
and I get an error while trying to start the gem install sinatra-config
>gem install sinatra-contrib
ERROR: Error installing sinatra-contrib:
ERROR: Failed to build gem native extension.
C:/Ruby192/bin/ruby.exe extconf.rb
checking for rb_trap_immediate in ruby.h,rubysig.h... *** 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.`
I can't figure it out. And if I have the require "sinatra/reloader" if development?
line, it just won't work. There are not many things on the web about this. I know shotgun is not an option in Windows.
Upvotes: 2
Views: 2100
Reputation: 4796
I've had this error once. Here is the gist, check the comments under that. Basically, sinatra-contrib
depends on event machine
which is not good for Windows. Remove that dependency or install event machine
Upvotes: 2
Reputation: 726
The latest version of Sinatra reloader doesn't compile under Windows. You must install version 0.5 :
gem install sinatra-reloader -v 0.5.0
Upvotes: 1