Обзор Ruby on Rails
Нистратов Артём
anistratov@go-promo.ru
- RVM
- Ruby
- Gem
- Bundler
- Rails
- Git
RVM

Ruby Version Manager
http://rvm.io
rvm install 1.9.3rvm use 2.1rvm listRuby

2.1.3 :001 > 1 + 2
=> 3
2.1.3 :002 > puts 'Hello world!'
Hello world!
=> nil
2.1.3 :003 > 'Hello'.sub(/[l]+/, 'r').downcase.reverse.chars
=> ["o", "r", "e", "h"]ruby -v
irbGEM

Package Manager
- Repository
- Storage
- CLI
gem install rails --no-ri --no-rdoc- GitHub
- RubyGems
- gem
Rails

rails new first_project.
├── Gemfile
├── Gemfile.lock
├── Rakefile
├── app
| ├── assets
| ├── controllers
| ├── helpers
| ├── mailers
| ├── models
| └── views
├── bin
├── config
├── db
├── lib
├── log
├── public
├── test
├── tmp
└── vendor# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :rubybundle installrake db:createrails s -b 0.0.0.0Bundler

Dependency Resolver
Bundler обеспечивает согласованную среду для проектов на Ruby, отслеживая и устанавливая только те версии пакетов, которые необходимы.
ruby '2.1.2'
source 'https://rubygems.org'
gem 'rails', '~> 3.2.21'
gem 'migration_comments'
gem 'activerecord-mysql-unsigned'
gem 'mysql2'Git

Version Control System
http://git-scm.com/book
git statusgit add ./git commit -m "Initial commit"git config --global user.email "your@email.address"
git config --global user.name "Your Name"Git Workflow
First
By Go-Promo
First
- 1,065