Top "Sinatra" questions

Sinatra is a Domain Specific Language (DSL) for quickly creating web applications in Ruby with minimal effort.

Set default content_type for Sinatra

In Sinatra, is it possible to make content_type 'application/json' the default? cause I'm writing an api.

ruby json sinatra content-type
File upload with Sinatra

I am trying to be able to upload files with Sinatra. I have the code here, but I'm getting the …

ruby file-upload sinatra paperclip
In Sinatra(Ruby), how should I create global variables which are assigned values only once in the application lifetime?

In Sinatra, I'm unable to create global variables which are assigned values only once in the application lifetime. Am I …

ruby web-applications sinatra
How do I set HTTP Headers in Ruby/Sinatra app, hosted on Heroku?

I've got a working app based in Ruby and Sinatra that is deployed on Heroku. I want to take advantage …

ruby http-headers heroku sinatra varnish
Is Sinatra multi threaded?

Is Sinatra multi-threaded? I read else where that "sinatra is multi-threaded by default", what does that imply? Consider this example …

ruby sinatra
What's the best way to talk to a database while using Sinatra?

As I understand it, the Sinatra framework, unlike Rails, does not provide an ORM. In that case, how do you …

ruby database orm sinatra
Ruby Sinatra Webservice running on localhost:4567 but not on IP

I have a ruby(using sinatra) webservice on windows 7 32 bit OS. Its running on port 4567. Its working fine when I …

ruby-on-rails ruby web-services sinatra webrick
How to raise a custom error code in sinatra?

I did the following in my sinatra app: disable :show_exceptions disable :raise_errors error do haml :error, :locals => {:…

ruby error-handling sinatra
Undefined method `bytesize' for #<Hash>

I'd like to store and update blogger labels to datastore in GAE. When I run that code, I get this …

ruby google-app-engine jruby sinatra
"CSRF detected" with Omniauth and Google

I'm getting this OmniAuth::Strategies::OAuth2::CallbackError at /auth/google/callback csrf_detected | CSRF detected My code: require 'sinatra' require "…

ruby oauth-2.0 sinatra omniauth