Topic: How to put mdbootstrap files into Ruby on Rails project?

Lukis92 free asked 8 years ago


I'm and I don't know where put mdb files into RoR project.. Could you write me instruction where put each files? Thanks a lot!

MDBootstrap staff answered 5 years ago


Hi Arslan Asif,

You need to @import all scss files to compile mdb.scss styles. File mdb.scss is used to import every part of our custom styles, with your custom styles at the end to overwrite ours. We compile them in gulp as a default, but you can use any scss compiler to do that.

Best Regards, Piotr


Arslan Asif free answered 5 years ago


how can we attach scss files ? and access variable .. i tried it adding to project css directory and @import mdb.scss in application.scss but it gives the following error

Undefined variable: "$mdb-colors-1".


Michal Szymanski staff answered 6 years ago


Here you can find a tutorial: https://mdbootstrap.com/articles/jquery/md-bootstrap-ruby-on-rails-tutorial/


kodero pro answered 6 years ago


Hello, I need this guide also for my client project, do you have step by step instruction how to integrated mdb with RoR ? Thanks in advanced

Michal Szymanski staff answered 8 years ago


Cześć Łukasz, nie, plików sassowych nie musisz w ogóle wrzucać do swojego projektu, jeśli nie zamierzasz ich zmieniać. Ewentualne zmiany w CSS zalecałbym dokonywać na odzielym pliku CSS, który nadpisywałby nasze classy.

Lukis92 free answered 8 years ago


Sass files(free folder) also should I put in vendor/assets/stylesheets ? Thanks in advance. Michał już korzystałem z bootstrapa w railsach(dokładnie bootstrap-sass).

lcrv pro answered 8 years ago


Helo Lukis92, you can easily copy it into vendor/assets/ and in application.html, you can link to it using
javascript_include_tag 'mdb.min'
stylesheet_link_tag "mdb.css"

Michal Szymanski staff answered 8 years ago


Hello, because MDB is based on Bootstrap I would recommend you to watch some tutorial "Bootstrap and Ruby on Rails". You can easily find it via Google.

Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: General Bootstrap questions
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: No
  • Provided link: No