0

I have a Sinatra service which includes a gem. The gem contains some static content which I would like to include in and serve via the Sinatra app.

In Rails this would be done with ActionDispatch. Here is an example: http://jonswope.com/2010/07/25/rails-3-engines-plugins-and-static-assets/

Is there a way to do this in Sinatra without ActionDispatch? Or is there a clean way to do it via ActionDispatch in Sinatra?

johnmartirano
  • 415
  • 4
  • 9

1 Answers1

0

Sinatra is Rack Applications. An easy way to serve static files is with Rack::Static. More examples in this SO question.

Community
  • 1
  • 1
Pablo Castellazzi
  • 4,164
  • 23
  • 20