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
Supabase x Ruby on Rails
Search
4geru sakisaka
May 31, 2024
0
270
Supabase x Ruby on Rails
Shinjuku.rb #92 好きなもの紹介LT大会 での登壇資料です。
https://shinjukurb.connpass.com/event/317784/
4geru sakisaka
May 31, 2024
Tweet
Share
More Decks by 4geru sakisaka
See All by 4geru sakisaka
趣味コーディングってやっぱ楽しいんだから
4geru
1
88
横断組織として考える共通DBの課題解決 〜 桃園の誓いアーキテクチャ 〜 / Addressing Shared Database Challenges as Cross-Team: “Peach Garden Oath” Architecture
4geru
2
860
Supabase Edge Functions で最近追加された AI 機能を使ってみた
4geru
0
340
福山ネーター LINE DC ハッカソン 2023 @福山
4geru
0
130
Google Form とちょっと 仲良くなった話。
4geru
0
53
Flutter x Graph
4geru
0
240
Github Discussions がイケてる
4geru
0
800
Flutter Academy final presentatoin
4geru
0
38
ハッカソン x Gatsby
4geru
0
58
Featured
See All Featured
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5.1k
StorybookのUI Testing Handbookを読んだ
zakiyama
27
5.3k
Facilitating Awesome Meetings
lara
50
6.1k
GraphQLの誤解/rethinking-graphql
sonatard
67
10k
We Have a Design System, Now What?
morganepeng
51
7.3k
Making Projects Easy
brettharned
116
5.9k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
95
17k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
Become a Pro
speakerdeck
PRO
26
5k
Art, The Web, and Tiny UX
lynnandtonic
298
20k
Product Roadmaps are Hard
iamctodd
PRO
49
11k
Transcript
4VQBCBTFY3VCZPO3BJMT 4IJOKVLVSC͖ͳͷհ-5େձ!HFSV
͛͠Δ!HFSV 9 چ5XJUUFS ɿ!@HFSV ॴଐɿϚωʔϑΥϫʔυ झຯɿ📷🎱🐟🤿✈ ՝֎׆ಈɿ ɾ-*/&"1*&YQFSU ɾ,BJHJPO3BJMTPSHBOJ[FS ࣗݾհ
None
None
4VQBCBTF-PWF🩷
݄ʹ4VQBCBTFͷ (" ਖ਼ࣜ൛ϦϦʔε
ੈք֤Ͱ ϛʔτΞοϓ ͕։࠵ʂʂ
4VQBCBTFͬͯͳΜͳΜʁ ڭ͑ͯ$IBU(15ઌੜʂ ɾ1PTUHSF42-Λϕʔεʹͨ͠σʔλϕʔεཧ ɾࣗಈੜ͞Εͨ"1*Λ௨ͨ͡σʔλΞΫηεʢ3&45GVM͓Αͼ(SBQI2-ʣ ɾϦΞϧλΠϜػೳʹΑΓσʔλมߋΛଈ࣌ө ɾೝূͱϢʔβʔཧػೳʢϝʔϧɺ0"VUIɺి൪߸ೝূͳͲʣ ɾετϨʔδαʔϏεͰϑΝΠϧͷΞοϓϩʔυɾμϯϩʔυΛཧ ɾαʔόʔϨεؔʹΑΔΧελϜϩδοΫͷ࣮ʢ&EHF'VODUJPOTʣ ɾϒϥβϕʔεͷཧπʔϧʢ4VQBCBTF4UVEJPʣͰσʔλϕʔεػೳ Λࢹ֮తʹཧ
4VQBCBTFਪ͠ͳΜͰ͢ʂ ͛͠ΔɻΦεεϝϙΠϯτʂ ɾ6*͕γϯϓϧʂԼతͳૢ࡞ ɹɾϒϥβͰςʔϒϧ֬ೝɺ42-࣮ߦՄೳ ɾαϯϓϧίʔυ͕ଟ͍ʂʂ ɹɾࠓճͷ-5αϯϓϧίʔυΛࢀߟʹʂ ɾ෦తʹར༻͍͢͠ ɹɾαʔόʔϨεɺ"VUIɺ(SBQI2-ɺ"*ͳͲར༻Մೳ ɾແྉͰ͑Δػೳ͕ଟ͍
(FUUJOHTUBSUFEXJUI3VCZPO3BJMTBOE 1PTUHSFTPO4VQBCBTF IUUQTTVQBCBTFDPNCMPHSVCZPOSBJMTQPTUHSFT
3BJMTΞϓϦͷͷ࡞ 4UFQ3BJMTͷઃఆ rails new blog -d=postgresql export DATABASE_URL=postgres://postgresxxxx/postgres
4VQBCBTF1SPKFDUͷ࡞ 4UFQ4VQBCBTFͷઃఆ ɾIUUQTTVQBCBTFDPNEBTICPBSEOFXOFXQSPKFDU͔Β 4VQBCBTFͷϓϩδΣΫτΛ࡞
ɾڥมͷઃఆΛͨ͠ͷͰɺ͏ଓ͕Մೳʂ %#ͷNJHSBUJPOͷ࣮ߦ 4UFQ4VQBCBTFͷઃఆ bin/rails generate scaffold Article title:string body:text bin/rails
db:migrate
4VQBCBTF1SPKFDUͷ࡞ 4UFQ4VQBCBTFͷઃఆ ɾ4VQBCBTFʹςʔϒϧ͕࡞͞ΕΔ
ɾͪΖΜSBJMTDPOTPMF͔Βσʔλͷ࡞ɺࢀর͕Մೳʂ SBJMTDPOTPMF͔ΒσʔλͷՃ bin/rails console article = Article.new( title: "Hello Rails”,
body: "I am on Rails!” ) article.save # Saves the entry to the database Article.all 4UFQ4VQBCBTFͷઃఆ
࡞ͨ͠σʔλͷ֬ೝ 4UFQ4VQBCBTFͷઃఆ ɾ4VQBCBTFʹσʔλ͕Ճ͞ΕΔ
ɾͪΖΜϩʔΧϧͰSBJMTTFSWFSىಈ͠·͢ʂ SBJMTTFSWFSͷ࣮ߦ bin/rails server 4UFQ4VQBCBTFͷઃఆ
None
ɾ fl ZJPʹ3BJMTΞϓϦΛσϓϩΠ͠·͢ɻ GMZJPʹσϓϩΠ 4UFQ fl ZJPʹσϓϩΠ fly launch #
=> select postgresql = none fly secrets set DATABASE_URL=$DATABASE_URL fly deploy fly apps open
None
͋ΕʁGMZJP ಥવग़͖ͯͨʁ
4VQBCBTF͚ͩͰ 3BJMTಈ͔ͳ͍ʜ
GMZJPͬͯͳΜͳΜʁ ɾϚΠΫϩ7.ϕʔεͷΞʔΩςΫνϟʹΑΓɺܰྔͰߴͳԾϚγϯΛ༻ͨ͠σϓϩΠ͕Մೳɻ ɾάϩʔόϧͳΤοδωοτϫʔΫΛ׆༻͠ɺΞϓϦέʔγϣϯΛϢʔβʔͷۙ͘Ͱ࣮ߦ͢Δ͜ͱͰϨΠςϯ γΛ࠷খԽɻ ɾࣗಈεέʔϦϯάʹΑΓɺτϥϑΟοΫͷ૿ݮʹԠͯ͡ϦιʔεΛಈతʹௐɻ ɾσʔλϕʔεϗεςΟϯάʢ1PTUHSF42-ͳͲʣͰɺΞϓϦέʔγϣϯͷσʔλཧΛγʔϜϨεʹ౷߹ɻ ɾΧελϜυϝΠϯͱ5-4ূ໌ॻͷࣗಈཧΛαϙʔτ͠ɺηΩϡΞͳ௨৴Λอূɻ ɾαʔόʔϨεΞϓϦέʔγϣϯͷϗεςΟϯάΛαϙʔτ͠ɺؔίϯςφϕʔεͷΞϓϦέʔγϣϯΛ ؆୯ʹσϓϩΠՄೳɻ ɾϩʔϧΞτͱϩʔϧόοΫػೳʹΑΓɺ৽͍͠ϦϦʔεͷಋೖͱൃੜ࣌ͷਝͳϦόʔτ͕Մೳɻ
ɾแׅతͳσϓϩΠπʔϧΛఏڙ͠ɺ$*$%ύΠϓϥΠϯͱͷ౷߹͕༰қɻ ڭ͑ͯ$IBU(15ઌੜʂ
͋ΕʁGMZJPͰ QPTHSFTRM͑Δʁ
GMZJP͚ͩͰྑ͘ͳ͍ʁ ɾϒϥβͰ%#4DIFNB σʔλͷ֬ೝ 42-࣮ߦ͕Ͱ͖Δ ɾαʔόʔϨεͰ"*ͷػೳͳͲॊೈʹௐͰ͖Δ ɾ"1*(SBQI2-Λࣗಈ࡞ͰɺϞόΠϧɺϑϩϯτͱͷ૬ੑ˕ ɾ%"5"#"4&@63-ͷઃఆ͚ͩͰɺMPDBMTUHಉ͡σʔλ͕͑Δ ɾGMZJPͱൺͯ%#ͷίετ͕͍҆ 3BJMTҎ֎ʹ4VQBCBTFΛ͏ϝϦοτ͕͋Δʂ
4VQBCBTF ͍Ζ͍ΖࢼͤΔ💪
4VQBCBTFͰ 3VCZPO3BJMT ಈ͘Α͏ʹͯ͠΄͍͠ʂ
4VQBCBTF ·ͩதʂʂ
4VQBCBTF-PWF🩷