Sinatra and Rails. Was: [ANN] Sinatra 1.1 released!

E

Ed Howland

Great news. I love me some Sinatra!

Sorry, if this is OT, but since you mentioned it in the original post,
and maybe this should go to the Rails list...

Why would Sinatra and Rails need to co-exist? I get that they are both
Rack apps, but is Sinatra acting like a kind of Rack middle-ware?

I am currently working on a project that is using both of them
(sinatra gem bundled with app), but I don't currently understand the
relationship. Can Sinatra intercept HTTP requests or does Rails route
certain urls to Sinatra.

Also, if we have upgraded to Rails 3.0, should we also update to Sinatra 1.1?

Just trying to get the community opinion on why they need to be compatible.

Cheers,
Ed

Ed Howland
http://greenprogrammer.wordpress.com
http://twitter.com/ed_howland
 
K

Konstantin H.

Ed Howland wrote in post #957033:
Can Sinatra intercept HTTP requests or does Rails route
certain urls to Sinatra.
Both. You can use Sinatra as Rack middleware in front of your app, a
single controller, etc. Or you can use your Sinatra app as a Rack
endpoint in your Rails app (i.e. you serve API pages from the same
process, but with Sinatra, since it is faster).
Also, if we have upgraded to Rails 3.0, should we also update to Sinatra
1.1?
You only have to if you are using Sinatra in the same process as Rails
and hooked in after the Rails router. You should also upgrade if you are
planning to use Ruby 1.9.2. The upgrade should be rather pain free (1.0
apps should just work on 1.1).

Konstantin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top