Loading Video...
Close Video Installing Laravel on Amazon EC2

Installing Laravel on Amazon EC2

Play Video

Amazon EC2 makes it very easy to scale the servers that our web applications live on. This video tutorial will show you how to load up an Amazon EC2 ubuntu server and setup Apache, PHP, & MySQL on the server. I will then go through the basics of setting up the environment for a basic Laravel 4 installation.

Here is the cheat sheet of commands that I was using throughout the video:

———- Installing Apache ———-

$ sudo apt-get install apache2

———- Installing Latest PHP ———-

$ sudo add-apt-repository ppa:ondrej/php5
$ sudo apt-get update
$ sudo apt-get install php5 libapache2-mod-php5

———- Installing PHP Mcrypt ext. ———-

$ sudo apt-get install php5-mcrypt

———- Installing MYSQL ———-

$sudo apt-get install mysql-server

———- Installing GIT ———-

$ sudo apt-get install git-core

———- Laravel GIT Repo ———-


———- Installing Composer ———-

curl -sS https://getcomposer.org/installer | php

Here are a few additional resources:
This is the command I used at the beginning of the video to run apt-get update:

$sudo apt-get update --fix-missing

Here is the URL to the documentation on how to SSH into your Amazon EC2 instance:


Loading Video...
Close Video laravel-4-simple-authentication

Laravel 4 – Simple Authentication

Play Video

Laravel 3 & Laravel 4 are fairly different. The concepts are the same; however, there are some things that someone might get caught up in when migrating from version 3 to version 4. So, I thought I would create another tutorial on creating a simple authentication system with Laravel 4. Checkout the short video below on how to easily create a basic user authentication system using L4.

Loading Video...
Close Video sublime-text-snippets

Sublime Text Snippets

Play Video

Creating Snippets with Sublime Text is a breeze. Checkout this video to learn how to create a basic HTML skeleton snippet. You will then be able to create all the snippets your heart desires!

For more tips & tricks using sublime make sure to checkout this excellent article on Net Tuts+: http://net.tutsplus.com/tutorials/tools-and-tips/sublime-text-2-tips-and-tricks/

Loading Video...
Close Video rails-authentication-with-devise

Rails Authentication With Devise

Play Video

The Devise Gem makes it really easy to create a full authentication app with Ruby on Rails. In the video below, I will walk you through setting up and installing the Devise Gem on your rails app. Below the video are all the commands and code that I used to create the application.

First off, we need to create our new rails application.

$ rails new devise

$ cd devise

$ mate .

Inside of your text editor, you’ll want to add the devise to your ‘Gemfile’, which is located in the application root directory. Add the following line to the ‘Gemfile':

gem 'devise'

Back in your terminal window:

$ bundle install

$ rails generate devise:install

$ rails generate devise user

$ rake db:migrate

$ rails g controller home

$ rails g controller dashboard

Inside of your ‘/app/controllers/home_controller.rb’ file, add the following:

def index
  if user_signed_in?
    redirect_to :controller=>'dashboard', :action => 'index'

Inside of your ‘/app/controllers/dashboard.rb’ file, add the following:

before_filter :authenticate_user!
def index    

Inside of your ‘/app/views/home/’ and ‘/app/views/dashboard/’ directories create a new file called ‘index.html.erb’ and add the following code into each file:

Welcome to our Website

Welcome to your dashboard

Now, inside of your ‘/app/views/layouts/application.html.erb’ add the following code below the opening ‘body’ tag:

<% if user_signed_in? %> Signed in as <%= current_user.email %>. Not you? <%= link_to “Sign out”, destroy_user_session_path, :method => :delete %> <% else %> <%= link_to “Sign up”, new_user_registration_path %> or <%= link_to “sign in”, new_user_session_path %> <% end %>
<% flash.each do |name, msg| %>
  <%= content_tag :div, msg, :id => "flash_#{name}" %>
<% end %>

Inside of your ‘/public/’ folder, rename the ‘index.html’ to ‘index.html.bak’.

Finally add the lines of code in your ‘/config/routes.rb’ file, below (devise_for :users)

resources :dashboard
root to: "home#index"

Back in your terminal start the rails server with this command:

$ rails s

And there ya go! It’s that simple to integrate the Devise Authentication Gem in your application :)