Summarized using AI

The future of Rails begins in the browser

Vladimir Dementyev and Albert Pazderin • July 10, 2025 • Philadelphia, PA • Talk

Introduction

The talk, presented by Vladimir Dementyev and Albert Pazderin at RailsConf 2025, explores the evolving landscape of Ruby on Rails adoption, focusing on how the initial learning and onboarding experience for newcomers can be revolutionized through browser-based tools. The speakers present the challenges traditional onboarding poses and introduce their solution—a fully interactive, zero-setup 'Getting Started with Rails' tutorial that runs entirely in the browser.

Key Points

  • Importance of Onboarding for Ruby on Rails:

    • Effective, frictionless onboarding is crucial for expanding the Rails community, especially for newcomers.
    • Traditional onboarding requires dealing with complex setup: installing Ruby, Rails, code editors, and handling dependencies, which can be a barrier.
  • Vision for Browser-Based Accessibility:

    • Envisions a future where anyone can start learning Rails immediately, directly in their browser, without local installations or environment setup.
    • Highlights the significance of interactive, web-based tutorials for driving technology adoption and community growth.
  • Technical Solution: Running Rails in the Browser:

    • WebAssembly (WASM): Used as the foundation to compile and run the Ruby interpreter (and Rails) in the browser.
    • WASI (WebAssembly System Interface): Enables WASM modules to safely interact with system components like filesystems within the sandboxed browser environment.
    • Ruby WASM Project: Bundles Ruby interpreters as WASM binaries, supports gem packaging, and patches incompatible features for browser execution.
    • Wasmify Rails: A custom tool developed to package a full Rails app—including its configuration and dependencies—into a browser-executable bundle.
    • In-Browser Databases: Uses SQLite WASM and PGlite (Postgres-compatible) modules to run relational databases in-browser, with PGlite chosen for seamless cross-environment support.
    • WebContainers: A technology powering StackBlitz (in-browser IDE), providing an isolated mini-OS with Node.js runtime, virtual filesystem, and network proxy to run web servers and databases fully in-browser.
  • Implementation Details and Challenges:

    • Building a bridge between Express.js (Node server) and Rails server to handle HTTP requests and responses within the browser.
    • Implementing a Rails console using Node.js REPL and integrating IRB (Ruby's interactive shell) for interactive programming.
    • Handling both oneshot and interactive Rails commands in the browser environment.
    • Leveraging Tutorial Kit (open source framework from StackBlitz) to deliver a user-friendly, interactive tutorial interface with live code, terminal, and application preview.
  • Broader Impact and Future Directions:

    • The approach offers templates that can be reused for any Rails project in browser-based environments such as StackBlitz or Bolt (an AI coding agent), enabling new forms of interactive documentation and onboarding.
    • Plans to generalize tools for gem maintainers to create interactive, in-browser tutorials and documentation.
    • Emphasizes that the future of Rails depends on lowering barriers for new developers and fostering community inclusivity through accessible learning.

Conclusion

The talk underscores how bringing Rails onboarding and development into the browser, powered by modern technologies like WebAssembly and WebContainers, can dramatically reduce friction for newcomers and expand the community. By providing accessible, interactive learning experiences, Rails ensures its future relevance and growth. The tools and methodologies developed are shared as open platforms, aiming for broader adoption and continuous evolution.

The future of Rails begins in the browser
Vladimir Dementyev and Albert Pazderin • Philadelphia, PA • Talk

Date: July 10, 2025
Published: July 23, 2025
Announced: unknown

With a mature community and adoption by prominent tech veterans, Ruby on Rails already has a strong foundation, and these elements define both the present state of the framework, as well as its short-term future. But the long-term future of the framework is an equation that will depend heavily on the opposite end of the equation: namely, the newcomers, those who will take their first steps on Rails.

But will those first steps look like? Imagine being able to learn and play with Rails without the need to deal with installations or development environments. What if the next generation of Rails developers could start using something easily accessible to everyone: the browser!
Sounds like science fiction? Hardly! The fact is, interactive web-based tutorials, learning materials, and playgrounds play a critical role in wider technology adoption. We’re certain this is the future–and Rails must be a part of that future.

Join us on our journey to bring the “Getting Started with Rails” experience right into your browser. We’ll do this with the help of some new technologies: WebAssembly, WebContainers and in-browser databases!

RailsConf 2025

00:00:16.960 Thank you. I was supposed to give a talk
00:00:19.039 with my colleague Kubova. Unfortunately,
00:00:21.520 VA couldn't make it. So, let's
00:00:24.560 start with um a video message from him.
00:00:27.920 Good morning. Railscom the last day of
00:00:31.119 the last Railscom. Uh I don't want to
00:00:33.600 say ever I hope just for now but anyway
00:00:38.160 it's a good time to talk about the
00:00:40.480 future.
00:00:42.000 Wise man said education the passport to
00:00:44.879 the future for tomorrow belongs to those
00:00:47.200 who prepared for it today. What does it
00:00:49.520 mean to be prepared for framework?
00:00:52.800 It means making onboarding new members
00:00:56.879 as easier as possible, as smooth as
00:01:00.000 possible. So new engineers can start
00:01:02.800 using the tools
00:01:04.879 to build products uh they want to build
00:01:08.400 as quickly as possible. And uh that also
00:01:11.600 means that learning rails, you're
00:01:14.960 talking about rails, right? Should not
00:01:16.880 be a blocker. Let's imagine I'm a person
00:01:19.600 who wants to learn Rails today. What I
00:01:22.479 going to do? Well, I would probably open
00:01:24.799 my browser and uh
00:01:28.640 search engine and start typing learn
00:01:30.400 Rails. Wait, it's 2025. Search engines.
00:01:34.400 No, we don't use them anymore. We use AI
00:01:38.240 tools. You know, we don't want to think
00:01:40.079 and figure out which search results are
00:01:42.400 good or not. Let's just delegate that to
00:01:44.799 some statistical or whatever it is.
00:01:48.000 Okay. I want to learn Rails.
00:01:55.840 And it says guides Ruben Rails uh
00:01:58.799 getting started. Okay, let's take a look
00:02:00.880 at that. And what we have here,
00:02:03.920 introduction, philosophy,
00:02:06.560 creating a rails app prerequisites. So
00:02:09.679 for this project, you will need uh Ruby
00:02:13.280 35
00:02:15.360 whatever rails code editor.
00:02:19.440 Wait. Uh, install Ruby on Rails Guide.
00:02:22.239 Okay.
00:02:23.840 Oh, depending on operational system.
00:02:26.319 Well, I'm a Mac. What is that? What does
00:02:29.840 it even mean? I open SSL at free. I
00:02:34.800 don't even know what it means. So, let's
00:02:37.760 rewind.
00:02:45.040 Imagine that the answer of the question
00:02:47.440 we ask would be not the getting started
00:02:51.680 static documentation guide which is
00:02:53.920 good. It's perfect but it has a blocker
00:02:56.720 of needing to deal with all the
00:02:58.959 dependencies figuring out operational
00:03:01.599 system stuff code editors
00:03:04.879 and whatever else we need for that.
00:03:06.879 Right? So what if we just had a link to
00:03:10.720 the to this resource
00:03:13.280 interactive
00:03:14.879 and browser getting started Rails
00:03:16.959 tutorial. It looks exactly like a
00:03:19.519 getting started guide, but
00:03:23.280 we can click through read about
00:03:25.120 philosophy and get started by creating a
00:03:28.239 new app. Wow, Rails version.
00:03:33.200 This is cool. And so on and so forth
00:03:38.239 up to the very end.
00:03:42.959 All right, we just finished the whole
00:03:45.440 Rails tutorial without leaving our
00:03:48.000 browser.
00:03:49.760 And this is not a fiction. This is
00:03:52.319 reality. This is not the future. It is
00:03:54.480 today. And the Rails tutorial
00:03:58.400 in browser Rails tutorial will go public
00:04:01.040 right after this talk. the talk in which
00:04:05.120 we would like to share
00:04:07.920 not only the technical details and
00:04:09.760 challenges of building this experience
00:04:13.040 but also
00:04:14.799 some thoughts on how that could change
00:04:18.160 the way we think about Rails, the way we
00:04:21.280 bring new people to Rails, the way we
00:04:23.040 build with Rails in the future.
00:04:27.120 My name is Vodimer.
00:04:29.280 I've been with Rails Cons for seven
00:04:32.720 years already
00:04:34.560 and I'm not the future. I'm actually
00:04:37.440 more like a past. So I want to give the
00:04:40.639 stage to my colleague Albert.
00:04:44.320 It's it's his first Railscon and I hope
00:04:46.639 not last again to tell you everything
00:04:50.720 about how we built this and what we want
00:04:53.840 to build on top of that. So say hello to
00:04:57.040 Albert and have a great conference.
00:05:02.000 Hi everyone, I'm Albert.
00:05:05.440 Let me begin my part with a quick
00:05:07.280 introduction.
00:05:09.440 My professional journey started right
00:05:12.320 here in this community. For years, I've
00:05:16.080 been a Ruben Rails developer, just like
00:05:18.560 many of you in this room.
00:05:21.280 And this community made me who I am
00:05:24.080 today.
00:05:25.199 I really want this community to thrive.
00:05:30.639 And I think that this little blocker of
00:05:33.919 getting started with Rails is actually a
00:05:37.039 huge deal because statistically there's
00:05:39.759 probably so many brilliant people,
00:05:41.280 brilliant engineers who at some point
00:05:43.280 were interested in Ruby on Rails but
00:05:45.919 didn't become a part of this community
00:05:48.000 just because during their on boarding
00:05:49.919 they stumbled upon some
00:05:52.720 failed native extension build or or
00:05:54.639 whatever.
00:05:56.400 um making the initial experience
00:05:58.960 frictionless is very important and we
00:06:01.759 decided to reimplement the whole Ruby on
00:06:04.319 Rails to uh tutorial for that. I'm
00:06:06.560 really happy that I got a chance to
00:06:08.720 become a part of this project. For me,
00:06:12.000 this is not just about solving a cool
00:06:14.639 technical challenge which is which it
00:06:16.960 also is. But first of all, it's
00:06:19.440 something that has the potential to
00:06:21.039 affect the whole community.
00:06:24.720 Before I jump into the technical part,
00:06:26.720 let me share a bit more information
00:06:29.199 about myself uh relevant to this talk.
00:06:34.400 I've joined Evil Martians in 20123.
00:06:37.919 At Evil Martians, we consult startups.
00:06:42.080 That's what we do. And after years of
00:06:45.199 experience working in a strict corporate
00:06:48.000 environment, uh diving into chaotic
00:06:50.720 energy of startups was a massive
00:06:53.680 paradigm shift for me. And this career
00:06:56.319 change actually brought me much closer
00:06:59.199 to the open source world and to Ruby
00:07:02.639 community.
00:07:06.400 For the last year,
00:07:09.039 I was uh a part of our team at Stack
00:07:12.000 Blitz. These photos are from their
00:07:14.880 offsite in San Francisco where I had an
00:07:16.800 opportunity to meet the guys in person.
00:07:18.560 It happened just a few months ago. So
00:07:21.039 what is stack blitz?
00:07:24.319 Stack blitz uh uh is a fully featured in
00:07:28.400 browser ID that provides zero setup
00:07:31.440 development experience. You can just
00:07:32.720 import any repository and without the tu
00:07:35.919 setup
00:07:37.599 get a live interactive preview for any
00:07:40.160 kind of JavaScript application. You've
00:07:43.199 probably heard about stack this for the
00:07:45.680 first time right now, but I'm pretty
00:07:47.199 sure I think this there's a high chance
00:07:50.319 that you're aware of their recent AI
00:07:52.160 products, Bolt.
00:07:55.199 Uh Bolt is an AI coding agent and there
00:07:58.800 are quite a lot of AI coding agent
00:08:02.080 nowadays. Uh but what makes this one
00:08:04.560 special is that the entire user
00:08:06.960 experience runs completely inside the
00:08:09.280 browser. And that's because it's
00:08:11.840 actually powered by stagits.
00:08:17.199 So we evil martians help stabs to build
00:08:20.240 amazing products and evil martians love
00:08:23.360 Ruby and Rails.
00:08:25.599 It was quite natural that at some point
00:08:27.360 we've started asking ourselves uh
00:08:30.639 questions.
00:08:33.200 Can we bring the same zero setup
00:08:34.880 experience from JavaScript world to
00:08:36.640 Ruby? And if we do we uh who will
00:08:39.839 benefit from it the most. Answering the
00:08:42.800 second question led us here to the race
00:08:45.360 tutorial. Uh and we will dig into that
00:08:48.160 just in a second. The first question
00:08:50.160 however took us some time to answer and
00:08:53.279 the answer is yes.
00:08:56.080 We started with putting a production
00:08:58.560 Rails application to the browser about a
00:09:00.560 year ago and it's kind of solved the
00:09:03.920 problem. We've already talked about
00:09:05.839 that. You can check out this blog post
00:09:08.480 for example.
00:09:10.399 It was already a huge success. But
00:09:12.480 running a Rails app in a browser is not
00:09:14.560 the same as implementing the development
00:09:16.560 experience.
00:09:18.640 Now let's move to the main part of the
00:09:20.640 talk in which we reveal the key ideas
00:09:24.560 and challenges powering all tutorial.
00:09:27.839 Okay, are you ready kids? Let's start
00:09:30.399 from the bottom. I guess today is the
00:09:32.880 day of the spine war preferences.
00:09:35.839 Of course, the first key ingredient here
00:09:38.000 is web assembly.
00:09:39.920 This is something that is designed as a
00:09:42.240 compilation target for high level
00:09:44.320 languages.
00:09:46.000 You take a program or in our case we
00:09:48.399 have to take the whole Ruby interpreter
00:09:50.880 pass it through pass it through the
00:09:53.839 compiler
00:09:55.519 and we get a nice web assembly binary
00:09:59.200 which we can run in any was runtime.
00:10:02.320 This it this can either be the web
00:10:05.040 browser or some standalone rent runtime
00:10:07.600 on the server.
00:10:11.839 Uh by default uh web assembly runs in a
00:10:16.959 very strict security sandbox. This means
00:10:20.399 it doesn't have any access to host
00:10:22.240 resources like the file system or
00:10:24.160 networking. And for us of course this is
00:10:27.360 kind of a dealbreaker. So how do we
00:10:29.440 solve this? The answer is Wazi or web
00:10:31.279 assembly system interface. A web
00:10:33.519 assembly module compiled with Wazi can
00:10:35.600 import and call specific system level
00:10:38.000 functions like for example reading or
00:10:39.600 writing to disk. Uh the key here is that
00:10:43.279 these functions are not implemented
00:10:45.760 inside the web assembly module itself.
00:10:48.079 Instead the implementations are provided
00:10:50.000 by the WY compatible runtime.
00:10:54.399 The next ingredient in our rails on was
00:10:57.440 pizza is the Ruby WASM project. This
00:11:01.040 project packages everything needed to
00:11:02.880 run Ruby in a web assembly environment.
00:11:05.040 It handles three main things. First, it
00:11:08.800 distributes Ruby runtimes pre-ompiled to
00:11:11.360 web assembly wii modules. Nowadays,
00:11:13.760 started from starting from Ruby 3.2,
00:11:16.399 these are official bits built on the
00:11:18.160 interpreter. Second, it provides a gem
00:11:20.880 packaging tool chain which lets us
00:11:22.480 bundle the Ruby interpreter together
00:11:24.240 with any gens that our app needs and
00:11:26.560 even some gems with C extensions are
00:11:28.720 supported. And finally, it patches or
00:11:31.040 disables Ruby features that are
00:11:33.279 incompatible with web assembly runtime
00:11:35.279 such as for example threads or native
00:11:37.760 sockets.
00:11:39.680 So we have Ruby running in the browser
00:11:41.920 thanks to Ruby Wasom. That was pretty
00:11:43.600 simple. What about the framework itself?
00:11:46.399 That brings us to the final ingredient,
00:11:48.959 a tool we built called Wasmifi Rails.
00:11:52.959 This is something like a glue that takes
00:11:54.959 Rails application and packages it into
00:11:57.200 the web assembly environment. It uses
00:11:59.920 Ruby Wasm tool chain to build a binary
00:12:03.040 that includes all of Rails project
00:12:05.120 files.
00:12:06.639 uh and most importantly it generates uh
00:12:10.639 necessary configuration and adds shims
00:12:12.880 or patches to the framework to ensure
00:12:15.360 the app boots and works correct
00:12:17.200 correctly in web assembly environment.
00:12:20.240 So far we've covered the main
00:12:21.600 ingredients needed to run rails in the
00:12:23.600 browser. Uh if you want to learn about
00:12:27.279 uh to learn about it more
00:12:29.680 uh I highly recommend checking out this
00:12:32.320 guides written by VVA my virtual code
00:12:35.680 speaker. Uh and a fun fact about this
00:12:38.800 guide uh is that the the website itself
00:12:42.160 is a Rails application running on web
00:12:44.000 assembly.
00:12:46.480 So at this point we have our package
00:12:48.480 Rails app. Now it's time to make it
00:12:50.560 functional. For this, we are still
00:12:52.880 missing a couple important pieces. Let's
00:12:54.959 circle back to our demo for a bit. Well,
00:12:58.320 if you think about one of the first
00:13:00.560 lessons in our tutorial, it's starting a
00:13:04.480 rail server. To make that happen, we
00:13:05.839 obviously need a way to spin up an HTTP
00:13:08.399 server in a browser. Also, obviously, we
00:13:10.880 need a real database uh that can run
00:13:13.680 entirely inside the browser.
00:13:16.800 That gives us our final missing pieces,
00:13:20.000 the web server and database. Let's begin
00:13:22.399 with database because it's actually
00:13:25.760 pretty simple. Uh there are a couple of
00:13:28.800 great open source options available
00:13:30.639 today. SQLite was and PGite both are
00:13:34.320 fully functioning database engines
00:13:36.480 compiled into a web assembly module. And
00:13:38.880 our wasifi rails gem actually implements
00:13:42.160 the adapters for both.
00:13:44.880 But for our demo, we had chosen PGite.
00:13:48.399 Uh the main reason for that is the fact
00:13:50.800 that it's designed to work exactly the
00:13:53.040 same
00:13:54.880 in a browser and NodeJS environments,
00:13:57.440 which means that for PGite, we won't
00:13:59.600 need to implement a separate adapters
00:14:01.760 for Node.
00:14:04.480 Wait a minute. Wait a minute. NodeJS
00:14:06.720 wasn't the plan to run everything in the
00:14:09.040 browser, including the database. To
00:14:10.800 answer that question, we need to take a
00:14:13.279 look at one more technology that is used
00:14:15.279 in our demo.
00:14:17.120 Let me introduce you the web containers.
00:14:20.720 This is the core technology that powers
00:14:22.480 everything at staglits. Meaning all
00:14:25.440 their products that implement
00:14:26.720 interactive dev environments. The
00:14:29.120 simplest way to understand it is it is
00:14:32.320 something like a mini operating system
00:14:33.760 that runs entirely inside a single
00:14:36.000 browser tab. Let's do a quick overview
00:14:38.399 of the web containers architecture.
00:14:43.600 First, the entire runtime boots up
00:14:46.000 inside the web worker. This is the key
00:14:48.320 because it runs on a separate thread
00:14:50.079 completely isolated from the main
00:14:51.600 application UI. So, the page stays fast
00:14:55.199 and responsive. Inside the runtime, uh
00:14:58.639 we have our NodeJS runtime which is the
00:15:01.680 JavaScript V8 engine itself compiled to
00:15:04.000 web assembly module. We also have a
00:15:06.320 virtual file system which lives entirely
00:15:08.480 in the browser memory with no direct
00:15:10.000 access to disk. And finally for the
00:15:12.800 networking all HTB traffic is
00:15:14.399 intercepted by uh a service worker. It
00:15:17.360 acts as a network proxy uh routing
00:15:20.160 request and making local host magically
00:15:22.480 work inside the browser. This is why uh
00:15:25.680 when the rail server is running on port
00:15:27.760 3000 in our demo, if you check which
00:15:30.720 ports are occupied on your local
00:15:32.079 machine, you won't see anything running
00:15:33.680 on the port 3000 because web container
00:15:35.839 has its own isolated local network.
00:15:39.760 And finally, once the server is ready,
00:15:42.560 its URL is mounted into a preview iframe
00:15:45.839 from your web page, so you can see and
00:15:48.800 interact with your live application.
00:15:54.639 Okay, so now we can put all the pieces
00:15:57.199 together. By running everything inside
00:15:58.480 the web container, we get an access to
00:16:00.639 its NodeJS environment which we can use
00:16:03.600 to spin up an HTTP server. Our last
00:16:05.759 remaining piece of the puzzle. Next,
00:16:08.000 I'll show you a couple interesting
00:16:09.440 technical challenges of integrating with
00:16:11.600 web containers which we faced. The first
00:16:14.480 challenge is called the bridge. web
00:16:16.639 container runs ExpressJS server which
00:16:19.120 means that we have to somehow bridge it
00:16:21.360 together with our rail server. So uh
00:16:24.639 let's see how we implemented that
00:16:26.720 bridge. And by the way uh if you like
00:16:29.440 thrillers this is a great TV show. I
00:16:31.120 highly recommend
00:16:33.199 we can implemented this by defining a
00:16:35.519 custom rackup handler where during
00:16:38.160 server initialization we define a global
00:16:40.800 request handler refer to the incoming
00:16:43.199 handler variable which we then call from
00:16:47.360 node for each incoming request. Let's
00:16:49.519 take a look at this handler's
00:16:51.199 implementation.
00:16:53.040 uh it basically receives the request
00:16:54.800 from NodeJS, translates it to the rack
00:16:57.120 compatible format and then it fetches
00:17:00.240 the response from rails and finally
00:17:01.920 passing it back to NodeJS. Let's quickly
00:17:04.319 walk through the life cycle of the HTTP
00:17:06.240 request to get the another perspective.
00:17:08.959 First ExpressJS server receives the
00:17:11.120 request then we save the request data to
00:17:14.000 the GS global scope which you'll be able
00:17:16.000 to access from Ruby through a special
00:17:18.160 API. Then we trigger the execution of
00:17:20.799 Ruby code with our global request hand
00:17:22.799 call. Uh then on the rail side we fetch
00:17:26.000 the express gs request data from the gs
00:17:28.720 global scope and convert the request
00:17:31.039 data to the rack compatible format. And
00:17:33.760 once we got the rack response from
00:17:36.559 rails, we convert it back to the
00:17:38.240 express.js compatible format and passing
00:17:39.919 it back to node where we
00:17:42.559 uh unpack the data from rack response
00:17:44.240 and finally send response to the client.
00:17:47.600 Pretty simple stuff.
00:17:50.559 The next challenge is called the
00:17:52.720 console. Of course, I'm referring to
00:17:54.640 Rails console. How did we implement it?
00:17:58.400 Ah, I'm sorry for this one. Uh, I just
00:18:01.360 have this wall of code for you, but it's
00:18:03.840 actually pretty simple. Bear with me
00:18:06.320 here. We basically took the advantage of
00:18:08.799 having full NodeJS runtime. The class
00:18:11.200 you seeing decorates a ripple from node
00:18:14.559 standard library. uh in the start method
00:18:17.520 which loads the console we initialize
00:18:19.520 Ruby IRB in the global IRB variable
00:18:22.000 which we are using during specific
00:18:23.760 commands in the evol method there's also
00:18:27.039 a project that implements true IRB as a
00:18:30.080 wasome module it's called IRB waswome
00:18:32.240 and we currently looking into this one
00:18:33.840 and planning to integrate it in the
00:18:36.240 future
00:18:38.080 to the next challenge u in the previous
00:18:40.400 ones we we implemented running the
00:18:42.720 server and the console but how did we
00:18:44.799 implement running those commands in node
00:18:47.039 environment. Let's take a look. In
00:18:49.360 Rails, we basically have two kinds of
00:18:51.919 commands. First, we have oneshot
00:18:53.520 commands which we just run and they
00:18:55.600 produce some output um and that's it.
00:18:59.280 And the second kind of interactive
00:19:01.360 commands is the commands which start
00:19:03.600 some long running process or session
00:19:05.760 that you connect to. Uh for oneshot
00:19:08.799 commands, the solution is simple. We can
00:19:10.080 just simply delegate them to Rails.
00:19:12.320 While for interactive commands, it's not
00:19:14.320 so obvious.
00:19:16.160 just delegating them wouldn't work. So
00:19:19.120 what do we do? We treat these kind of
00:19:21.520 commands as an external ones and do a
00:19:24.080 special handling for them. For server
00:19:26.640 command, we just start our rack
00:19:28.960 compatible web server. And for the
00:19:30.799 console command, we initialize our not
00:19:32.559 powered implementation. The actual logic
00:19:35.039 for both methods here is basically just
00:19:37.840 calling the solutions we solved in our
00:19:40.320 previous two challenges. Of course,
00:19:43.360 there've been a more channels in Norway,
00:19:44.880 but uh unfortunately I cannot cover them
00:19:47.679 all. So, let's move to the next part.
00:19:51.200 How now uh yeah, now we figured out how
00:19:55.360 to run rails inside the web container.
00:19:57.840 And let's circle back to our original
00:19:59.919 goal, the interactive race tutorial. So,
00:20:02.960 what about the actual user interface?
00:20:06.160 Do we have to build all the front end
00:20:08.480 from scratch?
00:20:10.559 Um and we actually could uh the web
00:20:12.960 container provides a powerful API that
00:20:15.679 allows us to interact with it. But
00:20:17.840 luckily stack come to the rescue with
00:20:20.720 tutorial kit. Uh tutorial kits is an
00:20:24.400 open source framework designed
00:20:26.480 specifically for building interactive
00:20:27.919 tutorials just like the one you're
00:20:30.400 seeing right now and just like the one
00:20:32.240 we built because our demo is actually
00:20:33.760 based on it. Of course, since it is
00:20:36.400 since it's a staged product tutorial kit
00:20:38.320 is powered by web containers, which
00:20:40.240 means that we can simply integrate our
00:20:42.400 entire Rails on WOM setup with it. Okay,
00:20:45.760 so let's take a step back and look at
00:20:48.159 how all of the pieces fit together
00:20:49.840 slightly from from the slightly
00:20:51.120 different perspective.
00:20:54.400 Uh at the very core, we have our Rails
00:20:56.559 Wom bundle. This is what we built with
00:20:58.400 Wasmmy Rails. Alongside it we have our
00:21:02.400 uh essential services the PGLite
00:21:04.559 database engine and rack compatible web
00:21:07.200 server which acts as a bridge to the
00:21:09.120 runtime.
00:21:10.960 The entire application stack lives
00:21:13.280 inside the web container runtime and the
00:21:16.400 userfacing layer is the tutorial kit UI
00:21:18.559 provides the lesson content and
00:21:20.000 orchestrates the entire experience. And
00:21:22.799 finally uh in the tutorial kit UI
00:21:25.200 there's a two main interactive elements
00:21:27.200 the live terminal
00:21:29.520 and the preview frame that displays our
00:21:32.240 running rails application.
00:21:35.760 So the future is here. This is how demo
00:21:38.000 works under the hood and the demo is
00:21:40.640 live. You can try it out right now. Just
00:21:43.840 beware that the interactive part might
00:21:45.840 not work on the mobile devices.
00:21:49.360 So now let's talk about what's next for
00:21:52.400 us. Uh where we are planning to go with
00:21:55.360 this project.
00:21:57.760 Our next main goal is to provide a
00:21:59.600 generic tool which would allow gem
00:22:02.000 maintainers
00:22:03.919 to build any kind of interactive
00:22:06.080 tutorials. And I think this is this is
00:22:08.960 very exciting. Just imagine being able
00:22:10.799 to run some code or commands while
00:22:13.679 reading through your favorite gems
00:22:15.440 documentation. I'll be speaking at UKO
00:22:18.320 in Portugal this September and my talk
00:22:20.880 will be dedicated to our progress on
00:22:23.280 this. So if you want to see the next
00:22:25.200 chapter of this story, please join me
00:22:27.840 there.
00:22:30.159 And one amazing outcome of this project
00:22:32.240 is that we were also able to run Rails
00:22:34.720 in Bolt. Check it out. Uh how is that
00:22:37.360 possible you may ask? Well, remember all
00:22:39.280 of the work to get Rails running was
00:22:42.640 done on top of the platform. We never
00:22:44.640 had to change the core web container
00:22:46.559 runtime. And because our our solution is
00:22:49.120 completely self-contained, it means that
00:22:52.000 Rails can now be run in any product
00:22:55.200 built on top of the web container pro
00:22:58.720 platform and this of course includes
00:23:00.640 bolt.
00:23:03.039 So one of the artifacts of this tutorial
00:23:05.280 is a stag bits ready rails template. Uh
00:23:09.840 you can play with it today. Just import
00:23:11.760 this repot in stag bits or bolt and you
00:23:14.720 can see how it magically runs rails.
00:23:17.840 Actually, not magically. You just seen
00:23:19.360 how it works.
00:23:21.520 We have to ask ourselves a question
00:23:23.760 though. Is bringing Rails to Bolt even
00:23:26.400 worth it.
00:23:28.880 Well, I personally think that it has a
00:23:30.559 lot of potential both in Bolt and in any
00:23:33.360 kind of AI agents.
00:23:35.760 And the key reason for that is the
00:23:37.200 maturity and depth of the Rails
00:23:38.640 ecosystem.
00:23:40.640 We all know that AI ages can be pretty
00:23:43.280 unpredictable. So the key metrics the
00:23:46.159 key metric for their success is
00:23:47.919 generating less code and because of the
00:23:50.480 eloquence of Ruby and the convention
00:23:53.039 over configuration principle of Rails
00:23:55.840 most of the time it naturally requires
00:23:59.280 very few lines of code for
00:24:02.640 for the same tasks. We hope to share
00:24:05.440 more exciting news about the race in the
00:24:07.200 browser and maybe even about race in the
00:24:09.440 bolt later this year at our new SF Ruby
00:24:13.200 conference. So please come join us.
00:24:17.679 And let me end this talk with a few
00:24:21.200 final words.
00:24:23.360 The theme of the conference is the
00:24:25.360 future of Rails. In the beginning, Volvo
00:24:27.760 said that the future is not him. And I
00:24:31.200 actually agree. The future isn't him.
00:24:34.320 And the future isn't me either. The real
00:24:37.360 future is the newcomers. It's all the
00:24:40.000 people who are about to take their very
00:24:43.039 first step into this community.
00:24:45.679 And this future will become our present.
00:24:48.720 So I'm inviting you all to build it
00:24:51.600 together.
00:24:53.840 Thank you.
Explore all talks recorded at RailsConf 2025
+77