
Set up development environment for Ruby, then learn basics like string manipulation, variables, user input, math, and comparisons, before advancing to conditionals, loops, hashes, fizz buzz, and methods and classes.
Check out my student Facebook Group...
It's a great place to get fast support for this course from me, to interact with other students, to post your projects and code, and to access course announcements and extras...
Join Now!
https://www.facebook.com/groups/codemycom/
Install Sublime Text as the code editor and Git Bash as the terminal to run Ruby; Mac and Linux ship with Ruby, Windows requires installation.
Download and install the Ruby programming language on Windows using the official Ruby installer, optionally including the dev kit, and configure your system path to run Ruby from any directory.
Learn how to manipulate strings in Ruby by treating them as objects, using dot methods like down case, up case, capitalize, reverse, and length.
discover how to get user input in Ruby with gets, display prompts with print and puts, and use string interpolation to incorporate input into output, including removing newlines with chomp.
Sometimes Git Bash has issues with gets... to get around them, run your program like this:
winpty ruby program_name.rb
Explore Ruby math basics, including integers vs floats, and how to use plus, minus, multiply, divide, exponent, and modulus, with examples showing integer division vs decimal results.
Convert user input into an integer using gets.to_i, perform arithmetic on the numeric value, and output results with puts, while understanding string versus number types and to_s for conversion.
Explore comparison operators, including equal to, not equal to, greater than, greater than or equal to, less than, and less than or equal to, for numbers and strings.
Apply assignment operators to turn arithmetic into assignments, using age = 39 and age += 1, and utilize plus, minus, multiply, divide, exponent, and modulus for looping counters.
Master if/else conditional statements in Ruby, using comparison operators to test numbers and strings and drive different code paths, including elsif for extra comparisons.
Explore hashes in ruby, compare with arrays, define keys and values, use a hash rocket and brackets to access data, and model complex data like a customer database.
Learn how to define and call methods in Ruby, pass parameters, and control execution flow by invoking methods at specific times, with examples like hello and hello John.
Learn how methods accept multiple arguments, use return versus puts, and assign outputs to variables, with case manipulation for flexible results, and a preview of classes.
Master using setters to update a class property after initialization, with a setter method taking a side_length parameter to assign new values and reflect changes via the getter.
Discover how Ruby's attr_accessor automates getters and setters for class attributes like side length (and area), streamlining initialize methods and reducing boilerplate.
Learn to implement a draw method that renders a square of asterisks using side length, walls, and spaces, and see how a class acts as a blueprint in object-oriented programming.
Learn to build a stock market portfolio app with Ruby on Rails, enabling user sign up, profile editing, adding stocks, viewing stock details, and automatic logo generation with database tracking.
Learn the free prerequisites for installing Ruby on Rails on Windows, including Node, a text editor, a terminal (Git Bash), and the Heroku toolbar, with upcoming installation steps.
Install Node.js to prepare your Ruby on Rails setup. Uninstall old versions, download the latest LTS from nodejs.org, install, and restart your computer to ensure a smooth Rails installation.
Install and compare text editors with Sublime Text as the industry standard and set up the Git Bash terminal to manage version control with GitHub and Heroku.
Generate an ssh key in the bash terminal and save it in a hidden .ssh directory to enable pushing code to get hub and heroku.
RailsInstaller.org is down, you can find the installer here:
https://web.archive.org/web/20210306035811/http://railsinstaller.org/en
Create a Rails test project to verify installation and troubleshoot errors by installing Bundler, updating the gem file for sequel light, then run bundle install.
Learn how to set up a Ruby on Rails project, install dependencies with bundle install, and explore the Rails app structure from app and config to controllers, models, and views.
Start the Rails server to view your new project's default home page in the browser at localhost:3000. This confirms Rails is installed and running with the Puma server.
Use rails generate to create a home controller and index view, wire a route, and render an embedded ruby page in the browser while the server runs.
Learn to set the root route to the home page by editing config/routes.rb, replacing get 'home#index' with root 'home#index' and commenting out the old route.
Learn how to create an about page manually in Rails by defining an about method in the home controller, adding the about view, and configuring the route.
Explore the application.html.erb layout in the Rails layouts folder, using the yield tag to insert page content and share navigation and footer across all pages.
Learn how Rails uses embedded Ruby to create dynamic links with link_to and path helpers, ensuring links update automatically when routes change.
Learn how to use partials in Rails to extract nav bars and footers into underscore-named files and render them across views.
Discover Bootstrap, the free CSS framework that outfits websites with components like buttons, cards, and nav bars. Learn how to install Bootstrap in Rails and use its documentation.
Apply mobile first design to make your site mobile ready with Bootstrap, by adding a viewport meta tag that scales for devices like the Galaxy S5 and iPhone.
Install the stock quote gem, bundle install, and query stock data in Ruby to access symbol, company name, and latest price. Be aware versions may require an API key.
Explore the stock quote gem to pull company information, stats, logo, and descriptions, then create a web form to query by ticker symbol and view live results.
Handle the form by sending the ticker param to the home controller index action and assign results to @stock. Display stock details and add simple error handling for missing ticker.
Improve error handling in the Rails form by adding an if/elsif flow in the home controller to catch empty input and avoid undefined method errors, displaying a helpful message.
Master robust error handling by testing for gibberish inputs, distinguishing nil results, and displaying precise errors like 'stock symbol doesn't exist please try again' on the index page.
Learn to implement a devise-based user management system in Rails, enabling sign up, log in, and personal stock portfolios, with mailer config, flash messages, and generated devise views.
Create the devise user model and migrate the database in rails to add a users table with email, encrypted password, and tokens, then review the generated schema and routes.
Add sign up, log in, and log out links to the nav bar using Devise paths like new_user_registration_path and new_user_session_path, and plan to show them based on login status.
Learn to bootstrap forms in Rails apps by wrapping inputs in form-group, applying form-control, and styling login, signup, and password pages with Bootstrap components like jumbotron and grid layout.
Learn to tailor the navigation bar with a conditional ruby-based setup, showing edit profile and log out when signed in, and sign up or log in when not.
Generate a stocks table and associate it with users using a rails scaffold, migrate the database, and review the schema with ticker and user_id fields, and an index on user_id.
Explore the Rails stocks controller and routes to perform index, show, new, edit, create, update, and destroy actions, and connect stocks to users and ticker symbol data via resources.
Learn how to connect stocks and users in rails using active record associations, defining has_many and belongs_to, updating models, and addressing scaffolding quirks for clean associations.
This lecture demonstrates adding stocks navigation links in a Rails app and explains CRUD—create, read, update, destroy—as a full scaffolded system for managing stocks.
Authenticate users in a Rails app with devise, enforcing sign in before accessing stocks and CRUD actions. The video demonstrates using before_action authenticate_user! and redirecting to sign in.
Enable creation of stocks for the current user by using the current_user helper to populate the user_id, hide the field, and show only the logged-in user's tickers.
Discover how to filter the stocks index to show only the current user's stocks by comparing stock.user_id with current_user.id, and present show, edit, and destroy links.
Connect your Rails app to the stock quote gem and display live stock data by pulling from the stocks database into the index view, looping through records.
Learn to wire the stocks index view to the quote gem by displaying each stock's ticker, current price, and company name, with basic error handling and formatting refinements.
Fix blank stock input by validating existence, set ticker, company name, symbol, and latest price to na for missing data, and safeguard future records from being added to the database.
Enable active record validations to enforce ticker presence and prevent empty submissions. Use a format with a regex to block spaces, ensuring ticker can't be blank or invalid.
Connect the stock table to quote data and style the index page with Bootstrap table classes, showing company name, ticker, current price, and market cap.
Improve error handling in a rails stock app by validating tickers, adding market cap support, and ensuring create, edit, and delete actions handle invalid input and missing data.
Customize the stock show page by pulling ticker data from the route and database, and display price, sector, market cap, and percent change in a clean layout.
Set up a custom domain for your Heroku app using a registrar like Namecheap or GoDaddy, then configure a CNAME to point to your Heroku URL.
Explore how to connect to a third-party API, retrieve and store data, and deploy your Rails and Ruby projects to Heroku, while leveraging Bootstrap for UI.
This is a bundle of two of my most popular courses, "Ruby On Rails: Stock Market App" and "Ruby Programming For Everyone".
The question I get asked most often is this..."Do I need to learn Ruby in order to use Ruby on Rails?"
The answer is...No! But you SHOULD learn Ruby if you really want to become a Rails master. This course is perfect because you'll learn both the Ruby programming language from beginner to advanced AND Ruby on Rails.
We'll start out learning Ruby and we'll start by setting up a free cloud development environment that has all the tools you need to start writing and running Ruby code.
Then, we'll dive into very basic computer science concepts. Things like:
After that, we'll move into more intermediate topics like:
Finally we'll finish up with more advanced topics like:
After that we'll move into Ruby on Rails and build a cool stock market app!
Our Stock Market app will let you look up stock quotes and financial information and save it to a database.
Users can create an account and sign up to your website, log in, add stocks, check stock prices and all kinds of other cool financial information.
We'll style the website using the popular Bootstrap CSS framework (I'll show you how to use it!)
We'll end by pushing our app to a professional web host (Heroku) which I'll show you how to use for free! We'll even talk about getting a domain name and all that fun stuff.
If you've ever wanted to learn Ruby on Rails and were put off about learning Ruby, then this is the course for you.
I'll see you on the inside!