Login

Introduction to Ruby Development

Enrollment

Please login to enroll is this event.


Description

This 2hr class is designed to give you an introduction into the ruby programming language.
During this session we will explore the history and concepts of the Ruby programming language,
learn the fundamental data types of Ruby, and finally build a working ruby program
using a fundamental skill set.

Prerequisites
There are no prerequisites to taking this class.
I take a ground up approach assuming this is everyones first exposure to ruby.

I do recommend have just really basic exposure to using the command line. No need to memorize
anything just give yourself some quick exposure

Linux/Mac users
https://kinbiko.com/shell/basic-bash-commands/

Windows users
https://programminghistorian.org/en/lessons/intro-to-powershell
Windows Folks just read through the "Getting Started" components. No need to go on
to the "doing more" section.

Before the Class
We want to spend our time learning and coding during the class so please follow the instructions below
to get your ruby environment ready to go prior to the class.

Install a text editor
You computer should have a text editor installed such as notepad. I recommend a text editor called
Atom. It is a free text editor that you can install here https://atom.io/

Install Ruby

MacOS
**Note** many modern mac systems come with ruby installed. Open up the *Terminal*
application. In the terminal type in `ruby -v` and press enter. You should see
something like `ruby 2.4.1p111 (2017-03-22 revision 58053)`. The version doesn't have
to match but you should have a version number. If ruby was not found follow these
instructions

1. Open up the *Terminal* application
2 . Copy and paste this into the terminal `/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"` and press enter
3. Copy and paste the following commands in the terminal
- `brew install rbenv ruby-build`
- `echo 'if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi' >> ~/.bash_profile`
- `rbenv install 2.4.1`
- `rbenv global 2.5.1`
- 'ruby -v' this should return the verions of ruby installed

Windows
1. Go to https://rubyinstaller.org/downloads/
2. Download `Ruby+Devkit 2.4.4-2` Note that the version will be different because of
the length of time between writing these instructions and you installing Ruby.
Just make sure you have a version close to 2.4
3. Follow the windows prompts to install - the install may take a while
4. Following the installation open the *Windows Powershell* application.
5. Type in `ruby -v` in powershell. You should see
something like `ruby 2.4.1p111 (2017-03-22 revision 58053)`. Version does not have to
match

Linux
This can vary depending on your distro. Follow this guide https://www.phusionpassenger.com/library/walkthroughs/deploy/ruby/ownserver/nginx/oss/install_language_runtime.html
and find instructions for your distro.

Sign up for Open Weather Map account
go to https://home.openweathermap.org/ we will be utilizing data provided by them to
build our ruby program. The account is free.

Install a REST client
Any of these are good options
- https://www.getpostman.com/ recommended
- https://insomnia.rest/ good choice for linux users
- https://addons.mozilla.org/en-US/firefox/addon/restclient/ firefox plugin

Questions?
If you have questions about the class or having trouble with the installs prior to the class
please email da129@duke.edu with subject line "Ruby Roots Class"

Subjects: ruby Web App Series web development


Resources


Details

Status Archived
Date Friday, January 25th, 2019
Time 3:00pm - 5:00pm
Location TEC - Classroom
Leader Danai Adkisson
Enrolled 12 of 30
Directions
The TEC (Technology Engagement Center) Classroom is in the Telcom Building. To get there, just walk down the stairs from Perkins/Bostock like you’re heading towards CIEMAS. When you get to the road halfway down, make a right and Telcom is the building ahead of you to the left. The Technology Engagement Center is the first floor, so just enter in the front of the building. The classroom is to the right of the entrance, adjacent to the center circular room. http://maps.duke.edu/map/?id=21&mrkIid=2765

loading