Discover millions of ebooks, audiobooks, and so much more with a free trial

Only $11.99/month after trial. Cancel anytime.

RUBY Beginner's Crash Course: Ruby for Beginner's Guide to Ruby Programming, Ruby On Rails & Rails Programming
RUBY Beginner's Crash Course: Ruby for Beginner's Guide to Ruby Programming, Ruby On Rails & Rails Programming
RUBY Beginner's Crash Course: Ruby for Beginner's Guide to Ruby Programming, Ruby On Rails & Rails Programming
Ebook171 pages1 hour

RUBY Beginner's Crash Course: Ruby for Beginner's Guide to Ruby Programming, Ruby On Rails & Rails Programming

Rating: 0 out of 5 stars

()

Read preview

About this ebook

Ruby is a computer programming language created in the 1990s by the Japanese programmer Matz, whose full name is Yukihiro Matsumoto. It was designed to make programming fun, and is one of the few computer languages that emphasize human comprehension over machine logic.

 

Ruby is fast becoming one of the most popular languages for developing web applications. Ruby on Rails, developed by David Heinemeier Hansson to work with Ruby, introduced more people to Ruby. Now, a language that may otherwise have remained unknown has a buzzing community of programmers. They welcome beginners and are focused on one thing – producing the highest quality code.

 

I have written this book to give inexperienced people an overview of Ruby and Ruby on Rails. Applying the principles and the knowledge that you learn in this book will help you build a strong foundation in Ruby programming, enough to allow you to move on to more advanced programming.

 

Click "Buy Now" and get started today!

LanguageEnglish
PublisherND Publishing
Release dateOct 19, 2021
ISBN9781393670124
RUBY Beginner's Crash Course: Ruby for Beginner's Guide to Ruby Programming, Ruby On Rails & Rails Programming

Read more from Quick Start Guides

Related to RUBY Beginner's Crash Course

Related ebooks

Programming For You

View More

Related articles

Reviews for RUBY Beginner's Crash Course

Rating: 0 out of 5 stars
0 ratings

0 ratings0 reviews

What did you think?

Tap to rate

Review must be at least 10 words

    Book preview

    RUBY Beginner's Crash Course - Quick Start Guides

    Ruby Beginner’s Crash Course

    Beginner’s Guide to Ruby Programming, Ruby On Rails & Rails Programming

    © Copyright 2015 – All rights reserved.

    In no way is it legal to reproduce, duplicate, or transmit any part of this document in either electronic means or in printed format. Recording of this publication is strictly prohibited and any storage of this document is not allowed unless with written permission from the publisher. All rights reserved.

    The information provided herein is stated to be truthful and consistent, in that any liability, in terms of inattention or otherwise, by any usage or abuse of any policies, processes, or directions contained within is the solitary and utter responsibility of the recipient reader. Under no circumstances will any legal responsibility or blame be held against the publisher for any reparation, damages, or monetary loss due to the information herein, either directly or indirectly.

    Respective authors own all copyrights not held by the publisher.

    Legal Notice:

    This book is copyright protected. This is only for personal use. You cannot amend, distribute, sell, use, quote or paraphrase any part or the content within this book without the consent of the author or copyright owner. Legal action will be pursued if this is breached.

    Disclaimer:

    Please note the information contained within this document is for educational and entertainment purposes only. Every attempt has been made to provide accurate, up to date and reliable complete information. No warranties of any kind are expressed or implied. Readers acknowledge that the author is not engaging in the rendering of legal, financial, medical or professional advice.

    By reading this document, the reader agrees that under no circumstances are we responsible for any losses, direct or indirect, which are incurred as a result of the use of information contained within this document, including, but not limited to, errors, omissions, or inaccuracies.

    Table of Contents

    Introduction

    Chapter 1 – What is Ruby?

    Features

    Implementations

    Official Ruby interpreter

    Rubinius & JRuby

    Ruby – an inside look

    Virtual machines

    The Ruby virtual machine

    Rubinius

    JRuby

    Chapter 2 – How to Use Ruby

    Required knowledge

    Required software

    Chapter 3 – How to Install Ruby

    Windows

    Linux

    Chapter 4 – Let’s Get Started

    How your computer evaluates Ruby

    Ruby objects

    Ruby methods

    Ruby classes

    Ruby class instances

    Chapter 5 – How Data Is Structured In Ruby

    Variables

    Local

    Global

    Constant

    Class

    Instance

    How to use the different variable types

    Ruby strings

    Ruby collections

    Arrays

    Ruby iterators

    Blocks

    Ruby hashes

    Symbols

    The BEGIN statement

    The END statement

    Comments in Ruby

    Chapter 6 – Input & Output Methods in Ruby

    Reading input from the screen

    Writing output to the screen

    The chomp method

    Chapter 7 – Conditional Structures in Ruby

    If... else statements

    The if modifier

    The unless statement

    The unless modifier

    The case statement

    Chapter 8 – Loops in Ruby

    The while statement

    The while modifier

    The until statement

    The until modifier

    The for statement

    The break statement

    The next statement

    The redo statement

    The retry statement

    Chapter 9 – Ruby Methods

    Declaration & definition of methods

    Return values of a method

    The return statement

    Variable number of parameters

    Methods in a class

    The alias statement

    The undef statement

    Chapter 10 – How to Write a Web Application Using Ruby on Rails

    Installing the software

    Installing the Bundler gem

    Installing Rails

    Creating the Rails app

    A first look at Bundler & Gemfile

    Run the development server

    An introduction to MVC patterns and Rails

    Add a bookmark resource

    Database migration

    The bookmark model

    The bookmarks controller & views

    Routes

    Try the server

    Adding users & authentication

    Installing Devise

    Generating a user model

    Associating users & bookmarks

    Requiring authentication for bookmark management

    Try the server (again)

    Handling wrong inputs

    Model validations

    When resources aren’t found

    Making improvements a step at a time

    Root page

    Nicer GUI

    Prettier forms

    Chapter 11 – The Command Line in Rails

    rails new

    rails server

    rails generate

    rails console

    The app and helper objects

    rails runner

    rails destroy

    Chapter 12 – Useful Programs in Ruby

    Print the reverse of a string

    Find if a string is a palindrome

    Generate the Fibonacci series

    Find the factorial of a number

    Find the second biggest number from an array

    Conclusion

    Introduction

    Ruby is a computer programming language created in the 1990s by the Japanese programmer Matz, whose full name is Yukihiro Matsumoto. It was designed to make programming fun, and is one of the few computer languages that emphasize human comprehension over machine logic.

    Ruby is fast becoming one of the most popular languages for developing web applications. Ruby on Rails, developed by David Heinemeier Hansson to work with Ruby, introduced more people to Ruby. Now, a language that may otherwise have remained unknown has a buzzing community of programmers. They welcome beginners and are focused on one thing – producing the highest quality code.

    Many people perceive computer programming as difficult, but it really isn’t. It does require you to have a certain mindset, though, a real thirst for knowledge and learning. When you adopt this mindset, you will find that programming is not as frustrating as you might have feared. It can be fun, and successful programming is very rewarding, provided you possess enough patience to see you through.

    I have written this book to give inexperienced people an overview of Ruby and Ruby on Rails. Applying the principles and the knowledge that you learn in this book will help you build a strong foundation in Ruby programming, enough to allow you to move on to more advanced programming.

    Chapter 1 – What is Ruby?

    Ruby stands alone as the most unique of the object-oriented computer scripting languages. In many of these languages, some things

    Enjoying the preview?
    Page 1 of 1