Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
小規模個人アプリをRails 7.xにバージョンアップした話
Search
Kazuhiro NISHIYAMA
November 27, 2023
Technology
150
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
小規模個人アプリをRails 7.xにバージョンアップした話
[【出張版】Kyoto.rb Meetup 【大阪だよ】](
https://kyotorb.connpass.com/event/296972/)のLT大会での発表資料です
。
Kazuhiro NISHIYAMA
November 27, 2023
More Decks by Kazuhiro NISHIYAMA
See All by Kazuhiro NISHIYAMA
Reforming the Japanese Ruby reference manual
znz
0
36
Rubyの配布パッケージの変遷
znz
0
57
Headscale + Tailscale に移行中
znz
0
110
Ruby on Rails と私
znz
0
97
riscv64.rubyci.org internal
znz
0
69
Rubyの日本語リファレンスマニュアルの現在と未来
znz
0
130
devise-two-factorを4.xから5.xに上げた話
znz
0
470
docs.ruby-lang.org/ja/ の生成方法を変えた
znz
0
130
Ubuntuのriscv64版をqemuで動かした
znz
0
170
Other Decks in Technology
See All in Technology
触りたくないデータに、どう触るか AI時代のRBACアクセスガバナンス
ivry_presentationmaterials
0
280
実践!Cloud Run ハンズオン!! / Cloud Run handson
y0hgi
2
300
sue445's proposals 2026
sue445
0
110
アウトプット初心者、半年間のふりかえり
4o1sobblue
0
450
CloudWatch Logsのコスト最適化:どこまでAIに任せてどこから人間が承認すべきか
yama3133
0
110
Rustuna: Rustによる高速なOptuna実装
pfn
PRO
0
200
事業成長とデータ活用を止めないためのマネジメントへ挑戦
hiracky16
0
410
QA4AI 2026-Oct 生成AI時代の品質保証
tokuty
1
900
AIカンパニーへの転換を支えた、エンジニアの仕事の再定義
kworkdev
PRO
2
1.3k
10年後、Engineering 行為を剥奪されるとして、わたしたちは、どう、何を創ればいいだろうか。 / If Engineering Is Taken Away in 10 Years, How and What Should We Create?
bitkey
PRO
1
210
実践! SRE × AI - ABEMA における AIOps -
tetsuya28
8
3.1k
React改造してみた
tsukina_7mochi
0
130
Featured
See All Featured
YesSQL, Process and Tooling at Scale
rocio
174
15k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
3
1.4k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.5k
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
5
830
Tell your own story through comics
letsgokoyo
1
1.1k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
53k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
540
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
520
Large-scale JavaScript Application Architecture
addyosmani
516
110k
The untapped power of vector embeddings
frankvandijk
2
1.9k
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
380
Reality Check: Gamification 10 Years Later
codingconduct
0
2.3k
Transcript
小規模個人アプリをRails 7.xにバー ジョンアップした話 Kazuhiro NISHIYAMA Kyoto.rb Meetup 2023-11-27 Powered by
Rabbit 3.0.3
self.introduction 西山 和広 Ruby のコミッター github など: @znz 株式会社Ruby開発 www.ruby-dev.jp
1/16
対象 個人メモ用アプリ https://github.com/znz/memo-app-r scaffold をちょっと改造した程度の機能のみ ログイン、検索 位置情報 (これが欲しかったので自作) (自分専用なので)メモ本文は生HTMLが書ける Dokku
にデプロイ 2/16
更新バージョン Rail 6.1.7.6 → 7.0.8 → 7.1.2 Ruby 3.1.4 →
3.2.2 3/16
更新方法 以下のように新規作成したアプリと比較 docker run --rm -it ruby:3.1.4 /bin/bash gem i
rails -v '~> 7.0.0' rails new /tmp/hoge --database=postgresql 4/16
新規と比較して更新 Gemfile config/environments/*.rb 5/16
bin/rails app:update bin/rails app:update で更新 Active Storage の migration などの不要なものは除外してマージ
6/16
decaffeinate テストを実行しようとすると *.coffee があるとエラーになった https://github.com/decaffeinate/decaffeinate https://decaffeinate-project.org/ を使って *.coffee を変換 7/16
turbolinks turbolinks も Gemfile から削除していたのでエラー turbo に書き換え app/assets/javascripts/application.js から //=
require turbolinks を削除 (turbo の追加は必要なかった) 8/16
警告対応 to_s(:delimited) → to_fs(:delimited) 9/16
assets:precompile 失敗 Dokku に deploy すると、なぜか rake assets:precompile でエ ラー
-----> Preparing app for Rails asset pipeline Running: rake assets:precompile rake aborted! LoadError: cannot load such file -- coffee_script 原因不明なので coffee-rails を Gemfile に戻した。 10/16
ruby も更新 ついでに ruby も 3.2.2 に更新 ruby file: ".ruby-version"
はデプロイでエラー ruby File.read(".ruby-version").chomp にした 11/16
new framework defaults config.load_defaults 7.0 に更新 new_framework_defaults_7_0.rb を削除 デプロイするとログアウトしていたのでログインしなおし 12/16
7.1 に更新 以下と比較して Gemfile を更新 docker run --rm -it ruby:3.2.2
/bin/bash gem i rails rails new /tmp/hoge --database=postgresql 13/16
app:update bin/rails app:update Active Storage の migration は除外してマージ 14/16
デプロイ テストも問題なく通るのでデプロイ 問題なく動いてそう Rails 7.0 から 7.1 は Rails のバージョンを上げるだけならあっ
さりできた 15/16
今後 new_framework_defaults_7_1 はまだ未対応なので対応予定 JavaScript の位置情報取得部分もテストしたい Rails 標準の minitest を試しているが、単純なテストのみなので rspec
と両方にしたい bootstrap 4 のままなので、更新か他のものに移行したい 位置情報取得部分を jQuery から移行したい coffee-rails は調査不足で原因不明のままだが sprockets を消 せば解決すると期待したい 16/16 Powered by Rabbit 3.0.3