
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.
Learn how to manipulate strings in Ruby by treating them as objects, using dot methods like down case, up case, capitalize, reverse, and length.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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 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.
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.
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.
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.
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!