Upgrade to Pro — share decks privately, control downloads, hide ads and more …

An Introduction to Ruby On Rails - Office Train...

An Introduction to Ruby On Rails - Office Training session

An Introduction to Ruby On Rails - office training session for freshers batch

Avatar for Shaiju Edakulangara

Shaiju Edakulangara

June 23, 2015

More Decks by Shaiju Edakulangara

Other Decks in Technology

Transcript

  1. Take away from this session What is Ruby on Rails

    ? Who is behind Ruby on Rails? Who is already on Ruby on Rails? The Ruby on Rails philosophy Ruby on Rails MVC framework Installing Ruby on Rails The Ruby on Rails Command Line rails generate command Ruby on Rails Directory Structure Hello, Rails! Ruby on Rails Resources Workflow
  2. What is Ruby on Rails ? Ruby on Rails® is

    an open-source web framework that’s optimized for programmer happiness and sustainable productivity. It lets you write beautiful code by favoring convention over configuration. Latest version is Rails 5.0.0.beta2
  3. 1 Who is behind Ruby on Rails? Rails was created

    in 2003 by David extracted Rails from Basecamp and officially released it as open source code in July of 2004. Extended by the and . David Heinemeier Hansson Rails core team more than 3,700 contributors
  4. Ruby on Rails MVC framework Model (ActiveRecord ) View (

    ActionView ) Controller ( ActionController )
  5. Installing Ruby on Rails ruby -v sudo apt-get install rubygems-integration

    sudo gem install rails rails --version sudo gem install sqlite3-ruby sqlite3 --version gem install bundler sudo apt-get install mysql-server-5.6 sudo apt-get install nodejs
  6. The Ruby on Rails Command Line rails new app_name rails

    console (rails c) rails server (rails s) rails generate rails destroy rails dbconsole rake
  7. rails generate command rails generate controller Usage: rails generate controller

    NAME [action action] [options] Example: rails generate controller CreditCards open debit credit close rails generate model Usage: rails generate model NAME [field[:type][:index] field[:type][:index]] [options] Example: rails generate HighScore game:string score:integer rails generate scaffold HighScore game:string score:integer
  8. 1 Ruby on Rails Resources 1. 2. 3. 4. 5.

    6. 7. http://guides.rubyonrails.org/ http://railscasts.com https://www.codeschool.com/ http://www.codecademy.com/learn http://everydayrails.com/2010/05/19/bootstrapping- a-rails-app.html http://www.sitepoint.com/learn-ruby-on-rails/ http://www.tutorialspoint.com/ruby-on-rails/