JGallardo
JGallardo

Reputation: 11373

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

Upvotes: 1

Views: 1272

Answers (2)

user988558
user988558

Reputation:

There's no gem named "sinatra/reloader", but "sinatra-reloader": https://rubygems.org/gems/sinatra-reloader

Note: reloader is part of sinatra contrib which in turns has been merged upstream to https://github.com/sinatra/sinatra

Upvotes: 2

Finks
Finks

Reputation: 1681

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

Upvotes: 3

Related Questions