ROR Links and Resources

Ruby

Ruby Programming for Beginners (http://docs.railsbridge.org/workshop/ruby_for_beginners)
Includes project exercises


Railsbridge Introduction to Ruby
(http://docs.railsbridge.org/ruby/)
A ruby-specific curriculum, expanded from the “Ruby for Beginners” slide deck.


RubyMonk
(https://rubymonk.com/)
Free interactive tutorials and lessons to help you learn Ruby

Learn Ruby
Free, interactive tutorials to help you discover Ruby idioms, in your browser!

Ruby-primer

Beginner

Ruby Primer

Learn Ruby, today. You want to learn Ruby for fun, for a new job, or just to see what all the fuss is about? Start here.

Ruby-primer-ascent

Intermediate

Ruby Primer: Ascent

Experience the next level. You’ve mastered the Ruby Primer. Now it’s time to master more advanced Ruby skills!

Metaprogramming-with-ruby

Intermediate

Metaprogramming Ruby

Code that writes code. Add more powerful abstractions and reduce duplication through Ruby that writes Ruby!

Metaprogramming-with-ruby-ascent

Advanced

Metaprogramming Ruby: Ascent

Experience dynamic power. You’ve learned the basics of writing code with code in Metaprogramming Ruby. Now take it to the next level with eval, object lifecycle hooks, and more!

TestFirst.org
(http://testfirst.org/)
Sarah Allen’s & Alex Chaffee’s TestFirst.org — learn Ruby or JavaScript the test-driven way.

Download the Learning Ruby materials (ZIP 49KB)

Do you want to learn Ruby or JavaScript? Here’s a self-guided path to learning to program using ‘Test-First Teaching’. We’ve used it to teach hundreds of people. We want to teach you too!

Why test first? Traditionally, software homework is either fill-in-the-blank, tiny snippets, or huge, unstructured assignments. Test-first teaching guides you, one step at a time, to writing real programs from scratch.

Why Test-First Teaching?

Test-First Teaching provides a fundamental shift in the way people learn software development. Initially, it helps the student focus on learning very basic syntax, able to independently confirm when they have successfully completed an exercise. That immediate feedback is valuable for cementing knowledge.

Test-first teaching also teaches an understanding of all of the arcane error messages in a low stress situation. The first thing you see, before you have written a line of code, is an error. Then you discover what you need to do to fix that error. Test-first teaching helps people intuitively understand that mistakes are a natural part of the software development process.

In traditional programming exercises, you are either given a fairly large task and asked to implement the whole thing, or you are provided with “skeleton code” — source code that has been eviscerated to remove key sections, which you are asked to fill in.

“Large task” exercises are often challenging to students because of their sheer size. Many lines of code need to be written before you receive any positive reinforcement. This can be frustrating to beginners, and boring for advanced students.

“Skeleton code” exercises are also frustrating. The task of the student should be to figure out how to write code that will accomplish the given task. With skeleton code, you are first presented with the task of figuring out what the original author was trying to do; of reading through the code (often littered with idiosyncratic idioms and obscure comments); and then of trying to implement just one part of the algorithm, without necessarily understanding the larger picture. If the fill-in-the-blank code section is too complicated, the student may never complete the assignment; if it’s too simple, no learning may be gained by the exercise.

Finally, in both types of traditional exercises, as a student you don’t really know when you are finished! Sometimes, you will succeed in the task, but neglect to print the results, and will keep at it, believing you are still missing something; other times, you might write code that seems to work but is crucially flawed in some way or another. This is one of the most powerful features of test-first development — you code until the test passes, and then you stop coding. The test provides a map, informing you of where to begin, and where to end.

Test-first teaching is appropriate for both guided and solo use. Students in a classroom may rely on classmates or teachers for guidance; but if alone, the tests provide some measure of feedback and guidance (although unit tests can never actually debug and fix the code).

Perhaps the most important aspect of test-first teaching is that it teaches the whole process, from opening a new file in a text editor to compiling and running. At the end of the day, the students can say, “At least I know how to write a program.” Many exercises, especially skeletons but also those based on tools and toy problems, end up skipping the fundamentals that are vital not just for coding on a day-to-day basis, but also for cementing the higher-level concepts into habits and skills.

Unit Testing refers to writing a set of functions that sit next to a given module of program code. These functions run a series of tests that assure, more-or-less thoroughly, that the program code performs as it is supposed to.

For example, assume there is a function called add that takes two integers as parameters, adds them together, and returns their sum. There might be one unit test that calls add with 2 and 3, and makes sure the result is 5. There might be additional unit tests that “push the envelope” in various other ways, testing its behavior with large numbers, negative numbers, illegal parameters (e.g. strings), and so forth.

Once a full suite of unit tests is developed, it is good practice to run these tests as often as possible.

Test-Driven DevelopmentTest-Driven Development (sometimes called Test-First Development or Test-Driven Design) is the practice of writing the unit tests first, before you write a single line of implementation code. While this may seem like putting the cart before the horse, there are several good reasons why you might want to do this:

  1. Design. It forces you to think first about the design of the interface to the code, instead of jumping straight to the implementation. Having a well-designed interface is often more important than having an efficient implementation.
  2. Discipline. Writing tests is often seen as a chore; writing the tests first guarantees that at the end of the day you will have written a suite of unit tests (rather than leaving them until the end and possibly never getting around to it).
  3. Less Work. If you apply a tight cycle of write one test, then write the code to implement that test, then write the next test, your code ends up growing organically. This often (though not always) leads to less wasted effort; you end up writing all the code you need, and none of the code you don’t need.

Testing FrameworksA Testing Framework is a tool or library that provides a backdrop for writing tests.

For example, to implement a test in the JUnit framework for Java, you write a class that extends the common TestCase superclass. Each method in your subclass that begins with the word “test” is a separate unit test. You then run the JUnit tool (both graphical and text versions are provided) and it loads your class and executes each test method in turn, monitoring the results and providing feedback.

Using RSpec for Ruby, you use the keywords describe and it to build a nested set of tests (also called “specs” or “examples” in the RSpec lexicon).

There are several testing frameworks in use for Ruby today:

  • Test::Unit is included with Ruby 1.8, and follows the “xUnit” conventions
  • Minitest is included with Ruby 1.9, and allows both xUnit and RSpec style tests
  • RSpec, which is used in this project, has more concise syntax and can be used in the same project, but creates a separate suite of tests, called “specs”
  • in Cucumber, tests are written not in Ruby but in a language designed for tests

There are also many testing libraries which can be used inside any of the frameworks listed above:

  • Wrong provides a universal assert (or expect) that inspects your code and automatically tells you details of why it failed
  • shoulda provides a “chaining DSL” for representing assertions, similar to RSpec
  • rr is a Mock Object library

Ruby Koans
(http://rubykoans.com/)
Learn Ruby with the neo Ruby koans.  An interactive way to test what you know about Ruby so far.

The Koans walk you along the path to enlightenment in order to learn Ruby. The goal is to learn the Ruby language, syntax, structure, and some common functions and libraries. We also teach you culture. Testing is not just something we pay lip service to, but something we live. It is essential in your quest to learn and do great things in the language.

The koans are broken out into areas by file, hashes are covered in about_hashes.rb, modules are introduced in about_modules.rb, etc. They are presented in order in the path_to_enlightenment.rb file.

Each koan builds up your knowledge of Ruby and builds upon itself. It will stop at the first place you need to correct.

Some koans simply need to have the correct answer substituted for an incorrect one. Some, however, require you to supply your own answer. If you see the method __ (a double underscore) listed, it is a hint to you to supply your own code in order to make it work correctly.

Download the Ruby Koans (ZIP 40KB)


Code Like This (Ruby)
(http://codelikethis.com/lessons)
Slides and videos teaching Ruby, linked to TestFirst Labs


Rails Girls – Get started with tech
(http://railsgirls.com/)

Ruby on Rails Workshops for Girls

Our aim is to give tools and a community for women to understand technology and to build their ideas. We do this by providing a great experience on building things and by making technology more approachable.
Learn sketching, prototyping, basic programming and get introduced to the world of technology. Rails Girls was born in Finland, but is nowadays a global, non-profit volunteer community.

Rails Girls Guides
(http://guides.railsgirls.com/)


Learn Ruby the Hard Way
(http://learnrubythehardway.org/book/)
A Ruby port of Zed Shaw’s introductory programming tutorial Learn Python the Hard Way.

Welcome to Learn Ruby the Hard Way, 3rd Edition. You can visit the companion site to the book at http://learnrubythehardway.org/ where you can purchase digital downloads and paper versions of the book.

Download Zed Shaw (2912) Learn Ruby the Hard Way, Second Edition (PDF 449KB)

Table Of Contents


Ruby Documentation
(http://ruby-doc.org/)
Help and documentation for the Ruby programming language
Read through the available methods for strings, arrays, hashes, and the enumerable mixin.


Omniref.com Ruby and Gem documentation
(https://www.omniref.com/)
Omniref is a code-based reference, maintained by and for the programming community. Find questions, comments, links and documentation on the code that you’re already using.
This site has the complete documentation for every version of Ruby, and every version of every Ruby Gem, like activerecord, json, and rake. It’s also a great place to leave questions about code you don’t understand well, like this example on ActiveRecord.all.


Ruby on Rails

Learn Ruby on RailsWhat is Ruby on Rails? by Daniel Kehoe
(http://railsapps.github.io/what-is-ruby-rails.html)
In-depth primer on Ruby and Rails, “What is Ruby on Rails?” Explains what is important about Ruby and Rails.

See http://bedford-computing.co.uk/learning/ruby-on-rails/what-is-ruby-on-rails/

 


The Ruby on Rails Tutorial (Third Edition) – Learn Web Development with Rails by Michael Hartl
(https://www.railstutorial.org/book)
An intermediate level tutorial that is highly recommended throughout the Rails community. Extremely well written, technically sound, comprehensive and up-to-date.


Learn to Build a Ruby on Rails Application
(http://rubyonrailstutor.github.io/)
Complete Rails app, sequenced code and free screen casts. Sequenced, structured with twitter oauth, haml and zurb foundation.

Learn to build a Ruby on Rails Application.

Build Restaurantly, a simple review app.

Contents

  1. Restaurantly Application setup
  2. Restaurantly Restaurant Data Model
  3. Restaurantly Connecting Data to Client
  4. Restaurantly Testing Configuration
  5. Restaurantly#show
  6. Restuarantly #new #create
  7. Restaurantly #index integration
  8. Restaurantly#edit #update #destroy controller actions
  9. Restaurantly#edit, #update integration tests
  10. Restaurantly User Authorization data models
  11. Restaurantly twitter-omniauth login

Railsbridge Introduction to Rails
(http://docs.railsbridge.org/intro-to-rails/)

Learn to code or level up with RailsBridge!

RailsBridge workshops are a free and fun way to get started or level up with Rails, Ruby, and other web technologies. Our events focus on increasing diversity in tech, so that people of all backgrounds can feel welcome and comfortable in our industry.
Complete curriculum
The “classic” RailsBridge curriculum (Suggestotron). Takes you step-by-step through making a Rails app, one command at a time, using helpers like rails generate scaffold, and deploying that app to the Internet.


Railsbridge Job Board
(http://docs.railsbridge.org/job-board/)
Build a simple job board from scratch with a little less of the magic of Rails scaffolding.


Railsbridge Message Board
(http://docs.railsbridge.org/message-board/)
Build a message board! This curriculum is for students who have completed the Suggestotron and the Job Board curricula. This curriculum is a challenge because it won’t tell you what to type in!


RailsGuides – Ruby on Rails Guides (v4.2.4)(http://guides.rubyonrails.org/)
Topical and up-to-date Rails references.
These are the new guides for Rails 4.2 based on v4.2.4. These guides are designed to make you immediately productive with Rails, and to help you understand how all of the pieces fit together.


RailsCasts - Ruby on Rails ScreencastsRailsCasts
(http://railscasts.com/)
Short, clear, and excellent screencastson Ruby on Rails by Ryan Bates.  Some are out-of-date.

About RailsCasts
RailsCasts is produced by Ryan Bates (rbates on Twitter and ryanb on GitHub). A free episode will be released on the first Monday of each month featuring tips and tricks with Ruby on Rails. The screencasts are short and focus on one technique so you can quickly move on to applying it to your own project. The topics target the intermediate Rails developer, but beginners and experts will get something out of it as well.


Code SchoolCode School
(https://www.codeschool.com/)

Ruby Path BadgeMaster your Ruby skills and increase your Rails street cred by learning to build dynamic, sustainable applications for the web.

Getting Started With Ruby on Rails

 Ruby is an expressive, dynamic programming language. Ruby on Rails is an open source web framework for building custom web applications. The courses in this section get you quickly up to speed with the basics of the Ruby language and on track to building your first Rails application.
ree Course

Try Ruby Completion BadgeTry Ruby
Learn the basic building blocks of Ruby, all in the browser.

 

Ruby Language
Once you understand the basics of Ruby, learning more about the language will help you write better Ruby code and, therefore, better software. These courses give an overview of some of the most important parts of the Ruby programming language.

Ruby Bits Completion Badge Ruby Bits
Learn the core bits every Ruby programmer should know.

 

Intermediate Ruby on Rails
After you have a handle on the basics and you’re ready to take your Ruby on Rails apps from good to great, these courses will teach you patterns for organizing your code and scaling your application for more traffic.

 

Rails Testing
Writing unit tests is an important step when developing web applications so you can ensure your code is always doing what you expect. These courses teach you all about ways to write tests for your code.


The FireHose Project
(http://www.thefirehoseproject.com/)
A mentor-driven, online coding bootcamp focused on real-world programming skills like test-driven development, algorithms, and building an advanced web application as part of an agile team. Two-week free intro course.

Become a full-stack web developer with our immersive online apprenticeship.

Ruby on Rails
We treat you like a junior web developer from day one so you’re ready for anything out in the real world. You will learn how to build and launch fully functional web applications that prepare you to thrive in the technical environment of startups.

Algorithms and Logic
Algorithms power our world. We make sure you understand, write and use algorithms like professional developers, integrate them into advanced web applications and modify your code so it solves whatever challenge the real world throws at you.

Group Projects
The best software in the world is built by amazing teams. We put you on an amazing team and teach you real world coding that transforms the way you do web development. Code reviews, GitHub in advanced mode, agile teams and weekly scrum meetings – welcome to the real world.

Yellow logoFirehose Intro
Go from 0 MPH to 20 MPH. Launch your own website, write Ruby code and solve coding challenges that screen out many programmers before the first job interview. Get your code reviewed by our mentor team and start working on your coding fundamentals.

 

Logo 70x100Firehose Core

Real world coding to accelerate your skills from 20 MPH to 120 MPH. You build advanced web applications, create complex algorithms, use Test Driven Development and work on a group project, all while being under the wing of a world-class mentor.

Get 2 Weeks Free
(http://www.thefirehoseproject.com/applicants/new)
Apply to be a part of the Firehose Intro program. Build a website and learn how to solve Ruby coding challenges that screen out the majority of programming job applicants before they ever make it to the interview.
Work on your coding fundamentals, get regular code reviews and the support you need to be accepted into the Full Firehose program.


RailsBridge’s Ruby and Rails Resources Pinterest board
(https://www.pinterest.com/pvnrtmol/ruby-and-rails-resources/)Includes books, online tutorials, groups, and more


Cover webOnline Tutorial:  Hartl, M. (2015) Learn Enough Command Line to Be Dangerous – An introduction to the command line
(http://www.learnenough.com/command-line-tutorial)

The first Learn Enough product is Learn Enough Command Line to Be Dangerous, a tutorial about the Unix command line that doesn’t assume you know anything about Unix or even what a command line is.

Learn Enough Command Line to Be Dangerous is an introduction to the command line for complete beginners, the first in a series of tutorials designed to teach the common foundations of “computer magic”. It is aimed both at those who work with software developers and those who aspire to become developers themselves. Unlike most introductions to the command line, which typically assume a relatively high level of technical sophistication, Learn Enough Command Line to Be Dangerous assumes no prerequisites other than general computer knowledge (how to launch an application, how to use a web browser, how to touch type, etc.). Among other things, this means that it doesn’t assume you know how to use a text editor, or even what a text editor is. Indeed, this tutorial doesn’t even assume you know what a command line is, so if you’re confused by the title, you’re still in the right place. Finally, even if you already know how to use the command line, following this tutorial (and doing the exercises) will help fill in any gaps in your knowledge, and might even teach you a few new things.

Contents

1 Basics
1.1 Running a terminal
1.2 Our first command
1.3 Man pages
1.4 Editing the line
1.5 Cleaning up
1.6 Summary
2 Manipulating files
2.1 Redirecting and appending
2.2 Listing
2.3 Renaming, copying, deleting
2.4 Summary
3 Inspecting files
3.1 Downloading a file
3.2 Making heads and tails of it
3.3 Less is more
3.4 Grepping
3.5 Summary
4 Directories
4.1 Structure
4.2 Making directories
4.3 Navigating directories
4.4 Renaming, copying, and deleting directories
4.5 Summary
5 Conclusion


Cover webHartl, M.(2015) Learn Enough Text Editor to Be Dangerous – Learn the basics of editing text with a text editor
(http://www.learnenough.com/text-editor-tutorial)

Learn Enough Text Editor to Be Dangerous is designed to help you learn to use what is arguably the most important item in the aspiring computer magician’s bag of tricks: a text editor. Unlike other text editor tutorials, which are typically tied to a specific editor, this tutorial is designed to introduce the entire category of application—a category many people don’t even know exists. Moreover, editor-specific tutorials tend to be aimed at professional developers, and generally assume years of experience, but Learn Enough Text Editor to Be Dangerous doesn’t even assume you know what a “text editor” is. Its only prerequisite is a basic knowledge of the Unix command line, such as that provided by Learn Enough Command Line to Be Dangerous. Because Learn Enough Text Editor to Be Dangerous is part of a series of tutorials designed to teach the fundamentals of software development (with a particular focus on the prerequisites for learning web development with the Ruby on Rails Tutorial), it’s ideally suited for anyone who wants to learn the skills necessary to work with developers or to become developers themselves. Finally, even if you already know how to use a text editor, following this tutorial (and doing the exercises) will help fill in any gaps in your knowledge, and might even teach you a few new things.

Contents



tutorialspointRuby on Rails Tutorial
(http://www.tutorialspoint.com/ruby-on-rails/)

Ruby on Rails is an extremely productive web application framework written in Ruby by David Heinemeier Hansson. This tutorial gives you a complete understanding on Ruby on Rails.

Download Ruby on Rails Tutorial (PDF 1,721KB)

Audience
This tutorial has been designed for beginners who would like to use the Ruby framework for developing database-backed web applications.

Prerequisites
You need to have a basic knowledge of Ruby and object-oriented programming to understand this tutorial. In addition, you need to be familiar with internet and websites programming in general.

Ruby on Rails Tutorial

Ruby on Rails Resources


tutorialspointRuby Tutorial
(http://www.tutorialspoint.com/ruby/)

Ruby is a scripting language designed by Yukihiro Matsumoto, also known as Matz. It runs on a variety of platforms, such as Windows, Mac OS, and the various versions of UNIX.

This tutorial gives a complete understanding on Ruby.

Audience
This reference has been prepared for the beginners to help them understand the basic to advanced concepts related to Ruby Scripting languages.

Prerequisites
Before you start doing practice with various types of examples given in this reference, I’m making an assumption that you are already aware about what is a computer program and what is a computer programming language.

Ruby Basics

Ruby Advanced

Ruby Useful Resources

Selected Reading


Lenz, Patrick (2008) Rails For Beginners: All You Need To Know!
(http://www.sitepoint.com/rails-for-beginners/)

If you’ve ever read any beginner’s articles about Ruby on Rails, you’ll know that quite a bit of thought has been put into the code base that makes up the Rails framework. Over time, many of the internals have been rewritten, which has improved their speed and efficiency and allowed the implementation of additional features, but the original architecture remains largely unchanged.
In this article, I’ll help beginners take that next step by examining the inner workings of Rails. If you’re yet to experiment with Rails, I’d recommend you download a free preview of my new book, Simply Rails 2, from which this information is excerpted. The chapter presented here gives a surface-level tour of the Ruby on Rails framework, and prepares the reader for building a digg-clone, which we’ve named (somewhat cheekily) Shovell. If you need installation and other setup instructions, download the sample PDF, which contains chapters 1 to 4.


Lenz, Patrick (2011) Learn Ruby on Rails: the Ultimate Beginner’s Tutorial
(http://www.sitepoint.com/learn-ruby-on-rails-1/)

While it certainly makes no attempt to constitute a complete guide to the Ruby language, this tutorial will introduce you to some of the basics of Ruby. We’ll power through a crash-course in object oriented programming, covering the more common features of the language along the way, and leaving the more obscure aspects of Ruby for a dedicated reference guide. I’ll also point out some of the advantages that Ruby has over other languages when it comes to developing applications for the Web. After reading this, you’ll be ready to dive into our dedicated Ruby site, www.rubysource.com

Some Rails developers suggest that it’s possible to learn and use Rails without learning the Ruby basics first, but as far as I’m concerned, it’s extremely beneficial to know even a little Ruby before diving into the guts of Rails. In fact, if you take the time to learn the Ruby basics first, you’ll automatically become a better Rails programmer.

That’s what this tutorial is all about. In fact, this information is excerpted from my new book, Build Your Own Ruby On Rails Web Applications, which is now available through sitepoint.com. The two chapters presented here get straight into the finer points of Ruby and Rails. If you need installation and other setup instructions, download the sample PDF, which contains chapters 1 to 4.