How to put mdbootstrap files into Ruby on Rails project?


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

Lukis92 asked 4 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!

Michal Szymanski staff pro answered 4 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.

lcrv pro answered 4 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"

Lukis92 answered 4 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).

Michal Szymanski staff pro answered 4 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.

kodero pro answered 2 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

Arslan Asif answered 10 months 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".

Piotr Obrebski staff answered 10 months 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

Please insert min. 20 characters.


Specification of the issue
  • User: Free
  • Premium support: No
  • Technology: General Bootstrap questions
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: No
  • Provided link: No