CSC/ECE 517 Fall 2013/ch1 1w12 vn

From Expertiza_Wiki
Revision as of 20:25, 16 September 2013 by Vsharma4 (talk | contribs)
Jump to navigation Jump to search

Introduction

Rails is an open-source web application framework which makes use of Ruby programming language. With its huge library of gems and support for MVC architecture, it provides an easy and clean approach for creating pages, talking to web server and dealing with databases. Debugging is always an important part of any application development for which Rails provides a tremendously good support despite being an interpreted language as opposed to C or Java or any other compiled language.

Debugging Options

Rails provides a range of options to make debugging easier. Some of these options have been discussed in the sections below.

Debug Helpers

One of the easiest ways to debug is to simply output the value of different variables which provides us the first look into what could be going wrong. This could be done in all of models, views and controllers. Rails provides three methods to achieve this task.

debug

to_yaml

inspect