Challenges – 2 slides Opportunities – 4 slides How ? - 3 slides Recommendations – 1 slide
Slides
-
Upload
alex-walton -
Category
Technology
-
view
251 -
download
0
description
Transcript of Slides
Rails ToolsDan Bunker
http://www.linkedin.com/in/bunkerdan
Friday, May 10, 2013
Gem!le
Friday, May 10, 2013
Gem!le
Keeps track of all dependencies in your project
Friday, May 10, 2013
Gem!le
Keeps track of all dependencies in your project Specify alternate gem repositories (like a corporate gem repo)
Friday, May 10, 2013
Gem!le
Keeps track of all dependencies in your project Specify alternate gem repositories (like a corporate gem repo) Group dependencies by environment
Friday, May 10, 2013
Add a gem dependency gem ‘gem_name’ gem ‘gem_name’, ‘version’ gem ‘gem_name’, ‘git_repo’
Gem!le
Keeps track of all dependencies in your project Specify alternate gem repositories (like a corporate gem repo) Group dependencies by environment
Friday, May 10, 2013
Database Migrations in Depth
Keep your database structure in sync in all environments Development (Bleeding Edge) Testing (Close to development or slightly behind) Production (Behind testing and development)
Friday, May 10, 2013
Database Migrations in Depth
Keep your database structure in sync in all environments Development (Bleeding Edge) Testing (Close to development or slightly behind) Production (Behind testing and development)
schema_migrations table used to track versions
Friday, May 10, 2013
Database Migrations in Depth
Keep your database structure in sync in all environments Development (Bleeding Edge) Testing (Close to development or slightly behind) Production (Behind testing and development)
Development
Version 9
Apprelease 1.3
schema_migrations table used to track versions
Friday, May 10, 2013
Database Migrations in Depth
Keep your database structure in sync in all environments Development (Bleeding Edge) Testing (Close to development or slightly behind) Production (Behind testing and development)
Testing
Version 6
Apprelease 1.2
Development
Version 9
Apprelease 1.3
schema_migrations table used to track versions
Friday, May 10, 2013
Database Migrations in Depth
Keep your database structure in sync in all environments Development (Bleeding Edge) Testing (Close to development or slightly behind) Production (Behind testing and development)
Production
Version 3
Apprelease 1.1
Testing
Version 6
Apprelease 1.2
Development
Version 9
Apprelease 1.3
schema_migrations table used to track versions
Friday, May 10, 2013
Data Seeding
Load preferences, lookups or other needed data
Friday, May 10, 2013
Data Seeding
Load preferences, lookups or other needed data Seed data goes in db/seeds.rb
Friday, May 10, 2013
Data Seeding
Load preferences, lookups or other needed data Seed data goes in db/seeds.rb rake db:seed
Friday, May 10, 2013
Generators Overview
Friday, May 10, 2013
Generators Overview
Generators create boilerplate code for pieces of your application
Friday, May 10, 2013
Rails provides a set of default generators “rails generate” or “rails generate --help”
Generators Overview
Generators create boilerplate code for pieces of your application
Friday, May 10, 2013
Rails provides a set of default generators “rails generate” or “rails generate --help”
Generators Overview
Generators create boilerplate code for pieces of your application
Gems can provide generators and you can write your own custom generators
Friday, May 10, 2013
Generating Models
Friday, May 10, 2013
Generating Models
Model generator creates an ActiveRecord model and a migration
Friday, May 10, 2013
Generating Models
Model generator creates an ActiveRecord model and a migration Pass in attributes and their data types to leverage more code
generation
Friday, May 10, 2013
Generating Models
Model generator creates an ActiveRecord model and a migration Pass in attributes and their data types to leverage more code
generation
rails generate model model_name attr1:string attr2:integer etc.
Friday, May 10, 2013
Generating Controllers
Friday, May 10, 2013
Generating Controllers
Controller generator will create a controller and folder stubs for its views
Friday, May 10, 2013
Generating Controllers
Controller generator will create a controller and folder stubs for its views Pass in actions to have the generator create view stub !les for the actions
Friday, May 10, 2013
Generating Controllers
Controller generator will create a controller and folder stubs for its views Pass in actions to have the generator create view stub !les for the actions rails generate controller contr_name action1 action 2
Friday, May 10, 2013
Rails Console Overview
Friday, May 10, 2013
Rails Console Overview
Interactive interpreter with your rails project loaded
Friday, May 10, 2013
Rails Console Overview
Interactive interpreter with your rails project loaded Good way to become familiar with code or features or to debug
Friday, May 10, 2013
Rails Console Overview
Interactive interpreter with your rails project loaded
Start the rails console with the following command rails console rails console production
Good way to become familiar with code or features or to debug
Friday, May 10, 2013
Rails DB Console
Friday, May 10, 2013
Rails DB Console
A wrapper around your database console
Friday, May 10, 2013
Rails DB Console
A wrapper around your database console An easy way to deal with MySQL, PostgreSQL and SQLite
Friday, May 10, 2013
Rails DB Console
A wrapper around your database console
Start the rails db console with the following command rails dbconsole rails dbconsole production -p
An easy way to deal with MySQL, PostgreSQL and SQLite
Friday, May 10, 2013
Other Rake Tasks
Friday, May 10, 2013
Other Rake Tasks
rake about
Friday, May 10, 2013
Other Rake Tasks
rake about rake stats
Friday, May 10, 2013
Other Rake Tasks
rake about rake stats rake test
Friday, May 10, 2013
Asset Pipeline Overview
Friday, May 10, 2013
Asset Pipeline Overview
Framework for images, JS and CSS resources
Friday, May 10, 2013
Asset Pipeline Overview
Framework for images, JS and CSS resources Rails asset pipeline will auto minify and compress JS and CSS
Friday, May 10, 2013
Asset Pipeline Overview
Framework for images, JS and CSS resources Rails asset pipeline will auto minify and compress JS and CSS Asset pipeline supports enhanced languages such as CoffeeScript and
SASS
Friday, May 10, 2013
Summary
Friday, May 10, 2013
Summary
Gem!les and dependencies
Friday, May 10, 2013
Summary
Gem!les and dependencies Database Migrations
Friday, May 10, 2013
Summary
Gem!les and dependencies Database Migrations Data seeding
Friday, May 10, 2013
Summary
Gem!les and dependencies Database Migrations Data seeding Generators overview - Model, Controller
Friday, May 10, 2013
Summary
Gem!les and dependencies Database Migrations Data seeding Generators overview - Model, Controller rails console and rails dbconsole
Friday, May 10, 2013
Summary
Gem!les and dependencies Database Migrations Data seeding Generators overview - Model, Controller rails console and rails dbconsole Other rake tasks
Friday, May 10, 2013
Summary
Gem!les and dependencies Database Migrations Data seeding Generators overview - Model, Controller rails console and rails dbconsole Other rake tasks Asset pipeline
Friday, May 10, 2013