ercycle.blogg.se

Download ruby hello world
Download ruby hello world






download ruby hello world

Sinatra's Intro doc is a great starting point. I love it because of its easy integration with Sequel, my favorite ORM, and HAML, which replaces ERB as the templating engine. Sinatra is really easy to work with, and makes a great prototyping and light-to-medium weight MVC-like server.

download ruby hello world

Open a new window in your browser, and go to: and you should see Hello World! in your browser window. INFO WEBrick::HTTPServer#start: pid=37898 port=4567:īy default Sinatra serves its pages at port=4567, but you can change it. After a few seconds you should see something like: = Sinatra/1.1.0 has taken the stage on 4567 for development with backup from WEBrick

download ruby hello world

Save this to a file called hi.rb: require 'sinatra'ĭrop to the command-line, and enter ruby hi.rb. Install the Sinatra gem along with its dependencies: `gem install sinatra` The sample is basically the same as the Sinatra folks have on the front page of their site. This is how to write a very simple "hello world" using Sinatra, which is a great way to bring up a Ruby-based website without using Rails.








Download ruby hello world