JGallardo JGallardo - 4 months ago 69
Ruby Question

ERROR: Could not find a valid gem 'sinatra/reloader' (>= 0) in any repository

I have never had a problem with Sinatra reloader. I added it in my .rb file like this

require 'sinatra/reloader' if development?


Even the documentation validates this
http://www.sinatrarb.com/contrib/reloader

But I am still getting the error

enter image description here

Answer

The problem is that sinatra/reloader is part of sinatra-contrib.

There are two ways to install this.

  1. If you're using bundler in your sinatra app, open your Gemfile and add this:

    gem 'sinatra-contrib'

  2. If not, then just install it manually gem install sinatra-contrib. Then require it on your project by adding require 'sinatra/reloader