Diary for Item Catalogue


bundler-site/sinatra.haml at master · bundler/bundler-site · GitHub

2015-02-06

Permalink Fetching contributors...Cannot retrieve contributors at this time%h2 Using Bundler with Sinatra.contents.bullet.descriptionLet's say you wanted to run the following Sinatra app.:code# lang: rubyclass MySinatraApp < Sinatra::Baseget "/" do"Hello Bundler"endend.bullet.descriptionTo use bundler with a Sinatra application, you only need to do two things. First, create a Gemfile.:code# lang: rubysource "rubygems.org"gem "sinatra", :require => "sinatra/base".bullet.descriptionThen, set up your config.ru file to load the bundle before it loads your Sinatra app.:code# lang: rubyrequire 'rubygems'require 'bundler'Bundler.requirerequire './my_sinatra_app'run MySinatraApp.bullet.descriptionStart your development server with rackup, and Sinatra will be loaded via Bundler.:code$ rackupJump to www.gaiaonline.com/journal/?mode=view&post_id=35948095&u=37706617 - frank sinatra - Line