Follow these steps to get Ruby on Rails set up on your computer
Make sure you have Rails 5, Ruby 2, Sublime Text, and your command line ready before moving on.
The command line can be a scary place for beginners, but there are only a handful of commands you'll need to know in order to use it.
I'm going to show you how to create a new Ruby on Rails application
Git lets you save different versions of your files to make it easier to work with a team, or to go back to previous saves.
Updating .gitignore lets you ignore certain files you don't want Git to track
I'll show you how to do something really useful with Git: go back to your last save
What if you made a mistake and wanted to rename your entire application? It's actually pretty easy.
Let's use git to get your code up on Github
One of the first things you'll want to do in a brand new Rails app is replace the default homepage with one of your own
Setting your root path means changing what page people see when they go to your homepage
You'll need more than just a homepage if you want to build a real web application
Embedded Ruby (ERB) lets you write Ruby code inside your web pages
By moving our links into the application layout, we can avoid duplication of code
We're done for the week, let's save and push our changes to Github
Your assignment for this week...
Bootstrap is a front-end framework that every beginner should use. It's really easy to install with a simple gem.
Remember, ABC: Always Be Committing.
Here are some templates you can use.
How do you move your app live so that others can see it? With a great service called Heroku that lets your deploy your app to the web in seconds.
What to do in case you run into problems with Heroku
Devise is one of the most popular user authentication gems for Rails.
Here I show you how to set up Devise so it works properly inside of our app.
Use Devise to create a user model and migrate those changes into your database.
Devise automatically creates new pages in our app for signing up and signing in.
With the new functionality, we can create a page that users can only see once they've signed in successfully.
A link in the navbar lets users log out of their account.
Of course you'll also want to add links so that users can sign up and sign in again later.
Devise's default routes can be customized so we can use our own path names in our links.
Go into your views to override the default Devise sign up and sign in pages with your own HTML code.
Now to make sure it all works on Heroku too.
A small change will make our app work again on Heroku.
Customize some Bootstrap variables and share your Heroku URL.
I'll show you how to add new Syntax Highlighting and other features to Sublime Text using Package Control.
Registering and setting up a custom domain with Heroku is easy! I'll show you how.
We'll be using a gem called ActiveAdmin to set up our admin area
We need to be able to see what users signed up in our admin area
Lock down your admin area to admins only using these simple steps
We're basically adding a new field to users that keeps track of whether they're an admin or not
I show you a few important steps you can take in case you mess up migrations
How to solve the puzzle of creating your first admin user
Here's what we've done (double check to make sure your changes match before moving on)
I show you how to do some slight tweaking to ActiveAdmin views
Let's finally get this thing live (and test to make sure it works)!
What is this magical scaffold thing?
Let's get a better understanding of what we just did.
Okay, stay with me...
What routes did our new tweets create?
Let's try to undesrtand the new tweets controller
Finally we'll take a look at our new tweet views
Tweets are nothing without users
We'll use the handy current_user method to create our tweets
So we can control our tweets there. Like actual Admins.
We don't want all users to see the links that we currently have, so how do we hide them?
We can block certain actions and force people to log in to access them.
Let's do another git commit and push so that we don't lose our changes.
Here's where things get real. You'll need to create a new resource for your app.
I'll show you how you could use Bootstrap to change the styles of our resource.
We'll walk through the steps of creating another resource to reinforce what we've learned so far.
Rails Validations are essential for making sure your models accept the right values.
Let's modify the default Devise user so that our users have names and usernames
It's pretty easy to create a profile page for users.
Let's start our following feature with the Acts As Follower Gem
I'll show you how to set up a controller, model, views, and routes for the full following functionality.
Feeds are an essential part of a social app, showing all the people that you're following.
Let's get this new feature up on Heroku
In this lesson I nail down a tricky Heroku bug.
I just discovered several bugs for logged out users.
We'll be building voting functionality by using the Acts as Votable gem
In this video I'll explore some of the new voting functionality that we get from the Acts as Votable gem
Let's bring it all together by adding voting to Items
In this lesson I'm going to show you how to do Image Upload with the Paperclip gem.
Installing ImageMagick can be tough. I'll do it on a Mac (it's much easier on a PC).
I'll show you how to add images to tweets
Let's figure out how to show our new images in our tweets.
Let's get our new feature online!
A quick warning... you'll need to set up Amazon S3 if you want images to stick around on Heroku
Congrats! You're done with the class. Here's your last assignment
So you want to keep learning? Good on you! Here are some resources I recommend you check out.
Already have an account?
Don't have an account yet?