词汇:up
adv. 向上;上涨;起来
相关场景
- I was annoyed that they hadn't turned up.>> 59-In or Out?
- And it's gonna refer to an icon, by default,we just have a nice red dot.but you should obviously replace that with your application. And if I hop in and have a look at the service worker, it is sort of already set up for doing we push,just as an example here, having some listeners, you can tweak that as you see fit.
它将指向一个图标,默认情况下,我们只有一个漂亮的红点。但你显然应该用你的应用程序替换它。如果我跳进去看看服务工作者,它已经为我们推送做了准备,就像这里的一个例子,有一些监听器,你可以根据需要进行调整。>> Rails 8.0.1 You are in good company- So, be careful when you create things, that are gonna be created on the server side in your real database.The database, by the way? we haven't talked much about that, and that is because we're using SQLite. So, there is nothing to configure,there's nothing to set up, SQLite is now a suitable database for production with Rails. we have tuned it with all the right pragmas,to run SQLite well in production, you of course still need to set up a way to back that up, but everything else is preconfigured for you.>> Rails 8.0.1 You are in good company
- So that's just gonna be my email address and 123 password!We hop back into our CLI, and run rails db:seed, that's gonna run that file , I just showed you and set things up.>> Rails 8.0.1 You are in good company
- If we hop to the session, you can see it just is very basic Rails active record. Now we're gonna set up a default user that the systems should have as we're working with it to allow us to log in since we don't have that signup flow.>> Rails 8.0.1 You are in good company
- By default, Kamal will use a docker volume to start these things up, but of course, you can configure that, and as I said, you can use S3 if you'd like as well.>> Rails 8.0.1 You are in good company
- And as you can see here, I sped things up a little bit, but it was about 80 seconds on my linux machine from a cold boot to do that.>> Rails 8.0.1 You are in good company
- And it will deploy it, push it out, do it in a red green deployment or blue green deployment such that there is no gap in that deployment as you set things up.>> Rails 8.0.1 You are in good company
- And that'll connect to the remote server, and it'll install Docker if it's missing,it'll build the Docker file or Docker container off the Docker file that Rails ship with by default, there's nothing you need to set up there.
这将连接到远程服务器,如果缺少Docker,它将安装Docker,它会根据Rails默认附带的Docker文件构建Docker文件或Docker容器,你不需要在那里设置任何东西。>> Rails 8.0.1 You are in good company- I'm pulling it out of ENV with my Kamal registry password that I've already set up on my personal bash. And then, the Rails master key that does the decoding of any credentials we've set for Rails, it's just using a cat straight out of config master key.>> Rails 8.0.1 You are in good company
- 21:28:
- So this server exists on this address, servers web: - demo.exitsoftware.io ; proxy: host: alpha.exitsoftware.io; And I will then fill out the host as a C name to that machine. But we're using Alpha here, if I had deployed another application called Bravo to the same server, Kamal would set it up, so it's like I host two applications or any number of applications on that same server! Now, we will also need to have a look at the secrets here, that is in dockyml/secrets, because the register that I'm using, that is Docker Hub, needs of course a password, it is using my username but also needs a password.>> Rails 8.0.1 You are in good company
- Now I'm gonna deploy this on my own little hoppy server. And that hoppy server is currently wiped. it is completely clean, and Ubuntu 24.04 setup that has nothing on it already, this is part of the magic of Kamal, you can spin up a new VM anywhere in the cloud or use your own hardware and point Kamal straight to it, and you'll be going in no time!>> Rails 8.0.1 You are in good company
- And if we hop into our comment, we can set up a broadcast_to for that post. The broadcast_to will broadcast all update made to that comment, whether a new comment is updated or an existing comment is changed in some way or even one deleted, and send it back out to a channel on action cable named after the post association that this comment belongs to!>> Rails 8.0.1 You are in good company
- So if we scroll down to the bottom here, we are ready. The first thing we're gonna do, we're gonna add a turbo stream from post to the show files to the show template.That's gonna set up the web socket connection and subscribe us to a channel named after that particular post that's pasted in.>> Rails 8.0.1 You are in good company
- Now, let's set things up to be dynamic, such that when we add a new comment to one of these, it's going to update the other as well. This is how we use web sockets in Rails using action cable, one of the frameworks that we have to create updates that are distributed automatically without folks having to reload their browser.>> Rails 8.0.1 You are in good company
- When it is nested, we get the fact that it's gonna be slash post slash on slash comments, and we have the association is set up nicely. Now, let's reload! Now it works, we have our comments field underneath. we can add the first comment. And as you can see here, this is my first comment a second ago that was the local time doing its time ago conversion.
当它被嵌套时,我们得到的事实是,它将是斜线后斜线对斜线注释,并且我们已经很好地建立了关联。现在,让我们重新加载!现在它工作了,我们在下面有我们的评论字段。我们可以添加第一条评论。正如你在这里看到的,这是我一秒钟前的第一条评论,当时当地时间正在进行时间转换。>> Rails 8.0.1 You are in good company- Now that we have that up, we can hop in and look it all up into the show action for the posts! That's gonna reference that common slot comments, that includes both the comments and the new form.>> Rails 8.0.1 You are in good company
- We are pacing in the comment, and we're using that same time tag as we were using with the post, but this time, we are going to use time ago, so we get that nice two minutes ago on when something went posted rather than a local time spelled out with AM PM set up.>> Rails 8.0.1 You are in good company
- It'll automatically know that the comment model should map to view slash comment slash comment, so it can look up the right partial file to use. And then below that, we have the form that we're referencing with the comments new. So, let's hop in and paste in the individual comment. As you can see here, we just give it a div, that has a dom ID so that we can reference it.>> Rails 8.0.1 You are in good company
- So, let's run the migration for that, that sets up the comments table. You can see here the schema that we've now built up. We've added a number of tables for action text and action storage. And then, we have added a comments table. That's what you can see here. As we had it in the migration where we were just referencing the post as a foreign key, and then we had the content as text.>> Rails 8.0.1 You are in good company
- Now again, if you don't want any of this stuff, there is a way using JS bundler dash Rails to set things up in a more traditional way using ES build and what have you. But this is a wonderful way of developing modern web application.>> Rails 8.0.1 You are in good company
- She helped him carry one of his old bookcases up the stairs.>> 52-A Pretty Carpet
- She helped him carry one of his old bookcases up the stairs.>> 52-A Pretty Carpet
- And we're gonna start local time here. And in the local time, we're gonna use it, and we're gonna use it for adding the updated at timestamp here. And as you can see here, we're just adding a time tag that's just a vanilla HTML tag that has a data local time that's what activates that local time JavaScript set up.>> Rails 8.0.1 You are in good company
- Active Storage is a way to deal with attachments and other files in your Rails application. When you run it through action_text:install, it'll automatically set up those active storage tables that we need, there is one for blob,and then we have one for text here.We run migrations to set that up again, and now that we've run action_text:install, it also added a couple of gems, so we need to restart our development server. I do that just by exiting out and just running the server again!>> Rails 8.0.1 You are in good company