Posts

Showing posts with the label HTTP request

Using Sinatra :A Web App Development Library(Part l)

Image
Ruby is blessed with several web application frameworks such as Ruby on Rails , Merb , Nitro,  Camping and Sinatra.Many of us might have heard about Ruby on Rails ,In simple words, Sinatra is an alternative to it and the other frameworks mentioned above.Sinatra was designed and developed by Blake Mizerany in 2007 and named after musician Frank Sinatra. In this article we'll learn about : i.   Installing and Setting up Sinatra ii.  Handling the HTTP Request Prerequisites:  One Must Know Ruby to proceed further. So let's begin : Installing and Setting up Sinatra:   i.  Open the Terminal. ii.   Type "gem install sinatra" without " ". Voila! The gem got install.Now its time to Test it.So, for this we will create  file named "app.rb" and type: require "sinatra" #to use the sinatra module and run the app by typing "ruby /directory_name/app.rb" without ""  and then go t...