# Installation

  • Meet Rails

    Rails is a web application framework designed to make programming web applications easier by making assumptions about what every developer needs to get started.

    Rails strives to provide an amazing developer experience while providing powerful features such as through queues and scheduled jobs , an expressive database i.e activerecord , generator and scaffoldings.

    Whether you are new to Ruby web frameworks or have years of experience, Rails is a framework that can grow with you. We'll help you take your first steps as a web developer or give you a boost as you take your expertise to the next level. We can't wait to see what you build.

  • Why Rails

    There are a variety of tools and frameworks available to you when building a web application. However, we believe rails is the best choice for building modern, full-stack web applications.

    • Don't Repeat Yourself: DRY is a principle of software development which states that "Every piece of knowledge must have a single, unambiguous, authoritative representation within a system". By not writing the same information over and over again, our code is more maintainable, more extensible, and less buggy.
    • Convention Over Configuration: Rails has opinions about the best way to do many things in a web application, and defaults to this set of conventions, rather than require that you specify minutiae through endless configuration files.
  • Your First Rails Projects

    Before creating first rails projects, you should ensure that your local machine has ruby. We recommend you install RVM (https://rvm.io/ (opens new window)) to install and manage multiple ruby versions. In addition, We recommend installing yarn.

    you may create new rails projects by globally installing the rails installer via gem:

    gem install rails
    rails new blog
    
    1
    2

    After the project has been created, start the rails local development server using the rails serve command

    cd blog
    bin/rails server
    
    1
    2

    This will start up Puma, a web server distributed with Rails by default. To see your application in action, open a browser window and navigate to http://localhost:3000 (opens new window). You should see the Rails default information page.

  • Initial Configuration

    All of the configuration files for the rails are stored in the config directory. Each option is documented, so feel free to look through the files and get familiar with the options available to you.

    Rails needs almost no additional configuration out of the box. You are free to get started developing! However, you may wish to review the config/application.rb file and its documentation. It contains options such as the timezone that you may wish to change according to your application.

  • Environment Based Configuration

    Since many rails configuration option values may vary depending on whether your application is running on your local machine or on a production web server, many important configuration values are defined in config/environments file.

    Your config/environments folder is committed to your application's source control since each developer / server using your application could require a different environment configuration. Furthermore, this would be a security risk in the event an intruder gains access to your source control repository since any sensitive credentials would get exposed. We will learn about .env file and how to use them

  • Databases & Migrations

    Now that you have created your Rails application, you probably want to store some data in a database. By default, your application's config/database.yml configuration file specifies that rails will be interacting with a sqlite database

    .