• Friday , 28 February 2020

How to build a blog with Rails 5 and Bootstrap 4 – Part 1

Code Canyon

Check out https://www.techmaker.tv for tons of more content like this.

HEADS UP: In your Gemfile, you will need to change:

gem ‘bootstrap’


gem ‘bootstrap’, ‘4.0.0.alpha3’

Download the code from the Github repo:


In this episode, we go over setting up a basic project with Ruby on Rails 5 and Bootstrap 4. We talk about how to build nice looking URLs for your blog posts using the FriendlyId gem.

We also go over how to pass variables between the layout and the view using yield and provide.

Finally, we discuss instance variables and ERB tags.

Original source

3d Ocean

Related Posts


  1. rot rose
    January 24, 2019 at 13:57

    It is just Great! Very exciting to follow u until building this to the end. Thank you

  2. coyotemoon722
    January 24, 2019 at 13:57

    @TechmakerTV Totally missed the "Heads Up" in description. I think an annotation would be much more helpful as I was stuck on this for over an hour getting errors.

  3. Aayush GC Bhujel
    January 24, 2019 at 13:57

    Hi! I followed the same instruction for the same link. Its not Bootstrap 4.1.1 and for some reason its not working.
    I am getting "invalid regexp character" at "stylesheed_link_tag" line in application.html.erb file

  4. Gordon Neal
    January 24, 2019 at 13:57

    there is a problem with rails 5.1 and migration the current version of the website covers this and much time would have been saved if you had.

  5. Emmanuel Johnson
    January 24, 2019 at 13:57

    I hope you know how much you are helping people. This page is helping me so much. You my friend just earned your self a subscriber.

  6. TyLord89
    January 24, 2019 at 13:57

    I have been following your tutorial, but i have some issues with rail versions, since mine is 5.1, you see, the navbar dosent work, it gives me some kind of a crazy look, secondely it sayss that the popper library is not present when it is

  7. Audrey Joanne
    January 24, 2019 at 13:57

    root to: 'posts#index' doesn't work for me but root :to => "posts#index"
    does… anyone knows why?

  8. Marco Amodio
    January 24, 2019 at 13:57

    thank you

  9. Andrian Firmansyah
    January 24, 2019 at 13:57

    wow first time using rails.. what kind of magic

  10. Anton Anoshko
    January 24, 2019 at 13:57

    I have a problem with migration and solution 🙂

    Rails version: 5.1.0.rc1
    Ruby version: 2.4.0 (x86_64-linux)

    StandardError: An error has occurred, this and all later migrations canceled:
    Directly inheriting from ActiveRecord::Migration is not supported. Please specify the Rails release the migration was written for: class RolifyCreateRoles < ActiveRecord::Migration[4.2]

    Solution: I change class RolifyCreateRoles < ActiveRecord::Migration to class RolifyCreateRoles < ActiveRecord::Migration[5.0]

  11. Ed
    January 24, 2019 at 13:57

    Sorry for bringing this up late but I had to mention something.
    I used
    gem 'bootstrap', '4.0.0.alpha6' and my navbar was arranged vertically not horizontally ie
    instead of FrogBlog About Contact
    So just incase someone starting the series sees this if possible don't use that version, use the one Stephen recommends, I've just used it on a different project and I'm getting the same issue. I don't know what the problem is.

  12. IMAGINATION begins
    January 24, 2019 at 13:57

    well how can i visualize the data that i insert? for example from database, i want to create the list of exercises and i want to visualize based on what the user selects on? can u explain it to me?

  13. ArkAngelHFB
    January 24, 2019 at 13:57

    Small tip, when someone is trying to follow along on youtube, if you make everything your typing be right at the bottom on the page, you are placing it under the video interface meaning that if you go too fast and someone tries to pause to see what you typed… they can't.

  14. Hannes Hertach
    January 24, 2019 at 13:57

    when trying to open the page at 9:13, I get this error: AbstractController::Helpers::MissingHelperError in PostsController#index
    any help?

  15. Akash Agarwal
    January 24, 2019 at 13:57

    Great tutorial bruv! i'd like to point out you're too hard on your return key 😛

  16. Duta Ksp
    January 24, 2019 at 13:57


    Thanks for you great tutorials. They help me so much in learning ruby on rails 5.
    Please make more tutorials till this FrogBlog to finish to the limit you could make. And I sure you can do that ….

    I wish you are well…

    Nyoman, Bali, Indonesia

  17. Duh Bruno
    January 24, 2019 at 13:57

    Which theme / plugins do you use with sublime ? Is this sublime 2 or 3? Btw, nice content dude !!! Keep on doing this good work !!

Leave A Comment

You must be logged in to post a comment.