Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Rails 3 can mount Sinatra applications [#4478]
Ruby JavaScript
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
app
config
db
doc
lib/tasks
public
script
test
vendor/plugins
.gitignore
Gemfile
README.textile
Rakefile
config.ru

README.textile

git clone git@github.com:rizwanreza/sinatra-rails.git

bundle install

rails server

Go to: http://localhost:3000/sinatra or http://localhost:3000/sinatra/world etc.

Routes

  class SinatraApp < Sinatra::Base

    get '/sinatra' do
      "Hello from SinatraApp"
    end

    get '/sinatra/world' do
      "Hello World"
    end

    get '/sinatra/hello' do
      "Once again, Hello World!"
    end
  end

  SinatraRails::Application.routes.draw do |map|
    match '/sinatra(/:string)' => SinatraApp
  end
Something went wrong with that request. Please try again.