Updated for Rails 4.0.0+
-
Set up the
bowergem. -
Follow the Bower instructions and list your dependencies in your
bower.json, e.g.// bower.json
{
| doctype html | |
| html.no-js | |
| head | |
| meta charset="utf-8" | |
| meta content="IE=edge" http-equiv="X-UA-Compatible" | |
| title Title | |
| meta content="width=device-width,initial-scale=1" name="viewport" | |
| <!DOCTYPE html> | |
| <html lang="fr" manifest="/manifeste.appcache"> | |
| <head> | |
| <!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge"><![endif]--> | |
| <meta charset="UTF-8"> | |
| <!-- Meta SEO --> | |
| <title>Web App</title> | |
| <meta name="author" content="author"> | |
| <meta name="description" content="Description"> | |
| <!-- RWD --> |
| # encoding: utf-8 | |
| xml.instruct! | |
| # Drop this file in your source directory | |
| # | |
| # Uses the builder gem. | |
| # Add | |
| # gem 'builder', '~> 2.0' | |
| # to the Gemfile, and run builder install | |
| # |
| /** | |
| * Responsive mixin. The media breakpoints are as defined | |
| * in the twitter bootstrap framework: | |
| * | |
| * - phone | |
| * - tablet-portrait | |
| * - tablet-landscape-desktop | |
| * - large-desktop | |
| * | |
| * Additional parameters for tagetting retina and non-retina |
Updated for Rails 4.0.0+
Set up the bower gem.
Follow the Bower instructions and list your dependencies in your bower.json, e.g.
// bower.json{
I'm planning on either writing this up in detail or maybe doing a screencast about screencasting, but I'll give a short version here.
On sound quality:
This matters a lot. In decreasing order of importance:
| -- Remove the history from | |
| rm -rf .git | |
| -- recreate the repos from the current content only | |
| git init | |
| git add . | |
| git commit -m "Initial commit" | |
| -- push to the github remote repos ensuring you overwrite history | |
| git remote add origin [email protected]:<YOUR ACCOUNT>/<YOUR REPOS>.git |
| remove_file 'Gemfile' | |
| create_file 'Gemfile' | |
| add_source "https://rubygems.org" | |
| gem 'rails', '~> 3.2.12' | |
| if yes?('PostgreSQL on development?') | |
| gem 'pg' |
A site that I like to point people to is dontfeartheinternet.com. It has great videos to learn the basics.
There are lots of people that blog interesting stuff, but it's kinda hard to name just a few. Sooner or later you'll find them by Googling or on Twitter.
I'm not really into reading books and rather learn by just experimenting. Maybe tools like codepen.io or cssdeck.com let you play around and see the result instantly updated.
There are also some online learning services like codecademy.com or teamtreehouse.com that teaches more in an interactive way.
Serving Rails static assets is hard, especially on Heroku Cedar where Heroku forces Rails to serve static assets itself (which isn't particularly performant nor worth your dyno-dollar)---this is different than Heroku Bamboo which used Varnish and is no more. To make the best of the situation, I highly recomend:
Using the Heroku-Deflater gem which will selectively gzips assets (it gzips text-based files; and excludes images or binary files, which can actually be bigger when gzipped)
Configure your production environment to set cache-control headers and get out of denial about how static assets are being served on Heroku Cedar
Use AWS Cloudfront (or a CDN of your choosing) to serve the assets. Cloudfront is great because you can use the same Distribution