20140925 rails pacific
TRANSCRIPT
![Page 1: 20140925 rails pacific](https://reader034.vdocuments.pub/reader034/viewer/2022052316/559405f51a28ab79288b4574/html5/thumbnails/1.jpg)
Crafting Rails Culture to Your Company
Hiroshi SHIBATA @hsbt
RailsPacific
![Page 2: 20140925 rails pacific](https://reader034.vdocuments.pub/reader034/viewer/2022052316/559405f51a28ab79288b4574/html5/thumbnails/2.jpg)
Thank you!
![Page 3: 20140925 rails pacific](https://reader034.vdocuments.pub/reader034/viewer/2022052316/559405f51a28ab79288b4574/html5/thumbnails/3.jpg)
SHIBATA Hiroshi @hsbt
![Page 4: 20140925 rails pacific](https://reader034.vdocuments.pub/reader034/viewer/2022052316/559405f51a28ab79288b4574/html5/thumbnails/4.jpg)
TokyoMatze
![Page 5: 20140925 rails pacific](https://reader034.vdocuments.pub/reader034/viewer/2022052316/559405f51a28ab79288b4574/html5/thumbnails/5.jpg)
RailsGirls in Japan
![Page 6: 20140925 rails pacific](https://reader034.vdocuments.pub/reader034/viewer/2022052316/559405f51a28ab79288b4574/html5/thumbnails/6.jpg)
asakusa.rb
![Page 7: 20140925 rails pacific](https://reader034.vdocuments.pub/reader034/viewer/2022052316/559405f51a28ab79288b4574/html5/thumbnails/7.jpg)
RubyKaigi 2014
RubyConf Taiwan 2014
RedDotRubyConf 2014
RailsPacific
OedoRubyKaigi04
![Page 8: 20140925 rails pacific](https://reader034.vdocuments.pub/reader034/viewer/2022052316/559405f51a28ab79288b4574/html5/thumbnails/8.jpg)
Ruby Committer
![Page 9: 20140925 rails pacific](https://reader034.vdocuments.pub/reader034/viewer/2022052316/559405f51a28ab79288b4574/html5/thumbnails/9.jpg)
ruby rubygems rake rdoc psych syck ruby-build
railsgirls railsgirls-jp kaminari tdiary hiki jenkins.rb fastladder
commit bit collector
![Page 10: 20140925 rails pacific](https://reader034.vdocuments.pub/reader034/viewer/2022052316/559405f51a28ab79288b4574/html5/thumbnails/10.jpg)
My work of Ruby 2.2.0Update test-unit and minitest (removed from repository but bundled in tarball)
coordinate to Ruby committers negotiate to sponsors make development environment
![Page 11: 20140925 rails pacific](https://reader034.vdocuments.pub/reader034/viewer/2022052316/559405f51a28ab79288b4574/html5/thumbnails/11.jpg)
![Page 12: 20140925 rails pacific](https://reader034.vdocuments.pub/reader034/viewer/2022052316/559405f51a28ab79288b4574/html5/thumbnails/12.jpg)
![Page 13: 20140925 rails pacific](https://reader034.vdocuments.pub/reader034/viewer/2022052316/559405f51a28ab79288b4574/html5/thumbnails/13.jpg)
![Page 14: 20140925 rails pacific](https://reader034.vdocuments.pub/reader034/viewer/2022052316/559405f51a28ab79288b4574/html5/thumbnails/14.jpg)
![Page 15: 20140925 rails pacific](https://reader034.vdocuments.pub/reader034/viewer/2022052316/559405f51a28ab79288b4574/html5/thumbnails/15.jpg)
![Page 16: 20140925 rails pacific](https://reader034.vdocuments.pub/reader034/viewer/2022052316/559405f51a28ab79288b4574/html5/thumbnails/16.jpg)
![Page 17: 20140925 rails pacific](https://reader034.vdocuments.pub/reader034/viewer/2022052316/559405f51a28ab79288b4574/html5/thumbnails/17.jpg)
![Page 18: 20140925 rails pacific](https://reader034.vdocuments.pub/reader034/viewer/2022052316/559405f51a28ab79288b4574/html5/thumbnails/18.jpg)
![Page 19: 20140925 rails pacific](https://reader034.vdocuments.pub/reader034/viewer/2022052316/559405f51a28ab79288b4574/html5/thumbnails/19.jpg)
A long time ago..
![Page 20: 20140925 rails pacific](https://reader034.vdocuments.pub/reader034/viewer/2022052316/559405f51a28ab79288b4574/html5/thumbnails/20.jpg)
![Page 21: 20140925 rails pacific](https://reader034.vdocuments.pub/reader034/viewer/2022052316/559405f51a28ab79288b4574/html5/thumbnails/21.jpg)
![Page 22: 20140925 rails pacific](https://reader034.vdocuments.pub/reader034/viewer/2022052316/559405f51a28ab79288b4574/html5/thumbnails/22.jpg)
![Page 23: 20140925 rails pacific](https://reader034.vdocuments.pub/reader034/viewer/2022052316/559405f51a28ab79288b4574/html5/thumbnails/23.jpg)
Pepabo
Hosting EC Media
![Page 24: 20140925 rails pacific](https://reader034.vdocuments.pub/reader034/viewer/2022052316/559405f51a28ab79288b4574/html5/thumbnails/24.jpg)
Over 250 people
![Page 25: 20140925 rails pacific](https://reader034.vdocuments.pub/reader034/viewer/2022052316/559405f51a28ab79288b4574/html5/thumbnails/25.jpg)
organizations which design systems ... are constrained to produce designs which are copies of the communication structures of these organizations
— M. Conway
![Page 26: 20140925 rails pacific](https://reader034.vdocuments.pub/reader034/viewer/2022052316/559405f51a28ab79288b4574/html5/thumbnails/26.jpg)
PHPMySQL5
PHPMySQL4
Ruby and PHPRails
MySQL5
Pepabo
![Page 27: 20140925 rails pacific](https://reader034.vdocuments.pub/reader034/viewer/2022052316/559405f51a28ab79288b4574/html5/thumbnails/27.jpg)
ミドルウェアのアップグレード
社内開発基盤の構築
統計基盤の構築JSOXの運用整備
github
セキュリティ監査コードレビューテスト基盤の構築
アクセス解析基盤の構築
開発プロセス
新人教育原稿執筆
カンファレンス発表
OSS開発 サーバー構成管理の刷新
リーンスタートアップ
Jenkins
Ruby/Rails
RDBMS
技術基盤チーム
![Page 28: 20140925 rails pacific](https://reader034.vdocuments.pub/reader034/viewer/2022052316/559405f51a28ab79288b4574/html5/thumbnails/28.jpg)
Pepabo
技術基盤チーム
PHPMySQL5
PHPMySQL4
Ruby and PHPRails
MySQL5
![Page 29: 20140925 rails pacific](https://reader034.vdocuments.pub/reader034/viewer/2022052316/559405f51a28ab79288b4574/html5/thumbnails/29.jpg)
RubyRails
MySQL5
RubyRails
MySQL5
Ruby and PHPRails
MySQL5
Pepabo
技術基盤チーム
![Page 30: 20140925 rails pacific](https://reader034.vdocuments.pub/reader034/viewer/2022052316/559405f51a28ab79288b4574/html5/thumbnails/30.jpg)
Why Ruby?
![Page 31: 20140925 rails pacific](https://reader034.vdocuments.pub/reader034/viewer/2022052316/559405f51a28ab79288b4574/html5/thumbnails/31.jpg)
3. references
Why Ruby?
2. environment1. testing
![Page 32: 20140925 rails pacific](https://reader034.vdocuments.pub/reader034/viewer/2022052316/559405f51a28ab79288b4574/html5/thumbnails/32.jpg)
Testing
![Page 33: 20140925 rails pacific](https://reader034.vdocuments.pub/reader034/viewer/2022052316/559405f51a28ab79288b4574/html5/thumbnails/33.jpg)
3. rspec
powerful testing framework
2. minitest1. test-unit
![Page 34: 20140925 rails pacific](https://reader034.vdocuments.pub/reader034/viewer/2022052316/559405f51a28ab79288b4574/html5/thumbnails/34.jpg)
Capybara
![Page 35: 20140925 rails pacific](https://reader034.vdocuments.pub/reader034/viewer/2022052316/559405f51a28ab79288b4574/html5/thumbnails/35.jpg)
1) Failure:TestPowerAssert#test_power_assert_failed [test/test_power_assert.rb:10]: assert { "0".class == "3".to_i.times.map {|i| i + 1 }.class } | | | | | | | | | Array | | | [1, 2, 3] | | #<Enumerator: 3:times> | 3 String
Power Assert
![Page 36: 20140925 rails pacific](https://reader034.vdocuments.pub/reader034/viewer/2022052316/559405f51a28ab79288b4574/html5/thumbnails/36.jpg)
![Page 37: 20140925 rails pacific](https://reader034.vdocuments.pub/reader034/viewer/2022052316/559405f51a28ab79288b4574/html5/thumbnails/37.jpg)
1) Failure:TestPowerAssert#test_power_assert_failed [test/test_power_assert.rb:10]: assert { "0".class == "3".to_i.times.map {|i| i + 1 }.class } | | | | | | | | | Array | | | [1, 2, 3] | | #<Enumerator: 3:times> | 3 String
class TestPowerAssert < Minitest::Test def test_power_assert_failed assert { "0".class == "3".to_i.times.map {|i| i + 1 }.class } end end
testcase
assertion
![Page 38: 20140925 rails pacific](https://reader034.vdocuments.pub/reader034/viewer/2022052316/559405f51a28ab79288b4574/html5/thumbnails/38.jpg)
3. run test -> fail -> detect fail reason
Typical usecase
2. add inspection code
1. run test -> fail
5. run test -> success
4. fix code
![Page 39: 20140925 rails pacific](https://reader034.vdocuments.pub/reader034/viewer/2022052316/559405f51a28ab79288b4574/html5/thumbnails/39.jpg)
3. run test -> fail -> detect fail reason
Typical usecase
2. add inspection code
1. run test -> fail
5. run test -> fail!!! -> turn to 2
4. fix code
![Page 40: 20140925 rails pacific](https://reader034.vdocuments.pub/reader034/viewer/2022052316/559405f51a28ab79288b4574/html5/thumbnails/40.jpg)
Typical usecase1. run test -> fail
5. run test -> fail!!! -> turn to 4
4. fix code
1) Failure:TestPowerAssert#test_power_assert_failed [test/test_power_assert.rb:10]: assert { "0".class == "3".to_i.times.map {|i| i + 1 }.class } | | | | | | | | | Array | | | [1, 2, 3] | | #<Enumerator: 3:times> | 3 String
![Page 41: 20140925 rails pacific](https://reader034.vdocuments.pub/reader034/viewer/2022052316/559405f51a28ab79288b4574/html5/thumbnails/41.jpg)
![Page 42: 20140925 rails pacific](https://reader034.vdocuments.pub/reader034/viewer/2022052316/559405f51a28ab79288b4574/html5/thumbnails/42.jpg)
Development Environment
2. rbenv + ruby-build1. osx + homebrew
![Page 43: 20140925 rails pacific](https://reader034.vdocuments.pub/reader034/viewer/2022052316/559405f51a28ab79288b4574/html5/thumbnails/43.jpg)
Many references
![Page 44: 20140925 rails pacific](https://reader034.vdocuments.pub/reader034/viewer/2022052316/559405f51a28ab79288b4574/html5/thumbnails/44.jpg)
Rails Good Parts
Why Rails?
![Page 45: 20140925 rails pacific](https://reader034.vdocuments.pub/reader034/viewer/2022052316/559405f51a28ab79288b4574/html5/thumbnails/45.jpg)
3. admin integration
Why Rails?
2. oss way1. modern architecture
![Page 46: 20140925 rails pacific](https://reader034.vdocuments.pub/reader034/viewer/2022052316/559405f51a28ab79288b4574/html5/thumbnails/46.jpg)
enforce modern architecture
![Page 47: 20140925 rails pacific](https://reader034.vdocuments.pub/reader034/viewer/2022052316/559405f51a28ab79288b4574/html5/thumbnails/47.jpg)
case.1 Ruby 1.8.6 to Ruby 2.1.2
![Page 48: 20140925 rails pacific](https://reader034.vdocuments.pub/reader034/viewer/2022052316/559405f51a28ab79288b4574/html5/thumbnails/48.jpg)
Ruby 1.8.6Rails 2.0.2
Ruby 2.1.3Rails 4.1.6 new!
![Page 49: 20140925 rails pacific](https://reader034.vdocuments.pub/reader034/viewer/2022052316/559405f51a28ab79288b4574/html5/thumbnails/49.jpg)
Ruby1.8.6 1.8.7 1.9.3 2.0.0 2.1
Rails
2.0/2.1
2.3
3.0
3.2
4.0/4.1
![Page 50: 20140925 rails pacific](https://reader034.vdocuments.pub/reader034/viewer/2022052316/559405f51a28ab79288b4574/html5/thumbnails/50.jpg)
KyotoTycoon to
memcached
case.2 replace legacy middleware
![Page 51: 20140925 rails pacific](https://reader034.vdocuments.pub/reader034/viewer/2022052316/559405f51a28ab79288b4574/html5/thumbnails/51.jpg)
app1
app2
![Page 52: 20140925 rails pacific](https://reader034.vdocuments.pub/reader034/viewer/2022052316/559405f51a28ab79288b4574/html5/thumbnails/52.jpg)
begin require 'dalli' rescue LoadError => e $stderr.puts "You don't have dalli installed in your application. Please add it to your Gemfile and run bundle install" raise e end
rails4 need to dalli
![Page 53: 20140925 rails pacific](https://reader034.vdocuments.pub/reader034/viewer/2022052316/559405f51a28ab79288b4574/html5/thumbnails/53.jpg)
kyoto tycoon is slower than mysql…
dalli is not support to kyoto tycoon…
![Page 54: 20140925 rails pacific](https://reader034.vdocuments.pub/reader034/viewer/2022052316/559405f51a28ab79288b4574/html5/thumbnails/54.jpg)
![Page 55: 20140925 rails pacific](https://reader034.vdocuments.pub/reader034/viewer/2022052316/559405f51a28ab79288b4574/html5/thumbnails/55.jpg)
enforce oss way
![Page 56: 20140925 rails pacific](https://reader034.vdocuments.pub/reader034/viewer/2022052316/559405f51a28ab79288b4574/html5/thumbnails/56.jpg)
RubyRails
MySQL5
RubyRails
MySQL5
Ruby and PHPRails
MySQL5
Pepabo
技術基盤チーム
![Page 57: 20140925 rails pacific](https://reader034.vdocuments.pub/reader034/viewer/2022052316/559405f51a28ab79288b4574/html5/thumbnails/57.jpg)
![Page 58: 20140925 rails pacific](https://reader034.vdocuments.pub/reader034/viewer/2022052316/559405f51a28ab79288b4574/html5/thumbnails/58.jpg)
class Bar def bar(foo = foo()) foo end
def buzz(foo = foo) foo end
def foo :buzz endend
p Bar.new.barp Bar.new.buzz
![Page 59: 20140925 rails pacific](https://reader034.vdocuments.pub/reader034/viewer/2022052316/559405f51a28ab79288b4574/html5/thumbnails/59.jpg)
% ruby -v r45272.rbruby 2.2.0dev (2014-04-13 trunk 45580) [x86_64-darwin13]:buzznil
% ruby -v r45272.rbruby 2.1.2p80 (2014-03-01 revision 45231) [x86_64-darwin13.0]:buzz:buzz
![Page 60: 20140925 rails pacific](https://reader034.vdocuments.pub/reader034/viewer/2022052316/559405f51a28ab79288b4574/html5/thumbnails/60.jpg)
![Page 61: 20140925 rails pacific](https://reader034.vdocuments.pub/reader034/viewer/2022052316/559405f51a28ab79288b4574/html5/thumbnails/61.jpg)
admin integration
![Page 62: 20140925 rails pacific](https://reader034.vdocuments.pub/reader034/viewer/2022052316/559405f51a28ab79288b4574/html5/thumbnails/62.jpg)
3. no console
What’s admin?
2. payment/refund1. customer support
![Page 63: 20140925 rails pacific](https://reader034.vdocuments.pub/reader034/viewer/2022052316/559405f51a28ab79288b4574/html5/thumbnails/63.jpg)
organizations which design systems ... are constrained to produce designs which are copies of the communication structures of these organizations
— M. Conway
![Page 64: 20140925 rails pacific](https://reader034.vdocuments.pub/reader034/viewer/2022052316/559405f51a28ab79288b4574/html5/thumbnails/64.jpg)
Developer DirectorCustomerSupport
Our Typical Team
![Page 65: 20140925 rails pacific](https://reader034.vdocuments.pub/reader034/viewer/2022052316/559405f51a28ab79288b4574/html5/thumbnails/65.jpg)
unmaintained…
![Page 66: 20140925 rails pacific](https://reader034.vdocuments.pub/reader034/viewer/2022052316/559405f51a28ab79288b4574/html5/thumbnails/66.jpg)
3. other app
better admin
2. Rails Engine1. app internal
![Page 67: 20140925 rails pacific](https://reader034.vdocuments.pub/reader034/viewer/2022052316/559405f51a28ab79288b4574/html5/thumbnails/67.jpg)
app internalpros better testing better deploy
cons including difference application including effective code
![Page 68: 20140925 rails pacific](https://reader034.vdocuments.pub/reader034/viewer/2022052316/559405f51a28ab79288b4574/html5/thumbnails/68.jpg)
Rails Enginepros splitting application code better deploy
cons difficulty testing can’t use production code directly
![Page 69: 20140925 rails pacific](https://reader034.vdocuments.pub/reader034/viewer/2022052316/559405f51a28ab79288b4574/html5/thumbnails/69.jpg)
Other apppros definitely splitting app
cons separated develop cycle duplicated code
![Page 70: 20140925 rails pacific](https://reader034.vdocuments.pub/reader034/viewer/2022052316/559405f51a28ab79288b4574/html5/thumbnails/70.jpg)
No silver bullet
![Page 71: 20140925 rails pacific](https://reader034.vdocuments.pub/reader034/viewer/2022052316/559405f51a28ab79288b4574/html5/thumbnails/71.jpg)
Rails like a phpMySQL5
Railslike a javaMySQL5
Railslike a phpMySQL5
Optimize Your Company
技術基盤チーム
![Page 72: 20140925 rails pacific](https://reader034.vdocuments.pub/reader034/viewer/2022052316/559405f51a28ab79288b4574/html5/thumbnails/72.jpg)
Lern to Rails
Internal step by
step
![Page 73: 20140925 rails pacific](https://reader034.vdocuments.pub/reader034/viewer/2022052316/559405f51a28ab79288b4574/html5/thumbnails/73.jpg)
Lern to Active Record Internal
![Page 74: 20140925 rails pacific](https://reader034.vdocuments.pub/reader034/viewer/2022052316/559405f51a28ab79288b4574/html5/thumbnails/74.jpg)
github workflow
![Page 75: 20140925 rails pacific](https://reader034.vdocuments.pub/reader034/viewer/2022052316/559405f51a28ab79288b4574/html5/thumbnails/75.jpg)
ChatOps
github issue
costomer’s contact
nagios
![Page 76: 20140925 rails pacific](https://reader034.vdocuments.pub/reader034/viewer/2022052316/559405f51a28ab79288b4574/html5/thumbnails/76.jpg)
DevOps
![Page 77: 20140925 rails pacific](https://reader034.vdocuments.pub/reader034/viewer/2022052316/559405f51a28ab79288b4574/html5/thumbnails/77.jpg)
Go to the next
10 years