Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Ruby for iOS developer
Search
Jun Lin
March 14, 2014
Programming
0
1k
Ruby for iOS developer
A brief introduction to Ruby for iOS developer. S01 E01
Jun Lin
March 14, 2014
Tweet
Share
More Decks by Jun Lin
See All by Jun Lin
A brief introduction to GenStage
linjunpop
1
53
Microservices
linjunpop
0
58
Actor Model
linjunpop
0
29
A brief introduction to GitHub
linjunpop
1
67
Test Driven Development
linjunpop
0
48
Ruby 2.0
linjunpop
1
170
Other Decks in Programming
See All in Programming
ソフトウェア設計の実践的な考え方
masuda220
PRO
4
630
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
160
Claude Agent SDK を使ってみよう
hyshu
0
1.3k
「ちょっと古いから」って避けてた技術書、今だからこそ読もう
mottyzzz
12
7.1k
Pythonに漸進的に型をつける
nealle
1
110
コード生成なしでモック処理を実現!ovechkin-dm/mockioで学ぶメタプログラミング
qualiarts
0
250
Software Architecture
hschwentner
6
2.3k
NixOS + Kubernetesで構築する自宅サーバーのすべて
ichi_h3
0
1.1k
あなたとKaigi on Rails / Kaigi on Rails + You
shimoju
0
180
バッチ処理を「状態の記録」から「事実の記録」へ
panda728
PRO
0
190
Building, Deploying, and Monitoring Ruby Web Applications with Falcon (Kaigi on Rails 2025)
ioquatix
4
2.5k
monorepo の Go テストをはやくした〜い!~最小の依存解決への道のり~ / faster-testing-of-monorepos
convto
2
530
Featured
See All Featured
Practical Orchestrator
shlominoach
190
11k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
16k
RailsConf 2023
tenderlove
30
1.3k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
46
7.7k
BBQ
matthewcrist
89
9.8k
Become a Pro
speakerdeck
PRO
29
5.6k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
285
14k
A Modern Web Designer's Workflow
chriscoyier
697
190k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Making the Leap to Tech Lead
cromwellryan
135
9.6k
Designing for Performance
lara
610
69k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
23
1.5k
Transcript
Ruby For iOS developer S01 E01
Concept • Ruby • Version manager(s) • Ruby versions •
Gem • Bundler • CocoaPods
Ruby
A programming language
$ ruby
System Ruby /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
Why not use system ruby • Gem dependencies hell •
Outdated
$ sudo gem install NEVER
Version manager(s)
• (RVM) http://rvm.io • (rbenv) https://github.com/sstephenson/rbenv • (chruby) https://github.com/postmodern/chruby
RVM Powerful. It can install, manager ruby versions $ \curl
-sSL https://get.rvm.io | bash -s stable
rbenv Lightweight, but shims is a little painful $ brew
install rbenv ruby-build
chruby Lightweight as rbenv, no shims RECOMMENDED $ brew install
chruby ruby-install
Ruby versions
CRuby, MRI
• ruby-1.8 • ruby-1.9.3-p448 • ruby-2.0.0-p247 • ruby-2.0.0-p353 • ruby-2.1.0
• ruby-2.1.1
1.8 is DEAD
1.9 ~ 2.0
A patch breaks API too • ruby-1.9.3-p327 • ruby-1.9.3-p448
Since 2.1.0
Semantic Versioning https://www.ruby-lang.org/en/news/2013/12/21/semantic-versioning-after-2-1-0/ Finally
.ruby-version
• 2.0.0 • 2.0.0-p353 • 2.1.0 • 2.1.1
Gem
Ships with Ruby, manage gems
rubygems.org
None
Bundler
None
$ gem install bundler
Gemfile source 'https://rubygems.org' gem ‘nokogiri' gem 'rails', github: 'rails/rails' group
:test do gem 'rspec', require: ‘spec' end
$ bundle install
CocoaPods
A Ruby gem $ gem install cocoapods
Podfile similar to Gemfile
Podfile platform :ios, '6.0' ! xcodeproj `MyProject` ! pod 'ObjectiveSugar',
'~> 0.5’ ! target :test do pod 'OCMock', '~> 2.0.1' end
Q&A
Thanks