SlideShare a Scribd company logo
LESSON 2
RVM, GIT, RAILS, HEROKU
Pavel Tsiukhtsiayeu
github.com/paveltyk
TODO
• Git
   • Install
   • Configure
• RVM
   • Install RVM
   • Install Ruby
   • Create Gemset
• Rails
   • Install
   • Generate project
   • First commit
   • Start server
• Heroku
   • Install & Configure
   • Push Rails app to Heroku
   • Make it WORK
• Tips & Tricks
Git :: install
• $ sudo apt-get install git-core
Git :: configure
• $ git config --global user.name "PavelT"
• $ git config --global user.email paveltyk@gmail.com




Where does git store its settings?
• /etc/gitconfig (--system)
• ~/.gitconfig (--global)
• .git/config
Git :: configure
• $ git config --list

• user.name=PavelT
• user.email=paveltyk@gmail.com
• color.ui=true
• push.default=tracking

• $ git config user.name

• PavelT

• At least have this 4
Git :: install and configure
• Q&A?
RVM :: install
• $ sudo apt-get install curl
• $ curl –L https://get.rvm.io | bash –s stable


• For RVM to work properly, you have to set the 'Run
  command as login shell' checkbox at Edit / Profile
  Preferences / Title and Commands in Gnome terminal
• More details here:
       https://rvm.io/integration/gnome-terminal
RVM :: install Ruby
• $ rvm requirements

• Requirements for Linux "Ubuntu 12.04.1 LTS”
• ………
• Additional Dependencies:
• # For Ruby / Ruby HEAD (MRI, Rubinius, & REE), install the following:

                        build-essential openssl libreadline6
• ruby: /usr/bin/apt-get install
  libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev
  libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev
  autoconf libc6-dev ncurses-dev automake libtool bison
  subversion pkg-config
RVM :: install Ruby
• $ sudo apt-get install build-essential openssl libreadline6
 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev
 libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev
 autoconf libc6-dev ncurses-dev automake libtool bison
 subversion pkg-config
RVM :: install Ruby
• $ rvm list known

• # MRI Rubies
• [ruby-]1.8.6[-p420]
• ...
• [ruby-]1.9.3[-p194]
• ...
• # Jruby
• ...


• $ rvm install 1.9.3
RVM :: gemset
• $ rvm use 1.9.3
• $ which ruby

• /home/pavelt/.rvm/rubies/ruby-1.9.3-p194/bin/ruby

• $ rvm gemset create first-app
• $ rvm gemset use first-app

• How to easily switch gemsets & Ruby versions [Tips & Tricks]
RVM
• Q&A?
Rails :: install
• $ gem install rails

• Fetching: i18n-0.6.1.gem (100%)
• Fetching: rails-3.2.8.gem (100%)
• ...
• 29 gems installed
• Successfully installed i18n-0.6.1
• ...
• Installing ri documentation for i18n-0.6.1..
• Installing RDoc documentation for rack-cache-1.2...


• Ri and RDoc are slow [see Tips & Tricks]
Rails :: new app
• $ rails new first-app

• create README.rdoc
• create Rakefile
• ……
• Fetching gem metadata from https://rubygems.org/.........
• Using rake (0.9.2.2)
• Using i18n (0.6.1)
• …..
• Your bundle is complete! Use `bundle show [gemname]`
 to see where a bundled gem is installed.
Rails :: app skeleton (partial)
• app/ - core application code (controllers, views, models…)
• config/ - application configuration
• db/ - DB related files (migrations, seeds, etc)
• lib/ - library modules
• log/ - application log files
• public/ - publicly accessible data
• Gemfile - app gem requirements
• .gitignore – patterns for files that should be ignored by git
Git :: init repo & initial commit
• $ cd first-app
• $ git init

• Initialized empty Git repository in /home/pavelt/projects/first-app/.git/

• $ git commit --allow-empty -m 'Initial commit’

• [master (root-commit) 6f32ce8] Initial commit
Git :: add files & commit
• $ git status

• # On branch master
• # Untracked files:
• # (use "git add <file>..." to include in what will be committed)
• #
• #    .gitignore
•   # Gemfile
•   # Gemfile.lock
•   …….
•   nothing added to commit but untracked files present (use "git
    add" to track)
Git :: add files & commit
• $ git add .
• git commit - m ’Initial rails project’
Rails :: start server
• rails s
• => Booting WEBrick
• => Rails 3.2.8 application starting in development on
    http://0.0.0.0:3000
•   => Call with -d to detach
•   => Ctrl-C to shutdown server
•   [2012-09-23 19:46:46] INFO WEBrick 1.3.1
•   [2012-09-23 19:46:46] INFO ruby 1.9.2 (2011-07-09)
    [x86_64-darwin11.2.0]
•   [2012-09-23 19:46:46] INFO WEBrick::HTTPServer#start:
    pid=32565 port=3000
Rails :: http://localhost:3000
Rails :: if rails server failed
• If failed with:

• home/pavelt/.rvm/gems/ruby-1.9.3-p194/gems/execjs-
 1.4.0/lib/execjs/runtimes.rb:51:in `autodetect': Could not
 find a JavaScript runtime. See
 https://github.com/sstephenson/execjs for a list of
 available runtimes. (ExecJS::RuntimeUnavailable)

• Uncomment therubyracer gem in ./Gemfile

• bundle install
• git add Gemfile*
• git commit -m ‘Added gem therubyracer’
Heroku
• What is Heroku?
• Heroku is a cloud application platform – a new way of
    building and deploying web apps. (Heroku | About)
•   Heroku is a cloud platform as a service (PaaS) supporting
    several programming languages. (Wikipedia)
•   Heroku = Easy deployment
•   Heroku = No server managing
•   Heroku = Scale with 1 command
•   Heroku = Read-only file system
Heroku :: deployment
• How to deploy to Heroku?
• Simply push to master branch of your Heroku git repo
• $ git push heroku master
Heroku :: install & configure
• $ gem install heroku

• Register at Heroku sign up page
• https://api.heroku.com/signup
• $ heroku login

• Enter your Heroku credentials.
• Email: paveltyk@gmail.com
• Password (typing will be hidden):
• Authentication successful.

• More info: https://toolbelt.heroku.com
Heroku :: first app
• $ heroku create pavelt-first-app
• Creating pavelt-first-app... done, stack is cedar
• http://pavelt-first-app.herokuapp.com/ | git@heroku.com:pavelt-
  first-app.git
• Git remote heroku added

• $ git remote -v

• heroku git@heroku.com:pavelt-first-app.git (fetch)
• heroku git@heroku.com:pavelt-first-app.git (push)
Heroku :: first app
• Go to http://pavelt-first-app.herokuapp.com
Heroku :: first app
• $ git push heroku master

• The authenticity of host 'heroku.com (50.19.85.156)' can't be
    established.
•   RSA key fingerprint is
    8b:48:5e:67:0e:c9:16:47:32:f2:87:0c:1f:c8:60:ad.
•   Are you sure you want to continue connecting (yes/no)? yes
•   Warning: Permanently added 'heroku.com,50.19.85.156' (RSA)
    to the list of known hosts.
•   Permission denied (publickey).
•   fatal: The remote end hung up unexpectedly
Heroku :: first app
• $ heroku keys:add

• Could not find an existing public key.
• Would you like to generate one? [Yn] y
• Generating new SSH public key.
• Uploading SSH public key /home/pavelt/.ssh/id_rsa.pub... done


• $ git push heroku master
Heroku :: first app
• Counting objects: 73, done.
• Compressing objects: 100% (58/58), done.
• ….
• -----> Heroku receiving push
• -----> Ruby/Rails app detected
• -----> Installing dependencies using Bundler version 1.2.0
• …


• Installing sqlite3 (1.3.6) with native extensions
• Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native
    extension.
•   Failed to install gems via Bundler.
•   Detected sqlite3 gem which is not supported on Heroku.
•   http://devcenter.heroku.com/articles/how-do-i-use-sqlite3-for-development
•   Heroku push rejected, failed to compile Ruby/rails app
Heroku :: first app
• Remove `gem ‘sqlite3’` line from ./Gemfile, update bundle and commit

• $ bundle install
• git commit -am ‘Removed SQLite3 gem’

• $ git push heroku master
• Counting objects: 73, done.
• ….
• -----> Heroku receiving push
• -----> Ruby/Rails app detected
• -----> Installing dependencies using Bundler version 1.2.0
• …
• Your bundle is complete! It was installed into ./vendor/bundle
• …
• -----> Writing config/database.yml to read from DATABASE_URL
• -----> Preparing app for Rails asset pipeline
• -----> Launching... done, v7
•      http://pavelt-first-app.herokuapp.com deployed to Heroku
Heroku
• Q&A?
Tips & Tricks :: .rvmrc
• Automatically change Ruby version and Gemset
• ./.rvmrc
• rvm use 1.9.3@first-app --create
Tips & Tricks :: disable Ri & RDoc
• How to disable Ri and Rdoc?
• ~/.gemrc

• install: --no-ri --no-rdoc
• update: --no-ri --no-rdoc
Tips & Tricks :: informative prompt
• How to make prompt more informative?
• ~/.bashrc

•   export GIT_PS1_SHOWDIRTYSTATE=true
•   export GIT_PS1_SHOWUNTRACKEDFILES=true
•   export GIT_PS1_SHOWSTASHSTATE=true
•   PS1='[$(~/.rvm/bin/rvm-prompt)]u:W[$(__git_ps1 "%s")] '

More Related Content

What's hot

Deploying Symfony | symfony.cat
Deploying Symfony | symfony.catDeploying Symfony | symfony.cat
Deploying Symfony | symfony.cat
Pablo Godel
 
Git: An introduction of plumbing and porcelain commands
Git: An introduction of plumbing and porcelain commandsGit: An introduction of plumbing and porcelain commands
Git: An introduction of plumbing and porcelain commands
th507
 
Code reviews vs Pull requests
Code reviews vs Pull requestsCode reviews vs Pull requests
Code reviews vs Pull requests
Tim Pettersen
 
Git & Github for beginners
Git & Github for beginnersGit & Github for beginners
Git & Github for beginners
Paulo Henrique Nonaka
 
Ninja Git: Save Your Master
Ninja Git: Save Your MasterNinja Git: Save Your Master
Ninja Git: Save Your Master
Nicola Paolucci
 
Becoming a Git Master
Becoming a Git MasterBecoming a Git Master
Becoming a Git Master
Nicola Paolucci
 
Git presentation
Git presentationGit presentation
Git presentation
James Cuzella
 
20150317 firefox os_studymtg_engver
20150317 firefox os_studymtg_engver20150317 firefox os_studymtg_engver
20150317 firefox os_studymtg_engver
Naoki Sekiguchi
 
Basic Git commands
Basic Git commandsBasic Git commands
Basic Git commands
Jitendra Zaa
 
Deploying WP Multisite to Heroku
Deploying WP Multisite to HerokuDeploying WP Multisite to Heroku
Deploying WP Multisite to Heroku
Jussi Kinnula
 
Create Development and Production Environments with Vagrant
Create Development and Production Environments with VagrantCreate Development and Production Environments with Vagrant
Create Development and Production Environments with Vagrant
Brian Hogan
 
Noah Zoschke at Waza 2013: Heroku Secrets
Noah Zoschke at Waza 2013: Heroku SecretsNoah Zoschke at Waza 2013: Heroku Secrets
Noah Zoschke at Waza 2013: Heroku Secrets
Heroku
 
Git Workshop : Git On The Server
Git Workshop : Git On The ServerGit Workshop : Git On The Server
Git Workshop : Git On The ServerWildan Maulana
 
Inside GitHub with Chris Wanstrath
Inside GitHub with Chris WanstrathInside GitHub with Chris Wanstrath
Inside GitHub with Chris Wanstrath
SV Ruby on Rails Meetup
 
Creating and Deploying Static Sites with Hugo
Creating and Deploying Static Sites with HugoCreating and Deploying Static Sites with Hugo
Creating and Deploying Static Sites with Hugo
Brian Hogan
 
以 Laravel 經驗開發 Hyperf 應用
以 Laravel 經驗開發 Hyperf 應用以 Laravel 經驗開發 Hyperf 應用
以 Laravel 經驗開發 Hyperf 應用
Shengyou Fan
 
GIT | Distributed Version Control System
GIT | Distributed Version Control SystemGIT | Distributed Version Control System
GIT | Distributed Version Control System
Mohammad Imam Hossain
 
2012 coscup - Build your PHP application on Heroku
2012 coscup - Build your PHP application on Heroku2012 coscup - Build your PHP application on Heroku
2012 coscup - Build your PHP application on Herokuronnywang_tw
 
Christian Strappazzon - Presentazione Python Milano - Codemotion Milano 2017
Christian Strappazzon - Presentazione Python Milano - Codemotion Milano 2017Christian Strappazzon - Presentazione Python Milano - Codemotion Milano 2017
Christian Strappazzon - Presentazione Python Milano - Codemotion Milano 2017
Codemotion
 
Rugged Driven Development with Gauntlt
Rugged Driven Development with GauntltRugged Driven Development with Gauntlt
Rugged Driven Development with Gauntlt
James Wickett
 

What's hot (20)

Deploying Symfony | symfony.cat
Deploying Symfony | symfony.catDeploying Symfony | symfony.cat
Deploying Symfony | symfony.cat
 
Git: An introduction of plumbing and porcelain commands
Git: An introduction of plumbing and porcelain commandsGit: An introduction of plumbing and porcelain commands
Git: An introduction of plumbing and porcelain commands
 
Code reviews vs Pull requests
Code reviews vs Pull requestsCode reviews vs Pull requests
Code reviews vs Pull requests
 
Git & Github for beginners
Git & Github for beginnersGit & Github for beginners
Git & Github for beginners
 
Ninja Git: Save Your Master
Ninja Git: Save Your MasterNinja Git: Save Your Master
Ninja Git: Save Your Master
 
Becoming a Git Master
Becoming a Git MasterBecoming a Git Master
Becoming a Git Master
 
Git presentation
Git presentationGit presentation
Git presentation
 
20150317 firefox os_studymtg_engver
20150317 firefox os_studymtg_engver20150317 firefox os_studymtg_engver
20150317 firefox os_studymtg_engver
 
Basic Git commands
Basic Git commandsBasic Git commands
Basic Git commands
 
Deploying WP Multisite to Heroku
Deploying WP Multisite to HerokuDeploying WP Multisite to Heroku
Deploying WP Multisite to Heroku
 
Create Development and Production Environments with Vagrant
Create Development and Production Environments with VagrantCreate Development and Production Environments with Vagrant
Create Development and Production Environments with Vagrant
 
Noah Zoschke at Waza 2013: Heroku Secrets
Noah Zoschke at Waza 2013: Heroku SecretsNoah Zoschke at Waza 2013: Heroku Secrets
Noah Zoschke at Waza 2013: Heroku Secrets
 
Git Workshop : Git On The Server
Git Workshop : Git On The ServerGit Workshop : Git On The Server
Git Workshop : Git On The Server
 
Inside GitHub with Chris Wanstrath
Inside GitHub with Chris WanstrathInside GitHub with Chris Wanstrath
Inside GitHub with Chris Wanstrath
 
Creating and Deploying Static Sites with Hugo
Creating and Deploying Static Sites with HugoCreating and Deploying Static Sites with Hugo
Creating and Deploying Static Sites with Hugo
 
以 Laravel 經驗開發 Hyperf 應用
以 Laravel 經驗開發 Hyperf 應用以 Laravel 經驗開發 Hyperf 應用
以 Laravel 經驗開發 Hyperf 應用
 
GIT | Distributed Version Control System
GIT | Distributed Version Control SystemGIT | Distributed Version Control System
GIT | Distributed Version Control System
 
2012 coscup - Build your PHP application on Heroku
2012 coscup - Build your PHP application on Heroku2012 coscup - Build your PHP application on Heroku
2012 coscup - Build your PHP application on Heroku
 
Christian Strappazzon - Presentazione Python Milano - Codemotion Milano 2017
Christian Strappazzon - Presentazione Python Milano - Codemotion Milano 2017Christian Strappazzon - Presentazione Python Milano - Codemotion Milano 2017
Christian Strappazzon - Presentazione Python Milano - Codemotion Milano 2017
 
Rugged Driven Development with Gauntlt
Rugged Driven Development with GauntltRugged Driven Development with Gauntlt
Rugged Driven Development with Gauntlt
 

Similar to GIT, RVM, FIRST HEROKU APP

.Git for WordPress Developers
.Git for WordPress Developers.Git for WordPress Developers
.Git for WordPress Developers
mpvanwinkle
 
Hacking on WildFly 9
Hacking on WildFly 9Hacking on WildFly 9
Hacking on WildFly 9
JBUG London
 
Git Heaven with Wakanda
Git Heaven with WakandaGit Heaven with Wakanda
Git Heaven with Wakanda
Juergen Fesslmeier
 
Github basics
Github basicsGithub basics
Github basics
Radoslav Georgiev
 
Git isthenewsexy
Git isthenewsexyGit isthenewsexy
Git isthenewsexyAilsa126
 
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
Leo Lorieri
 
Docker worshop @Twitter - How to use your own private registry
Docker worshop @Twitter - How to use your own private registryDocker worshop @Twitter - How to use your own private registry
Docker worshop @Twitter - How to use your own private registry
dotCloud
 
Hacking on WildFly 9
Hacking on WildFly 9Hacking on WildFly 9
Hacking on WildFly 9
Virtual JBoss User Group
 
SydJS.com
SydJS.comSydJS.com
SydJS.com
Lachlan Hardy
 
How to Use Your Own Private Registry
How to Use Your Own Private RegistryHow to Use Your Own Private Registry
How to Use Your Own Private RegistryDocker, Inc.
 
ASP.NET 5 auf Raspberry PI & docker
ASP.NET 5 auf Raspberry PI & dockerASP.NET 5 auf Raspberry PI & docker
ASP.NET 5 auf Raspberry PI & docker
Jürgen Gutsch
 
Implementing a Database and API for your Cloud Service
Implementing a Database and API for your Cloud ServiceImplementing a Database and API for your Cloud Service
Implementing a Database and API for your Cloud Service
Vincent Claes
 
Next-Generation Ruby Deployment with Heroku
Next-Generation Ruby Deployment with HerokuNext-Generation Ruby Deployment with Heroku
Next-Generation Ruby Deployment with Heroku
Adam Wiggins
 
Open Source Tools for Leveling Up Operations FOSSET 2014
Open Source Tools for Leveling Up Operations FOSSET 2014Open Source Tools for Leveling Up Operations FOSSET 2014
Open Source Tools for Leveling Up Operations FOSSET 2014Mandi Walls
 
Deploying to Ubuntu on Linode
Deploying to Ubuntu on LinodeDeploying to Ubuntu on Linode
Deploying to Ubuntu on Linode
WO Community
 
ブログ執筆を支える技術
ブログ執筆を支える技術ブログ執筆を支える技術
ブログ執筆を支える技術
kazuki morita
 
Gitting the Most From Git
Gitting the Most From GitGitting the Most From Git
Gitting the Most From GitChris Miller
 
Ruby プログラマのための Perl ウェブアプリケーション開発入門 (Perl web development guide for Rubyist )
Ruby プログラマのための Perl ウェブアプリケーション開発入門 (Perl web development guide for Rubyist )  Ruby プログラマのための Perl ウェブアプリケーション開発入門 (Perl web development guide for Rubyist )
Ruby プログラマのための Perl ウェブアプリケーション開発入門 (Perl web development guide for Rubyist ) Kensuke Nagae
 
Kubeflow Development Environment
Kubeflow Development EnvironmentKubeflow Development Environment
Kubeflow Development Environment
Weiqiang Zhuang
 
Node.js 기반 정적 페이지 블로그 엔진, 하루프레스
Node.js 기반 정적 페이지 블로그 엔진, 하루프레스Node.js 기반 정적 페이지 블로그 엔진, 하루프레스
Node.js 기반 정적 페이지 블로그 엔진, 하루프레스
Rhio Kim
 

Similar to GIT, RVM, FIRST HEROKU APP (20)

.Git for WordPress Developers
.Git for WordPress Developers.Git for WordPress Developers
.Git for WordPress Developers
 
Hacking on WildFly 9
Hacking on WildFly 9Hacking on WildFly 9
Hacking on WildFly 9
 
Git Heaven with Wakanda
Git Heaven with WakandaGit Heaven with Wakanda
Git Heaven with Wakanda
 
Github basics
Github basicsGithub basics
Github basics
 
Git isthenewsexy
Git isthenewsexyGit isthenewsexy
Git isthenewsexy
 
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
 
Docker worshop @Twitter - How to use your own private registry
Docker worshop @Twitter - How to use your own private registryDocker worshop @Twitter - How to use your own private registry
Docker worshop @Twitter - How to use your own private registry
 
Hacking on WildFly 9
Hacking on WildFly 9Hacking on WildFly 9
Hacking on WildFly 9
 
SydJS.com
SydJS.comSydJS.com
SydJS.com
 
How to Use Your Own Private Registry
How to Use Your Own Private RegistryHow to Use Your Own Private Registry
How to Use Your Own Private Registry
 
ASP.NET 5 auf Raspberry PI & docker
ASP.NET 5 auf Raspberry PI & dockerASP.NET 5 auf Raspberry PI & docker
ASP.NET 5 auf Raspberry PI & docker
 
Implementing a Database and API for your Cloud Service
Implementing a Database and API for your Cloud ServiceImplementing a Database and API for your Cloud Service
Implementing a Database and API for your Cloud Service
 
Next-Generation Ruby Deployment with Heroku
Next-Generation Ruby Deployment with HerokuNext-Generation Ruby Deployment with Heroku
Next-Generation Ruby Deployment with Heroku
 
Open Source Tools for Leveling Up Operations FOSSET 2014
Open Source Tools for Leveling Up Operations FOSSET 2014Open Source Tools for Leveling Up Operations FOSSET 2014
Open Source Tools for Leveling Up Operations FOSSET 2014
 
Deploying to Ubuntu on Linode
Deploying to Ubuntu on LinodeDeploying to Ubuntu on Linode
Deploying to Ubuntu on Linode
 
ブログ執筆を支える技術
ブログ執筆を支える技術ブログ執筆を支える技術
ブログ執筆を支える技術
 
Gitting the Most From Git
Gitting the Most From GitGitting the Most From Git
Gitting the Most From Git
 
Ruby プログラマのための Perl ウェブアプリケーション開発入門 (Perl web development guide for Rubyist )
Ruby プログラマのための Perl ウェブアプリケーション開発入門 (Perl web development guide for Rubyist )  Ruby プログラマのための Perl ウェブアプリケーション開発入門 (Perl web development guide for Rubyist )
Ruby プログラマのための Perl ウェブアプリケーション開発入門 (Perl web development guide for Rubyist )
 
Kubeflow Development Environment
Kubeflow Development EnvironmentKubeflow Development Environment
Kubeflow Development Environment
 
Node.js 기반 정적 페이지 블로그 엔진, 하루프레스
Node.js 기반 정적 페이지 블로그 엔진, 하루프레스Node.js 기반 정적 페이지 블로그 엔진, 하루프레스
Node.js 기반 정적 페이지 블로그 엔진, 하루프레스
 

Recently uploaded

Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
DianaGray10
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 

Recently uploaded (20)

Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 

GIT, RVM, FIRST HEROKU APP

  • 1. LESSON 2 RVM, GIT, RAILS, HEROKU Pavel Tsiukhtsiayeu github.com/paveltyk
  • 2. TODO • Git • Install • Configure • RVM • Install RVM • Install Ruby • Create Gemset • Rails • Install • Generate project • First commit • Start server • Heroku • Install & Configure • Push Rails app to Heroku • Make it WORK • Tips & Tricks
  • 3.
  • 4. Git :: install • $ sudo apt-get install git-core
  • 5. Git :: configure • $ git config --global user.name "PavelT" • $ git config --global user.email paveltyk@gmail.com Where does git store its settings? • /etc/gitconfig (--system) • ~/.gitconfig (--global) • .git/config
  • 6. Git :: configure • $ git config --list • user.name=PavelT • user.email=paveltyk@gmail.com • color.ui=true • push.default=tracking • $ git config user.name • PavelT • At least have this 4
  • 7. Git :: install and configure • Q&A?
  • 8.
  • 9. RVM :: install • $ sudo apt-get install curl • $ curl –L https://get.rvm.io | bash –s stable • For RVM to work properly, you have to set the 'Run command as login shell' checkbox at Edit / Profile Preferences / Title and Commands in Gnome terminal • More details here: https://rvm.io/integration/gnome-terminal
  • 10. RVM :: install Ruby • $ rvm requirements • Requirements for Linux "Ubuntu 12.04.1 LTS” • ……… • Additional Dependencies: • # For Ruby / Ruby HEAD (MRI, Rubinius, & REE), install the following: build-essential openssl libreadline6 • ruby: /usr/bin/apt-get install libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion pkg-config
  • 11. RVM :: install Ruby • $ sudo apt-get install build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion pkg-config
  • 12. RVM :: install Ruby • $ rvm list known • # MRI Rubies • [ruby-]1.8.6[-p420] • ... • [ruby-]1.9.3[-p194] • ... • # Jruby • ... • $ rvm install 1.9.3
  • 13. RVM :: gemset • $ rvm use 1.9.3 • $ which ruby • /home/pavelt/.rvm/rubies/ruby-1.9.3-p194/bin/ruby • $ rvm gemset create first-app • $ rvm gemset use first-app • How to easily switch gemsets & Ruby versions [Tips & Tricks]
  • 15.
  • 16. Rails :: install • $ gem install rails • Fetching: i18n-0.6.1.gem (100%) • Fetching: rails-3.2.8.gem (100%) • ... • 29 gems installed • Successfully installed i18n-0.6.1 • ... • Installing ri documentation for i18n-0.6.1.. • Installing RDoc documentation for rack-cache-1.2... • Ri and RDoc are slow [see Tips & Tricks]
  • 17. Rails :: new app • $ rails new first-app • create README.rdoc • create Rakefile • …… • Fetching gem metadata from https://rubygems.org/......... • Using rake (0.9.2.2) • Using i18n (0.6.1) • ….. • Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.
  • 18. Rails :: app skeleton (partial) • app/ - core application code (controllers, views, models…) • config/ - application configuration • db/ - DB related files (migrations, seeds, etc) • lib/ - library modules • log/ - application log files • public/ - publicly accessible data • Gemfile - app gem requirements • .gitignore – patterns for files that should be ignored by git
  • 19. Git :: init repo & initial commit • $ cd first-app • $ git init • Initialized empty Git repository in /home/pavelt/projects/first-app/.git/ • $ git commit --allow-empty -m 'Initial commit’ • [master (root-commit) 6f32ce8] Initial commit
  • 20. Git :: add files & commit • $ git status • # On branch master • # Untracked files: • # (use "git add <file>..." to include in what will be committed) • # • # .gitignore • # Gemfile • # Gemfile.lock • ……. • nothing added to commit but untracked files present (use "git add" to track)
  • 21. Git :: add files & commit • $ git add . • git commit - m ’Initial rails project’
  • 22. Rails :: start server • rails s • => Booting WEBrick • => Rails 3.2.8 application starting in development on http://0.0.0.0:3000 • => Call with -d to detach • => Ctrl-C to shutdown server • [2012-09-23 19:46:46] INFO WEBrick 1.3.1 • [2012-09-23 19:46:46] INFO ruby 1.9.2 (2011-07-09) [x86_64-darwin11.2.0] • [2012-09-23 19:46:46] INFO WEBrick::HTTPServer#start: pid=32565 port=3000
  • 24. Rails :: if rails server failed • If failed with: • home/pavelt/.rvm/gems/ruby-1.9.3-p194/gems/execjs- 1.4.0/lib/execjs/runtimes.rb:51:in `autodetect': Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable) • Uncomment therubyracer gem in ./Gemfile • bundle install • git add Gemfile* • git commit -m ‘Added gem therubyracer’
  • 25.
  • 26. Heroku • What is Heroku? • Heroku is a cloud application platform – a new way of building and deploying web apps. (Heroku | About) • Heroku is a cloud platform as a service (PaaS) supporting several programming languages. (Wikipedia) • Heroku = Easy deployment • Heroku = No server managing • Heroku = Scale with 1 command • Heroku = Read-only file system
  • 27. Heroku :: deployment • How to deploy to Heroku? • Simply push to master branch of your Heroku git repo • $ git push heroku master
  • 28. Heroku :: install & configure • $ gem install heroku • Register at Heroku sign up page • https://api.heroku.com/signup • $ heroku login • Enter your Heroku credentials. • Email: paveltyk@gmail.com • Password (typing will be hidden): • Authentication successful. • More info: https://toolbelt.heroku.com
  • 29. Heroku :: first app • $ heroku create pavelt-first-app • Creating pavelt-first-app... done, stack is cedar • http://pavelt-first-app.herokuapp.com/ | git@heroku.com:pavelt- first-app.git • Git remote heroku added • $ git remote -v • heroku git@heroku.com:pavelt-first-app.git (fetch) • heroku git@heroku.com:pavelt-first-app.git (push)
  • 30. Heroku :: first app • Go to http://pavelt-first-app.herokuapp.com
  • 31. Heroku :: first app • $ git push heroku master • The authenticity of host 'heroku.com (50.19.85.156)' can't be established. • RSA key fingerprint is 8b:48:5e:67:0e:c9:16:47:32:f2:87:0c:1f:c8:60:ad. • Are you sure you want to continue connecting (yes/no)? yes • Warning: Permanently added 'heroku.com,50.19.85.156' (RSA) to the list of known hosts. • Permission denied (publickey). • fatal: The remote end hung up unexpectedly
  • 32. Heroku :: first app • $ heroku keys:add • Could not find an existing public key. • Would you like to generate one? [Yn] y • Generating new SSH public key. • Uploading SSH public key /home/pavelt/.ssh/id_rsa.pub... done • $ git push heroku master
  • 33. Heroku :: first app • Counting objects: 73, done. • Compressing objects: 100% (58/58), done. • …. • -----> Heroku receiving push • -----> Ruby/Rails app detected • -----> Installing dependencies using Bundler version 1.2.0 • … • Installing sqlite3 (1.3.6) with native extensions • Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. • Failed to install gems via Bundler. • Detected sqlite3 gem which is not supported on Heroku. • http://devcenter.heroku.com/articles/how-do-i-use-sqlite3-for-development • Heroku push rejected, failed to compile Ruby/rails app
  • 34. Heroku :: first app • Remove `gem ‘sqlite3’` line from ./Gemfile, update bundle and commit • $ bundle install • git commit -am ‘Removed SQLite3 gem’ • $ git push heroku master • Counting objects: 73, done. • …. • -----> Heroku receiving push • -----> Ruby/Rails app detected • -----> Installing dependencies using Bundler version 1.2.0 • … • Your bundle is complete! It was installed into ./vendor/bundle • … • -----> Writing config/database.yml to read from DATABASE_URL • -----> Preparing app for Rails asset pipeline • -----> Launching... done, v7 • http://pavelt-first-app.herokuapp.com deployed to Heroku
  • 36. Tips & Tricks :: .rvmrc • Automatically change Ruby version and Gemset • ./.rvmrc • rvm use 1.9.3@first-app --create
  • 37. Tips & Tricks :: disable Ri & RDoc • How to disable Ri and Rdoc? • ~/.gemrc • install: --no-ri --no-rdoc • update: --no-ri --no-rdoc
  • 38. Tips & Tricks :: informative prompt • How to make prompt more informative? • ~/.bashrc • export GIT_PS1_SHOWDIRTYSTATE=true • export GIT_PS1_SHOWUNTRACKEDFILES=true • export GIT_PS1_SHOWSTASHSTATE=true • PS1='[$(~/.rvm/bin/rvm-prompt)]u:W[$(__git_ps1 "%s")] '

Editor's Notes

  1. Очень многое в экосистеме RoR в той или иной степени связанос Git. Следовательно настройку рабочего окружения начнем именно с установки git.
  2. Есть несколько вариантов установки: из исходников, готовые бинарники.Оптимальный для нас вариант - установка через менеджер пакетов: apt-get / aptitudeЭто займет несколько минут. После того как гит установлен, следует его настроить.
  3. Для этого есть утилита gitconfig. Все сделанные далее изменения будут перманентны. Но по желанию их конечно же можно изменить. Первое что следует сделать это указать имя и email. Что мы сейчас и сделаем.Эти переменные очень важны, т.к. во всех Ваших последующих комитах будет записано их значение. Это как Ваша подпись на каждом комите - сказать что это сделали не Вы уже не получится :)Как Вы заметили в предыдущих командах мы использовали ключ --global Это означает что мы делаем изменения на уровне пользователя системы. Настройки git могут храниться в трех местах:1. /etc/gitconfig - конфиг для всех пользователей системы и всех проектов. gitconfig будет писать в этот файл когда передан ключ --system2. ~/.gitconfig - конфиг для текущего пользователя системы. gitconfig будет писать в этот файл когда передан ключ --global3. &lt;PATH_TO_REPO&gt;/.git/config - конфиг текущего репозитория. Ключ не надоЧем ближе файл к репозиторию - тем выше приоритет его переменных. Например, только что мы указали user.name и user.email на уровне --global, т.е. эта подпись комитов будет использоваться во всех репозиториях текущего пользователя. Если в каком-то из проектов Вы захотите использовать другой email для подписи - следует в самом репозитории переопределить это значение (&lt;PATH_TO_REPO&gt;/.git/config).
  4. Проверить значения переменных можно так gitconfig --listОдна и таже переменная может быть выведена несколько раз.Если надо проверить значение конкретной переменной:gitconfiguser.name
  5. Теперь перейдем к установке руби. Для Рельс третьей версии нужен ruby1.8.7 и выше. Я рекомендую ruby 1.9.xRVM - позволяет установить несколько версий руби. Это очень полезно когда у вас есть несколько проектов, тогда для каждого можно настроить свое окружение гемов и разные версии руби.Устанавливать RVM будемтак:
  6. rvm install 1.9.3 - Нас еще раз rvm предупредило о зависимостях (который мы только что установили). Нажимаем &apos;q&apos; чтобы продолжить установку.
  7. В RVM можно для каждой версии руби иметь несколько набровгемов, которые называются gemsetRubyGems это менеджер пакетов для РубиRubyGems разработана для простой уcтановкигемов.  Начиная с Ruby версии 1.9 RubyGems является частью стандартной библиотеки Ruby.Gem - стандартный формат для распространения руби библиотек и программ в автономном форматеОбращаю внимание на то что гемсеты создаются для каждой версии руби отдельно, т.е. у вас не получится использовать один и тот же гемсет в разных версиях руби.
  8. Как видно из лога, гемrails также устанавливает все свои зависимости, генерирует ri и rdoc документацию. Многие программисты (я в том числе) находят временнЫе затраты на генерацию этой документации не стоящими результата и предпочитают использовать online ресурсы. Например http://api.rubyonrails.org
  9. Рельсы установлены. Проверить версию рельс можно так: rails -vСамое время попробовать создать новый проект.Как видно из лога, команда railsnew сгенерировала скелет проекта и установила все необходимые гемы. Скелет проекта это одно из многих преимуществ rails. Одной командой мы только что сгенерировали работающее приложение. А так как структура проекта одинаковая, вы всегда сможете быстро найти интересующий код в чужом проекте.
  10. Давайте рассмотрим структуру приложение на RoR. Я опущу директории/файлы, которые не важны на данный момент:app/ - основной код приложения. Здесь находятся модели, вьюхи, контроллеры и хелперы.config/ - конфигурация и инициализация проекта здесьdb/ - здесь хранятся файлы связанные с базой данных (миграции, сиды, файлы файл ориентированных БД)lib/ - сюда принято помещать модули и классы напрямую не связанные с вашим проектомlog/ - сюда рельсы будут записывать свои логиpublic/ - все файлы в этой папке будут доступны пользователям/браузеруGemfile - здесь описаны все гемы от которых зависит проект.gitignore - описаны паттерны файлов которые git должен игнорировать
  11. Пока мы ничего не поломали - самое время сделать комит. Первое что нам надо сделать это инициализировать gitрепозиторий. Делается это командой:gitinit
  12. Посмотрим что у нас с деревомКак видно все файлы unstaged.
  13. Добавим все файлы проекта (за исключением тех что попадают под описание .gitignore) в stagingarea.
  14. Запускаем локальный сервер. смотрим браузер
  15. Если сервер не запустится с такой ошибкой, отредактировать Gemfile.
  16. УжесейчасможнопопробоватьзадеплоитьприложениенаХероку
  17. Что такое Хероку?!Хероку себя определяет как облачная платформа приложений - новый способ создания и развертывания приложений.Википедия говорит что Хероку это облачная платформа как сервис, с поддержкой нескольких языков программирования.Для меня Хероку это найпростейшийдеплоймент, отсутствие необходимости управлять серверами, масштабирование одной командой.
  18. Так как же деплоить на Хероку? Просто запушить код в репозиторий вашего приложения на Хероку. Afterpushколбэки настроят окружение, скомпилируют ассеты, запустят инстансы только что задеплоеного приложения.
  19. У Хероку есть очень удобный CLI который устанавливается вместе с гемомheroku. Прямо сейчас мы его и установим: