Date post: | 19-Jan-2015 |
Category: |
Technology |
Upload: | ivan-storck |
View: | 333 times |
Download: | 4 times |
DOGS AND CATSLIVING TOGETHER
Mass Hysteria!
RAILS ENGINESMANUAL DOWNLOADS
BOWER + RAILS
RAILS NEW BOWERAILS$ rails new bowerails create create README.rdoc create Rakefile create config.ru create .gitignore create Gemfile create app ...Using rails (4.0.2)Using rdoc (3.12.2)Using sass (3.2.12)Using sass-rails (4.0.1)Using sqlite3 (1.3.8)Your bundle is complete!Use ̀bundle show [gemname]̀ to see where a bundled gem is installed.
ADD BOWERRAILS TO GEMFILEsource 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'gem 'rails', '4.0.2'
# Use bower for front end assetsgem 'bower-rails'
and then?bundle
GENERATErails g bower_rails:initialize create bower.json
results in a bower.json file containing:{ "lib": { "name": "bower-rails generated lib assets", "dependencies": { } }, "vendor": { "name": "bower-rails generated vendor assets", "dependencies": { } }}
CONFIGUREconfig/application.rb
module Bowerails class Application < Rails::Application
# Configure Bower config.assets.paths << Rails.root.join('vendor', 'assets', 'bower_components') endend
CONFIGURE, STEP 2app/assets/stylesheets/application.css
*= require bootstrap
app/assets/javascripts/application.js//= require bootstrap
Bowerfileasset "bootstrap"
and then...
Installrake bower:install
BIZOWZER!rake bower:update
keeps your front-end compenents up-to-date!
Ivan Storck
@ivanoats
@codefellowsorg
Faculty Blog
Codefellows Blog