What is Rails?
ROR is a web development framework written with Ruby. It is designed to make programming web applications easier by making assumptions about what every developer needs to get started. It allows you to write less code while accomplishing more than many other languages and frameworks. Some developers also say that it makes web application development more fun…
Like many dev programs, ROR is also MVC based.
downloading rails: you can download ruby from here.
- Creating application folder. very easy, just key in
rails new blogin your command. This will create a Rails application called Blog in a directory called blog.
- DB configuration: like many other applications, you will probably use a DB to store the information. You can connect to mysql DB like so:
socket: /tmp/mysql.sockthis info goes to your config/database.yml file.
- Now that you have your database configured, it’s time to have Rails create an empty database for you. You can do this by running a rake command:
$ rake db:create
- Starting rail server is easy, just key in
$ rails server.
- If you didn’t change the defaults, you are listening on port 3000.