Posted by: chandanaa | October 2, 2009

Ruby on Rails Application

Creating basic Ruby on Rails application

Rails is a web application framework that uses Ruby Programming Language . It uses MVC ( Model, View, Controller ) architecture.

Model represents data of the application and handles data processings.

View is responsible for displaying the results of an action. There can be many different views in a web application, because web applications can display many different pages in the user’s browser.

Controller provides connectivity between model and view. The controller supervises the entire application, handling request as needed.

To create a simple rails application

1. open the terminal and type the command

$ rails tax

2. Now use the scaffold command.

$ script/generate scaffold detail name:string doj:date address:text basic:float hra:float medicalallowance:float conveyance:float otherallowance:float

Rails can automatically create a full set of CRUD (Create, Retrieve, Update, and Delete) operations and views on any database table. This scaffolding can get you up and running quickly with manipulating your database tables.It automatically creates Model, view and controller.

3. $ rake db:create

It will create a database.

4. $ rake db:migrate

It will update the database with information from the migration file.

5. To start the WEBrick server

$ script/server

6. In the address  bar of your browser type http://localhost:3000/details

you will get LISTING DETAILS , here by clicking at the link ‘ new details ‘ you can enter the employee details.

Posted by: chandanaa | July 6, 2009

Summer Training Project -2009

Tax Calculation ROR

06.07.2009

Ruby on Rails is an open-source web development framework that allows us rapidlly develop data driven applications using ruby programming language

Ruby is an object oriented interpreted programming language.
Interactive ruby code is entered using the ‘irb’ tool.

$ irb
irb(main):001:0>puts”hello world”
hello world
irb(main):002:0>1+2
3

i am studying git and ruby as instructed by mbuf

Posted by: chandanaa | April 28, 2009

HOW TO CONNECT TO INTERNET BY DIAL UP IN LINUX

This is how you can connect to internet through dial-up in linux.

First connect your phone to computer via data cable in data mode(if nokia phone then pc suite mode).

1>Open the terminal.

2> Be in superuser mode.

$] su –

password:

3>Do wvdialconf.

$]wvdialconf

Your phone will de detected as a modem.

4>Edit the wvdial.conf page.

$]vim /etc/wvdial.conf

you will see a page in which you will have to edit few options  like your username,password,phone code.

—->Give a username

—->Give a password.

—->phone(which is generally *99#)

Now save the page by doing  :wq

5>Do wvdial

$]wvdial

You will get primary and secondry DNS and a message that you are connected.

Save the primary and secondary DNS network configration setting.

Enjoy nou you are connected to internet.

Categories