Rails, Bower, Materialize, Heroku
To install Bower, you need to have to have node, npm, and git installed. Then run npm install -g bower
Create a bower.json file and add:
{
"name": "personal-website",
"dependencies": {
"jquery": "latest",
"materialize": "latest",
"d3": "latest",
"underscore": "latest"
}
}
In .bowerrc:
{
"directory": "vendor/assets/components"
}
Run bower install
In the class application of config/application.rb:
config.assets.paths << Rails.root.join('vendor', 'assets', 'components')
In Gemfile include: gem 'materialize-sass'
In app/assets/javascripts/application.js (add dependencies to your asset manifest files):
//= require jquery
//= require jquery_ujs
//= require turbolinks
//= require_tree .
//= require materialize
//
// Bower packages
//= require d3
//= require underscore
//
In app/assets/stylesheets/application.css (add dependencies to your asset manifest files):
*= require materialize
In a .gitignore, include:
/vendor/assets/components/*
Deploy to Heroku!
heroku create <app-name>
git push heroku master (or 'git push heroku <branch-name>-master)