久しぶり、プログラマーのkinoppydです。前回の記事では、RubyKaigi公式スケジュールアプリ 「Schedule.select」 のデザイン刷新に関してお届けしました。 tech.smarthr.jp Schedule.selectの今年の大きなトピックは以下の5つです。 デザインの刷新 PostgreSQLからSQLite3への移行 Solid三兄弟の導入(cableはまだ使うかどうかわかりませんが……) Rails 8へのアップグレードとPWA対応 Kamalによるデプロイ 今回は第2回目として、Schedule.selectのデータベースをPostgreSQLからSQLiteへ移行したお話しをします。 目次 目次 Why SQLite PostgreSQLからSQLiteへのデータ移行 pg gem を削除し、sqlite3 gemを入れる config/database.
3行まとめ 単純なバリデーション(必須・範囲・文字数など)はHTMLとDB制約、CHECK制約があれば十分であるというのが最近のDHHの主張。 SQLiteではCHECK制約が少し貧弱なため、制約変更の可能性がある場合は従来通りアプリケーションでもバリデーションした方がいい。 Rails初心者はDHHの方法をそのまま採用するのはやめた方が良い。 調べたきっかけ 最近DHHがonce.comでのCampfireをはじめとしたプロダクトで、NULL制約やDB制約で防げるようなRailsのモデルのバリデーションを積極的には利用しないでいるという主張をしている。 DHHの主張を要約すると以下のようになる。[1] HTMLでのバリデーションが優れている 例えば、input type=“email” にしておくとブラウザで勝手にメールアドレス形式ではない場合にエラーにしてデータ送信をしないようにしてく
In this episode, Chris and Andrew welcome guest Stephen Margheim to discuss his specialization in Ruby and SQLite. Stephen shares his journey of improving the developer experience with SQLite by addressing various pain points and adapting it for production in the Rails ecosystem. He talks about his contributions to Rails 8, making it the first fully production ready SQLite compatible web applicati
原著者の許諾を得て翻訳・公開いたします。 英語記事: Supercharge the One Person Framework with SQLite | Fractaled Mind 原文公開日: 2024/10/16 原著者: Stephen Margheim 日本語タイトルは内容に即したものにしました。 また、見出しを適宜加えています。 本記事は、Rails World 2024における私の発表を編集して記事化したものです。以下のYouTube動画でもご覧いただけます。 はじめに Railsは誕生したときから、アイデアを超音速で宇宙空間に打ち上げるロケットエンジンのような存在として名を馳せてきました。しかし少なくとも私にとって、自作のフル機能アプリケーションをデプロイして動かすにはロケット科学者になる必要がある気もしていました。 ロケットエンジンは時とともに大型化し、複雑化してきまし
NOTE: This is an edited transcript of a talk I gave at Rails World 2024. You can watch the full talk on YouTube. From its beginning, Rails has been famous for being a kind of a rocket engine that could propel your idea to astronomic heights at supersonic speed. But, at least for me, it has lately felt like I needed to be a rocket scientist to then deploy and run my full-featured application. And t
はじめに Rails 8が新たにリリースされ、SQLiteを本番環境でも使用できるようになりました。 これまで、Google CloudでRailsアプリを運用する際、Cloud RunとCloud SQLを使うと簡単に構築できて便利だったんですが、Cloud SQLだけで最低月2,000円弱かかってしまっていました。 SQLiteは、PostgreSQLやMySQLと違いライブラリとして動作するため、データファイルを保存できるストレージがあれば別途CloudSQLなどのサービスを使う必要がなくなります。 なので、Cloud StorageのバケットにSQLiteのデータを置いて、Cloud RunでGCSバケットをボリュームマウントとして設定することで、ほぼ無料のRails環境が作れそうと考えて試してみました。 インフラ構成 Cloud RunとCloud Storageの構成にしていま
DHH氏がRails 8の新機能を解説。Redisなど不要になり、SQLite対応でよりシンプルな構成に。Rails World 2024 9月26日と27日の2日間、カナダのトロントで開催されたRails World 2024の基調講演で、Ruby on Rails(以下Rails)の作者であるDHH(David Heinemeier Hansson)氏が「Rails 8」の主な新機能を紹介しました。 The #RailsWorld 2024 Opening Keynote with @dhh is now online. Rails 8 beta shipped with Authentication, Propshaft, Solid Cache, Solid Queue, Solid Cable, Kamal 2.0, and Thruster. #NoPaaS needed in
SQLite on Rails: The how and why of optimal performance Over the last year or so, I have found myself on a journey to deeply understand how to run Rails applications backed by SQLite performantly and resiliently. In that time, I have learned various lessons that I want to share with you all now. I want to walk through where the problems lie, why they exist, and how to resolve them. And to start, w
How (and why) to run SQLite in production: RubyConf Taiwan 2023 Hi, I’m excited that there are so many people interested in learning more about how and why to run SQLite in production. Let me start by introducing myself. My name is Stephen, and you can find me on Twitter (no, I will not call it X) at fractaledmind. I am an American who moved to Berlin Germany 5 years ago, and in only a few more we
All your data infrastructure, in a gem! Litestack is a Ruby gem that provides both Ruby and Ruby on Rails applications an all-in-one solution for web application data infrastructure. It exploits the power and embeddedness of SQLite to deliver a full-fledged SQL database, a fast cache , a robust job queue, a reliable message broker, a full text search engine and a metrics platform all in a single p
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く