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
Rails6 New Functions
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
k.yanagimoto
September 25, 2019
Technology
0
180
Rails6 New Functions
k.yanagimoto
September 25, 2019
Tweet
Share
More Decks by k.yanagimoto
See All by k.yanagimoto
cloudnative days tokyo online 2021 - 311
kyanagimoto
0
450
open telemetry w/ Ruby
kyanagimoto
0
340
nikotama.rb #10
kyanagimoto
0
400
Developers Summit 2020 - 13-A-5
kyanagimoto
0
2.2k
Nikotama.rb #9
kyanagimoto
0
300
Nikotama.rb #8
kyanagimoto
0
190
CNCF for Rubyist
kyanagimoto
0
420
Nikotama.rb #7
kyanagimoto
0
430
Rails Application w/ Kubernetes
kyanagimoto
1
410
Other Decks in Technology
See All in Technology
【2026年版】生成AIによる情報システムへのインパクト
taka_aki
0
140
vol11_ねこIoTLT_お遊びVibeCoding
1027kg
0
120
コンテナセキュリティの最新事情 ~ 2026年版 ~
kyohmizu
8
3.1k
「OSアップデート:年に一度の「大仕事」を乗り切るQA戦略」_Mobile Tech Flex 〜4社合同!私たちのモバイル開発自慢大会〜
gu3
0
190
生成AIと余白 〜開発スピードが向上した今、何に向き合う?〜
kakehashi
PRO
1
260
EKSで実践する オブザーバビリティの現在地
honmarkhunt
2
280
技術選定 したい人 したくない人
shirayanagiryuji
0
220
React 19時代のコンポーネント設計ベストプラクティス
uhyo
17
6.1k
既存のログ監視システムをクラウドっぽく実装してみた
tjmtrhs
0
160
AIエージェントに必要なのはデータではなく文脈だった/ai-agent-context-graph-mybest
jonnojun
1
670
Kubernetes環境周りの責任範囲をいい機会なので考える / Taking the Opportunity to Clarify Kubernetes Responsibilities
kohbis
1
100
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
15
94k
Featured
See All Featured
A designer walks into a library…
pauljervisheath
210
24k
How to Ace a Technical Interview
jacobian
281
24k
Building the Perfect Custom Keyboard
takai
2
700
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
73
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
160
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
460
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
170
What does AI have to do with Human Rights?
axbom
PRO
0
2k
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
100
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
Optimizing for Happiness
mojombo
379
71k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
Transcript
Rails 6 @kyanagimoto
ॕ Rails 6 release • Date: Aug 15th 2019 •
৽͍͠ίϯϙʔωϯτ Action Text / Action Mailbox • Webpackerͷ࠾༻ • ෳDBଓɺฒྻςετ࣮ߦ(TDD is dead͔ΒͷྲྀΕ) • > 2.5 https://railsguides.jp/6_0_release_notes.html
Action Text • WYSIWYG (ΟδΟά, What You See Is What
You Getͷུͩͬͯ) EditorͷTrixΛ ؆୯ʹ͑ΔΑɻ • ActiveStorageΛEditorͰೖྗͨ͠FileΛอ ଘ͢Δҝʹར༻͍ͯ͠Δɻ WYSIWYG EditorʹFileΛૠೖͨ࣌͠ ActiveStorageʹDirectUpload͞ΕΔ ༷ɻ
Action Mailbox • Mailͷड৴ॲཧͷͨΊͷίϯϙʔωϯτ * ActionMailer: MailΛRubyͰ͏ͨΊObjectʹม͢ΔͨΊ CloudͷϝʔϧॲཧอଘࣗલͰΔඞཁ͋ͬͨɻ • ActiveStorageʹMailΛอଘɺAction
Mailbox༻ͷDB Tableඞཁ
Webpacker • RailsͷJavaScript LibrarynpmͰެ։͞Ε͍ͯΔͷΛར༻ • CoffeeScript…ɻ(Action CableͰGenerate͞ΕΔίʔυ͕มԽ)
ෳDBଓ • config/database.yaml • app/models/hoge.rb • config/environments Sample: https://github.com/
effectiveDevOps/devops_meter/ blob/master/config/environments/ production.rb#L109
Parallelize test • github.com/rspec/rspec-rails/issues/2104 rspecͷରԠͲ͏·ͩΈ͍ͨͳײ͡ɻ
ͱΓ͋͑ͣɺ࡞ͬͯΈ·͠ΐ͏ $ gem i bundler $ gem i rails #
YarnΛར༻͢ΔͷͰɺInstallɹhttps://yarnpkg.com/en/docs/install $ brew install yarn $ brew install postgresql $ rails new sample -d postgresql
# DockerͰdatabaseཱͯΔ $ brew cask install docker $ docker run
--name dev-postgres -e POSTGRES_USER=nikotama -e POSTGRES_PASSWORD=postgres -p 15432:5432 -d postgres:11 # ֬ೝ $ docker container exec -it dev-postgres bash $$ psql -U nikotama $$ \l #database Ұཡ
$ vi config/database.yml ## developmentͷusername, password, host, portΛมߋɻ $ rake
db:create $ bundle exec rails action_text:install $ bundle exec rails action_mailbox:install $ bundle exec rails db:migrate
# Edit Gemfile $ vi Gemfile ## image_processingͷίϝϯτΞτΛ֎͢ $ bundle
install $ bundle exec rails generate scaffold post title:string body:rich_text $ bundle exec rake db:migrate
$ bundle exec rails s # Another pane $ bin/webpack-dev-server
# Access to http://localhost:3000/posts # WYSIWYG Editorग़ݱɻ
$ docker container exec -it dev-postgres bash $$ psql -U
nikotama $$$ \l $$$ \c sample_app_development $$$ \d $$$ select * from posts; $$$ select * from action_text_rich_texts; $$$ select * from active_storage_attachments; $$$ select * from active_storage_blobs; $ tree ./storage/