manpreet@webdesignerintoronto.comToronto Based Ruby on Rails and AngularJS Developer

You can use the following ruby file to make your present working directory to be served over HTTP or in other words you can use WebBrick to serve your static HTML content.

Copy it in a ruby script, say server.rb, place it in the static HTML files you want to serve. Make the script executable using the following command:

chmod +x server.rb

and to run the following command to run the server:

./server.rb 9001

where 9001 is the port number you want to run it on.

Navigate your browser to the following URL:


http://localhost:9001/

Leave a Reply