<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Seth Schwartz on Medium]]></title>
        <description><![CDATA[Stories by Seth Schwartz on Medium]]></description>
        <link>https://medium.com/@sschwartz214?source=rss-4daa8ab810f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*7LijPINDG5BVEIDr</url>
            <title>Stories by Seth Schwartz on Medium</title>
            <link>https://medium.com/@sschwartz214?source=rss-4daa8ab810f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 11:42:19 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sschwartz214/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Step by Step Guide on How to Use Materialize in Your Ruby on Rails App]]></title>
            <link>https://medium.com/@sschwartz214/step-by-step-guide-on-how-to-use-materialize-in-your-ruby-on-rails-app-18c607924ae4?source=rss-4daa8ab810f------2</link>
            <guid isPermaLink="false">https://medium.com/p/18c607924ae4</guid>
            <category><![CDATA[materialize]]></category>
            <category><![CDATA[css]]></category>
            <category><![CDATA[material-design]]></category>
            <category><![CDATA[html]]></category>
            <category><![CDATA[ruby-on-rails]]></category>
            <dc:creator><![CDATA[Seth Schwartz]]></dc:creator>
            <pubDate>Wed, 01 Aug 2018 06:22:53 GMT</pubDate>
            <atom:updated>2018-08-02T14:05:30.512Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/956/1*9-Mo49cPdGrIq08n6dWc8Q.png" /></figure><p>As a backend engineering student at Turing School of Software and Design most of my time is dedicated to learning the principal concepts of, you guessed it, backend engineering. However, every project I have had to construct was required to have a front-end. In the beginning of the mod I scrambled to learn html and css. I was able to grasp the basics and produce “something” in the browser but it was a far cry from pretty design. Then I was introduced to flexbox which made designing pages slightly easier but I was still left unsatisfied with how my pages looked. Then my prayers were answered and I discovered Bootstrap! This made styling pages easy, fun, and the product looked much better than anything I had ever produced.</p><p>Most recently I found out about Google’s version of Bootstrap, Materialize, which is a front-end framework based off of Material Design. I was excited to try it out but I had a hard time finding documentation on how to set it up and use it; specifically with Ruby on Rails. I had to take bits and pieces from several resources to finally figure it out. Lucky for you I have compiled all that information and what I would like to do is walk you through setup and then design a simple navbar using Material UI in a Ruby on Rails app. So here we go:</p><p>First create a new app by typing the following into the command line:</p><pre>rails new materialize_app</pre><p>Then we’ll create a controller and view with the following command line input:</p><pre>rails g controller welcome index</pre><p>Now, visit Materialize’s Githbub page: <a href="https://github.com/mkhairi/materialize-sass">https://github.com/mkhairi/materialize-sass</a> and copy the following gem:</p><pre>gem &#39;materialize-sass&#39;</pre><p>Then, paste this gem into your GemFile, preferably under the first section of gems like so:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c3ir1JDYf-tAl2PEZe6a5w.png" /></figure><p>Next, as we always do when we add a new gem, run:</p><pre>bundle install</pre><p>Now, we will import the Materialize files. First, navigate to your application.scss file. If all you have is an application.css file, change the extension to reflect the former. In this file insert the following:</p><pre>#materialize_app/assets/stylesheets/application.scss<br><br>@import &quot;materialize&quot;;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0Di6V5Mfrp5NYMfh1oaEKQ.png" /></figure><p>Next, add the following code to your application.js file:</p><pre><em>#materialize_app/assets/javascripts/application.js</em><br><br>//= require turbolinks  <br>//= require materialize-sprockets</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HV3OID4k6ukbY3MyOo0tXQ.png" /></figure><p>Now as a starting example on how to use Materialize’s pre-made designs, let’s visit <a href="https://materializecss.com/navbar.html">https://materializecss.com/navbar.html</a>. Pick any of the designs and copy and paste the code into your application.html.erb file:</p><pre>#materialize_app/views/layouts/application.html.erb</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bGtjs4OBLJWE5SkgJVv-qw.png" /></figure><p>Let’s now make a the root page the the welcome index by adding the following line into your routes:</p><pre><em>#materialize_app/config/routes.rb</em></pre><pre>root &#39;welcome#index&#39;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*D0OueaAvOtV3XYZWELfBrA.png" /></figure><p>Lastly, lets start up a server by entering in your command line:</p><pre>rails s</pre><p>Now, open up your web browser enter the following:</p><pre>localhost:3000</pre><p>And voila! You should see your brand new navbar.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0MyUoVbZUiIZjdmDzRIv3g.png" /></figure><p>You can now add all different types of styling by simply finding what you want on the Materialize website and adding it to your code. I found this immensely helpful and I hope you are able to apply what you’ve read in this tutorial to your future projects.</p><p>Please feel free to question, comment or like below:</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=18c607924ae4" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>