Include this in Gemfile
, which is a file located in the root folder of your app:
# Gemfile
gem "starter_generators", :git => "http://github.com/raghubetina/starter_generators.git"
We will be using the [Devise gem][2] to help us get started with authentication (are you who you say you are?) and authorization (are you allowed to do/see this?).
gem 'devise'
to your Gemfile and bundle
rails g devise:install
Devise will give you some setup instructions. We don't need to worry about most of them, but we do need to set a root URL. Usually, you will point the root URL to the index action of some important resource in your application: In config/routes.rb
:
We're going to use GitHub for all of our code-sharing and submission.
All of our apps are just a folder with some files (maybe some HTML files, some CSS files, etc) and other folders in it. We call the top-level folder a "repository". You'll find the list of the repositories we'll work on during this course on the organization page (your course org is probably called something like appdevwinter2017
):
Sign up for a Heroku account and install the toolbelt if you haven't already.
In your Gemfile, add
The "print working directory" command:
Our apps are nothing more than a collection of URLs that we decide to allow users to access:
mydomain.com/products
mydomain.com/photos/193
mydomain.com/signin
So remember: everything always starts with a route between a URL we want to support and a Ruby method that will be responsible for generating a response to the user's browser.