Skip to content

infancyit/rails_bootstrap

Repository files navigation

Rails 5.1 example application that integrates Rails and Bootstrap 4.0.

Before generating your application, you will need:

  • The Ruby language – version 2.4.1
  • The Rails gem – version 5.1

Install the Required Gems

If you used the Rails Composer tool to generate the example app, the application template script has already run the bundle install command.

If not, you should run the bundle install command to install the required gems on your computer:

$ bundle install

You can check which gems are installed with:

$ gem list

Keep in mind that you have installed these gems locally. When you deploy the app to another server, the same gems (and versions) must be available.

Configuration File

To consolidate configuration settings in a single location, store credentials in the config/secrets.yml file. To keep your credentials private, use Unix environment variables to set your credentials. See the article Rails Environment Variables for more information.

This is the default config/secrets.yml file:

development:
  secret_key_base: (not shown)

Get a unique secret token:

rake secret

Edit the config/secrets.yml file to change the secret token.

Test the App

You can check that your application runs properly by entering the command:

$ rails server

Releases

No releases published

Packages

No packages published