Posts tagged sinatra

Feb15

Sinatra::Base,the modular app, me and this stupid blog post title

sinatra modular | comments

Did you ever dreamed with Modular Apps on Sinatra? Me too!

After all building a ‘bare bones’ Sinatra web app is quit simple, let’s see…

First we need to read about the difference about Sinatra and Sinatra::Base

Continue reading »

Dec14

Sinatra on Dreamhost

sinatra dreamhost tilt | comments

This is the raw howto install Sinatra 1.0 on Dreamhost.

At this momento, there are some issues with Tilt version used on Sinatra 1.1.0 that Dreamhost Passenger is complaining, so thats why I’m using Sinatra 1.0.

Continue reading »

Apr27

Getting your hands dirty modeling data with OpenStruct

OpenStruct sinatra | comments

Sometimes building data structures is the way to go when you need to add some configuration structure logic to your application.

There is no need to install any OpenStruct gem. it is built into Ruby Standard Library.

Continue reading »

Apr15

Rufus Scheduler for my tiny Sinatra Apps

sinatra scheduler | comments

This note is about scheduling tasks deep inside your Ruby script || Sinatra || Rails App.

This gem is so cool because it’s very simple to use and you don’t need to mess up with your system crontab…

Continue reading »

Mar01

logging

sinatra | comments

Lets log everything (well almost we will try :O)

Under your config.ru

log = File.new("sinatra.log", "a+")
$stdout.reopen(log)
$stderr.reopen(log)

and under your app.rb (or /lib/app.rb)

Continue reading »