Your SlideShare is downloading. ×
0
Getting started with sinatra
Getting started with sinatra
Getting started with sinatra
Getting started with sinatra
Getting started with sinatra
Getting started with sinatra
Getting started with sinatra
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Getting started with sinatra

2,339

Published on

Quick run through of getting started with the Sinatra micro web framework on Windows.

Quick run through of getting started with the Sinatra micro web framework on Windows.

Published in: Technology
1 Comment
0 Likes
Statistics
Notes
  • Be the first to like this

No Downloads
Views
Total Views
2,339
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
11
Comments
1
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Getting started with Sinatra on Windows
  • 2. Install RubyStack• Go to http://bitnami.org/stack/rubystack/• Click on the “Installer” button• Once the installer has finished downloading, run it.
  • 3. Install Sinatra• Open the Start Menu and find the RubyStack console – You can do this by typing “Use Bitnami RubyStack” in the search box on the start menu. – From the RubyStack console, type the following: • gem install sinatra • When I did this, it barfed on the docs for Sinatra. The important thing to see is “2 gems installed successfully”
  • 4. Create the Ruby file• From the RubyStack console, change directories to someplace you’ll remember – i.e. cd Users[your user name]Desktop• Create the file – touch sinatra-demo.rb
  • 5. Edit the file• notepad sinatra-demo.rb• Enter the following text (then save the file): require ‘rubygems’ require ‘sinatra’ get ‘/’ do “This is the sinatra demo page!” end
  • 6. Start Sinatra• From the RubyStack console: – ruby sinatra-demo.rb – Note the port number Sinatra starts under • Probably 4,5,6,7 (har, har)
  • 7. Open local host• Open a browser window, then type – localhost: + port number • i.e. localhost:4567• You should see:• “This is the sinatra demo page!”

×