Let's Code – How to setup Bootstrap 4 on Ruby on Rails 5

12
75



Let’s Code a quick and easy responsive website using Bootstrap 4 on Ruby on Rails 5! In this episode we setup Bootstrap 4 on a Rails application for some of that responsive and mobile first goodness.

Re-uploaded in HD 🙂

For this Rails 5 app we use the following built-in Rails features:

– Generators (controller)
– Rubygems (Bootstrap 4, Tether)
– Asset Pipeline
– Layouts and views

Don’t forget to subscribe and let’s be friends! Feel free to say hello in the comments. 🙂

Elsewhere on the Internet:

Shop:
Twitter:
Instagram:

Have a lovely day!

(づ。◕‿‿◕。)づ

Nguồn:https://quydinh.com/

12 COMMENTS

  1. hi i followed the github instructions but i am having this error..

    ActionView::Template::Error (undefined not callable):

    5: <%= csrf_meta_tags %>

    6: <%= csp_meta_tag %>

    7:

    8: <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>

    9: <%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>

    10: </head>

    11:

    (execjs):1

    app/views/layouts/application.html.erb:8:in `_app_views_layouts_application_html_erb__640596153_36490980'

    Please help, i dont know what i did wrong…

  2. Ok its 2018. I am trying to work with the latest Bootstrap 4. Followed every step from the link you used i.e. bootstrap-rubygem. However, I am getting "invalid regexp character" at "stylesheet_link_tag" in application.html.erb
    Why is it happening? Is it the issue with the latest gem?
    Help

  3. For some reason I get a runtime error when I refreshed the page after I changed my routes, except my controller is called posts so my routes would just be "root 'posts#index'" wouldn't it?

  4. What is that package u installed for sublime that allows you to find the folders like that??? U have gemfile and u r searching at the same time… Thank you

  5. I don't know, not a rails dev, but I tried to install the latest bootstrap gem and everything else in the vid and my nav menus ONLY come out blocked or stacked(tried in a few browsers). Tried a few examples from the web and my work.

    No problems when I use the CDN for my other projects in .net or php or on a blank page. I patched it with css but it is strange that it would work that way.

LEAVE A REPLY

Please enter your comment!
Please enter your name here