Intro to Ruby on Rails 7 Fullstack Tutorial | Rails for Beginners Part 1

Поделиться
HTML-код
  • Опубликовано: 14 июн 2024
  • This is part 1 in a intro to Ruby on Rails 7 tutorial series aimed at absolute beginners. This video covers the basics like creating pages, routing, styling, and creating your first CRUD scaffold.
    We also do some basic git management, which allows us to host our code on Github. You can check the link below to find the repository.
    Source code for this video:
    github.com/Deanout/blog_appli...
    Bootstrap CDN:
    getbootstrap.com/docs/5.1/get...
    Follow me on social media:
    linktr.ee/deanin
    Join this channel to help support these videos:
    / @deanin
    If you liked this video, please consider subscribing: t.co/RZ4EwP0F2a
    Timestamps
    0:00 Intro to Rails 7
    4:00 Routing in Rails 7
    12:30 Our First Git Commit
    14:05 Styling Rails 7 with Bootstrap
    23:53 Creating The Blog Post CRUD Scaffold
    46:16 Seeding The Rails 7 Database With Blog Posts
    #Deanin #Software #Programming

Комментарии • 105

  • @loudboomboom
    @loudboomboom 9 дней назад

    Great walk through! Coming from a Next environment where prisma and all sorts of libraries are stitched together to make a full stack app, seeing a mature full stack system like Rails at work is actually pretty exciting.

  • @carlmorales
    @carlmorales 2 года назад +36

    I'm glad someone still doing Ruby tutorial. I've been away from coding due to health matter. I can't wait to be back to learn coding using RoR again

    • @Deanin
      @Deanin  2 года назад +15

      I'm happy to keep making the content as long as it keeps helping people!
      Glad the health matters didn't keep you away 🙂

    • @carlmorales
      @carlmorales 2 года назад +4

      ​@@Deanin thank you! I notice that you did videos about React and Ruby. I have not explore Ruby 7 yet and i actually plan to learn how to be full stack. So far. I only learn about Ruby w/ RoR.
      I didn't realize it is possible for Ruby w/ RoR handle backend + React handle fronte as I only thought JS+React only. Do you mind to make another new video about Ruby 7 + React? I would love to learn from you and btw you got my sub! 😄

    • @Deanin
      @Deanin  2 года назад +8

      @@carlmorales Working on a pretty in-depth tutorial on it that should hopefully be out tomorrow.
      It'll probably turn into a wide series of tutorials too.

  • @amiraliheidari2401
    @amiraliheidari2401 3 месяца назад +1

    I've watched so many tutorial's on ROR & this was by faaar the most understanding one for someone who's trying to pack things from vanilla php to one of the best frameworks out there! 👌

  • @Deanin
    @Deanin  2 года назад +10

    Edit: Part 2 is up now! ruclips.net/video/m3uhldUGVes/видео.html
    Questions? We have a Discord: discord.gg/vumKwDk
    Come join Tech Twitter: twitter.com/Deaniocom
    I hope this video helps, it's the first in hopefully a series that will build up to a cool project by the time we're done!

  • @nerwinchernando
    @nerwinchernando 11 месяцев назад +2

    I stumbled upon your channel with deploying rails 7 to AWS. Great series of tutorials.

  • @DevBishwasBh
    @DevBishwasBh Год назад +11

    Thanks a lot for this awesome tutorial playlist for Rails 7. I believe, this is the most updated tutorial on Rails till now. Keep going 💓✨

  • @R3lentlessSec
    @R3lentlessSec Год назад +7

    Dude the way you explained this is amazing. I tried following FCC RoR tutorial and yea i can follow along, but still wondered how it worked. You explained it beautifully. Thanks for this. Seriously.

    • @Deanin
      @Deanin  Год назад +2

      Glad it helped! And yeah, everyone has different teaching styles. I just try and make the videos similar to what resonated with me when I was learning, so I'm glad they helped you as well 🙂

  • @kraigfairhurst482
    @kraigfairhurst482 Год назад +1

    I think many of us would benefit from a deep-dive into Turbo, going beyond what is currently (and not currently) available. Keep it up!

  • @rodrigonikolof722
    @rodrigonikolof722 Год назад +2

    Just coming by to say thank you for the videos. Really love your stuff! By far my favorite Rails Tutorials from any source (RUclips, Udemy, Google)!

  • @dmays67
    @dmays67 Год назад +1

    Great pacing for this humble student of ROR and finding how you go about what you are developing and teaching perfectly in sync with my learning style. Thanks for the effort you put into the very helpful tutorials!

  • @carltanner6826
    @carltanner6826 2 года назад +7

    Deanin, thanks for taking the time to create this video. I like your teaching style.

    • @Deanin
      @Deanin  2 года назад +2

      I appreciate it, hopefully it helped! 🙂

  • @Stevesteacher
    @Stevesteacher Год назад

    Thank you, I followed the tutorial on the ruby on rails site, but I still feel very comfortable with a lot of this, very helpful tutorial!

  • @fernandosalas4885
    @fernandosalas4885 Год назад +2

    Wowww this is pure gold, Thanks man!!!

  • @user-ku3gj8xd7f
    @user-ku3gj8xd7f Год назад +3

    Thank for the tutorials.
    I started with Rails few weeks ago and TBH I do not like it so far.
    No issues with Ruby as it's pretty much straight forward but I have been working with strongly typed languages up until now, GoLang, Java, JS with TypeScript (Always strict) and Ruby is a thing to get used to (Even Python supports types :( ).
    But this Rails magic is just driving me crazy, This concept of don't worry I'll handle it for you makes my brain go overdrive.
    People probably saw the meme with "it doesn't work, why? It does work, why?" so I'm in this state 24/7
    Just can't wrap my head around it, makes me wanna cry in a cold shower sometime.

  • @rdalago
    @rdalago Год назад

    Great video! I've been learning a lot from you. Thanks!

  • @MaxKamrani
    @MaxKamrani Год назад +1

    Thanks Deanin ! super helpful !

  • @jouzou3709
    @jouzou3709 2 года назад +1

    Keep going, thanks for the tutorial

  • @bradchellingworth5973
    @bradchellingworth5973 Год назад +6

    On the route helpers, if your going with a non restful route, I would always pass the "as' option so you can give the route a specific name, this means that whether you change its from 'about' to 'pages/about' or anything else, it will still have the same name and therefore the same variable_path, meaning you never need to worry about breaking links :)

  • @amineben5946
    @amineben5946 Год назад +2

    thank you for this video! very useful

  • @rodolforomero6111
    @rodolforomero6111 2 года назад +1

    Thank you .. your video have helped me so much.

  • @samanfayazi1226
    @samanfayazi1226 2 года назад +2

    Thanks for adding parts to title

    • @Deanin
      @Deanin  2 года назад +1

      Thanks for the suggestion!

  • @xarxlugner2991
    @xarxlugner2991 2 года назад +2

    Thank you dean

  • @ahmetaydn4416
    @ahmetaydn4416 8 месяцев назад

    Great video to start rails

  • @muhammadaamirkhan9185
    @muhammadaamirkhan9185 Год назад +1

    best tutorial , neat and clean explanation. Thank you very much

  • @gardeningwithsanat9395
    @gardeningwithsanat9395 Год назад +1

    thank you so much sir, its very helpfull

  • @Sos-hd4kp
    @Sos-hd4kp 9 месяцев назад

    подякував) Thanks)

  • @Sediqwe
    @Sediqwe 7 месяцев назад +1

    😍Köszönjük!

    • @Deanin
      @Deanin  7 месяцев назад +1

      Nagyon szépen köszönjük!
      Thank you very much :)

  • @user-hi7uj7ok5b
    @user-hi7uj7ok5b 8 месяцев назад

    Cool !😊

  • @AlexeiDanchenkov
    @AlexeiDanchenkov 9 месяцев назад

    Excellent gradient for introducing Rails. Could you tell a few words on setting up protected main branch on github with automatic pull request from another branch?

  • @josbexerr5166
    @josbexerr5166 2 года назад +2

    Muchas gracias Mister Deanin por el esfuerzo y dedicacion......saludos de los andes peruanos

  • @sakkesuominen516
    @sakkesuominen516 2 года назад +4

    Just when I was looking for an up to date rails tutorial! How often will you be posting the parts?

    • @Deanin
      @Deanin  2 года назад +2

      I'm hoping to have one go up each week. I started this series idea quite literally the night before it went up after a former professor reached out to me and I realized I didn't have any beginner content for Rails 7, so I'm still trying to plan it all out haha.
      Monday has also become something of a hot day of the week, so I might use it to promote new videos and move this series to Tuesday or Wednesday, we'll see.
      Tl;dr is once per week, probably on Wednesday unless plans change which they might 😂

    • @sakkesuominen516
      @sakkesuominen516 2 года назад +2

      @@Deanin I'll be waiting patiently

  • @letsgameco3514
    @letsgameco3514 Год назад +1

    Thanks a lot for your video and explain a lot of from this lesson :) Think ask you about your Linux distro, but look at WSL, so WSL is good for ruby on rails development?

    • @Deanin
      @Deanin  Год назад +1

      Yeah, I use WSL 2 with Ubuntu in these tutorials. It works for me, though others in the Rails community don't uh, necessarily approve of my approach lol. But after 200 tutorials it hasn't caused a problem yet. 🙂

  • @florianf.3848
    @florianf.3848 Год назад +1

    First of all, thanks so much for this video and all of the other amazing content that you are creating!
    I've got a sort of unrelated question: At around 17:10 you type ".jumbotron" and this gets automatically converted into a div tag by VS Code. What do I need to do to configure this behavior? I'd search for this in Google, but I would not know what to search for.
    Thanks in advance!

    • @Deanin
      @Deanin  Год назад +1

      That's from a setting in Visual Studio Code.
      If you go into file-> settings, search for "Emmet trigger expansion on tab" or something like that, and make sure to check the box.
      There's a video that covers some of my configuration that I made a few months after this one, I'll link it for you too. 🙂
      ruclips.net/video/4GjXSI6jcLI/видео.html

    • @florianf.3848
      @florianf.3848 Год назад +1

      Thanks so much :)

  • @HAFIZZOHAIBdilawer
    @HAFIZZOHAIBdilawer 2 года назад

    Hi Deanin can you please tell me how to add custom js and css of the template in rails 7

  • @nejdetkadir4447
    @nejdetkadir4447 2 года назад +2

    👌🏻

  • @sugaslate14
    @sugaslate14 11 месяцев назад

    hey brotha love the tutorial so far. I have, what might be a stupid question. Using VS Code, but I notice evertime I go to a new line to input something, I have to click insert, to get it to function. As in I can't type anything unless I hit insert first, how the hell can I change this, it's driving me nuts. Please and thank you

  • @cantalas3874
    @cantalas3874 Год назад

    17:10 how did you do the auto-completion of the jumbotron class there?

  • @bobtuly2079
    @bobtuly2079 2 года назад +1

    Great stuff. What extension do you use in VScode when you .container

    • @Deanin
      @Deanin  2 года назад +1

      Pretty sure that one is emmet. It's built into VSCode and allows you to hit tab to autocomplete some HTML elements like that.
      To enable it with tab though, I think you need to go into settings and search for "Emmet Tab Expansion" or something, and make sure the check box is enabled.
      The other extensions are TabNine (free version) and obviously GitHub CoPilot for the more advanced autocomplete that totally doesn't just get in the way sometimes 😇

    • @bobtuly2079
      @bobtuly2079 2 года назад +1

      @@Deanin Wow ty so much. It was driving me crazy trying to figure that out. To be exact, it's Emmet: Trigger Expansion On Tab. Thank you!

  • @ylluminate
    @ylluminate Год назад +1

    Do you happen to have a "setup" video for getting a younger highly inexperienced student onto "ground level" with Rails? I recently turned a younger high school teen onto Ruby on Rails, but when I pointed them to Learn Enough's Rails tutorial I found that the Cloud9 centric approach just can't work for them given Amazon's having wrecked that train over the past year. I'm now trying to hunt around to find them a really basic soup to nuts style approach that will help them to set up a sane dev environment and then start coding without feeling overwhelmed. I feel like each option I've thought of and considered sharing with them so far has just been overwhelming and it makes me sad since I have contemplated just throwing in the towel and telling them "oh just do javash-er-script since it's in the browser"... You've got a lot of videos, but I've not put my finger on a video that really starts off at such a lower intro level yet it seems where they're walked through getting Ruby and Rails installed and then move into using an editor or IDE.

  • @2MSTennis
    @2MSTennis Год назад

    So I got off once and my localhost is offline. How can I bring it back up when I begin working again?

  • @Msmykolas17
    @Msmykolas17 2 года назад +2

    When you said that you can use it for both html and for api, it was a mind blow to me

    • @Msmykolas17
      @Msmykolas17 2 года назад +1

      Because you probably can create an rails app and then use it also as api for react in the future. Am I wrong?

    • @Deanin
      @Deanin  2 года назад

      You definitely can! You can also create a Rails app and only have it be an API. This will stop it from generating the views and the HTML, and some of the other fluff that it needs to render stuff.
      I have a recent video that covers a Rails and React API. It's a bit more advanced, but you can see what it can do pretty quickly out of the box in about 15 minutes.
      Just remember that anything you see in that video could just as easily be a regular Rails app with this additional API functionality built on top of it
      ruclips.net/video/sh4WrNGDvQM/видео.html

    • @Msmykolas17
      @Msmykolas17 2 года назад +1

      @Deanin I watched it already, great content

    • @Msmykolas17
      @Msmykolas17 2 года назад +1

      I just didn't think about first making rails as normal, and then if you want, you can use it later for api only

    • @Msmykolas17
      @Msmykolas17 2 года назад +1

      I think this way it can be easier to transition to react for beginners

  • @hyejinahn2898
    @hyejinahn2898 Год назад

    I'm getting "TypeError: Module specifier, 'application' does not start with "/", "./", or "../". Referenced from" when running my app on safari (v15). Do you also see this error by any chance?

  • @claytonallaway853
    @claytonallaway853 3 месяца назад

    Hi Deanin, I can't seem to figure out how to open html.erb files with Edge Dev Tools in VS Code. I can make a quick .HTML file and it works but it doesn't show up when I try it for erb. Can you help?

  • @daweezycarter
    @daweezycarter 6 месяцев назад

    How your rails command is just working that fast, Is that that you're using WSL? Using the rails command in my windows machine is just painful I have to wait 3-4 seconds for the command execution is that normal?

  • @ernatercero3974
    @ernatercero3974 2 года назад +1

    Thanks for this tutorials, could you please share the plugins you are using in you vscode?

    • @Deanin
      @Deanin  2 года назад +1

      I'm thinking of doing a video on the topic.
      Code completion is GitHub CoPilot and TabNine.
      Ruby folder icons or something changes the icons in the file explorer
      I know I have prettier installed
      Rubocop runs around cleaning up my mess and getting in the way sometimes too.
      I'm sure I'm forgetting some, but hopefully this is a starting point for you 🙂

    • @ernatercero3974
      @ernatercero3974 2 года назад +1

      @@Deanin I would like to see a video using javascript and calling a method from the models.erb :-) and do not need to reload all page, could be great!

  • @ftfukushima
    @ftfukushima 2 года назад +1

    what is the add-on you use in vscode so the icons and the project is presented like this?

    • @Deanin
      @Deanin  2 года назад

      I think it's this one?
      marketplace.visualstudio.com/items?itemName=vscode-icons-team.vscode-icons

    • @ftfukushima
      @ftfukushima 2 года назад +1

      @@Deanin nice! thanks! I would add to your list of items used in the video! just changed and looks great! Thanks for the tip!

  • @matthoelzel9267
    @matthoelzel9267 Год назад +1

    Hi there, I'm trying to figure out name the name tool/plug-in you've install in you CL that gives you all the type-ahead helper command? Thanks!

    • @Deanin
      @Deanin  Год назад +1

      I don't recall exactly for this video, but here's the ones I mostly rely on;
      Emmet trigger expansion on tab (vscode setting that let's you tab complete HTML elements)
      TabNine (Free) for context aware suggestions for methods and classes
      GitHub CoPilot ($10/month) for the truly wild, complete function suggestions.

    • @matthoelzel9267
      @matthoelzel9267 Год назад +1

      Hi @Deanin, do you know the name of the plugin? Thanks.

    • @Deanin
      @Deanin  Год назад

      I think for the terminal specifically it's a Ruby 3 feature included out of the box. Tried to look it up but I'm not having any luck on mobile.

  • @jeremybrews2521
    @jeremybrews2521 2 года назад +1

    What extensions are you using in VSCode?
    I have a question about this code - - what is the post? Is it the post_path?

    • @Deanin
      @Deanin  2 года назад +1

      The autocomplete extensions are GitHub CoPilot, TabNine. I also sometimes use Emmet for tab expansion, and I think there's a folder icon extension that I use to make things look more neat.
      And yeah, the post is automagically converted into a post_path(post) URL.

    • @jeremybrews2521
      @jeremybrews2521 2 года назад +1

      @@Deanin I can't get emmet to work. I have added it my langs.

    • @Deanin
      @Deanin  2 года назад +1

      Emmett should come bundled in VS code, but you need to activate it. I'm not on my computer ATM, but, I think you need to go to file-> settings->search for "trigger expansion on tab" and make sure it's checked.

    • @jeremybrews2521
      @jeremybrews2521 2 года назад +1

      Ty sir. I didnt know that one existed

  • @brettbucsak7747
    @brettbucsak7747 Год назад

    Hello, Is this good for someone who only knows HTML and CSS that is looking to learn ruby on rails?

  • @user-qh9ht7ei7j
    @user-qh9ht7ei7j 11 месяцев назад +1

    idk if my q will be answered but i'm just wondering how do you make this autocompletes during your code writing?

    • @Deanin
      @Deanin  11 месяцев назад

      It's a combination of the free version of TabNine, and the $10/month GitHub Copilot extension. Copilot does a lot of the more advanced autocomplete stuff. 🙂

    • @user-qh9ht7ei7j
      @user-qh9ht7ei7j 11 месяцев назад

      @@Deanin Thx for the response! i'm still in the second part and as far as i know i think this is the best rails 7 course < really appreciate your work planning to complete the whole list 👍

  • @Stevesteacher
    @Stevesteacher Год назад

    5:47 peak comedy XD

  • @trad6078
    @trad6078 Год назад

    26:00 How to open up rails console in gitbash its not working for me

  • @theDaveBaxter
    @theDaveBaxter 2 года назад +1

    Sorry, me again. At 37 minutes were you say the Show page and the Index page use the same post object. Is there a way of splitting that up? So basically on my index page I don't want to show all the fields and I want it formatted nicer (I have done the formatting). But the Show page I do want it to show all the fields like it does now.

    • @Deanin
      @Deanin  2 года назад +1

      Yeah, that should be possible. If I recall correctly, the tutorial has the index page and the show page both using the _post.html.erb partial (app/views/posts/_post.html.erb)
      What you can do is create a new file, maybe called _simple_post.html.erb (app/views/posts/_simple_post.html.erb) and then in your index page, you can change the line that says,
      with one that instead says,
      You can then change your simple post to something that shows only the details that you want. By default, rails knows that "render post" should render the posts/_post.html.erb partial. But if you make a custom partial, then you need to be more explicit and tell it what you're rendering, a partial. You then tell Rails where this partial is in the views folder, "posts/simple_post", but you leave off the leading underscore (the _simple_post.html.erb becomes simple_post.html.erb). Finally, you need to give it the variables you're using in the partial. In this case, because you're probably showing the post object, we pass in the post from the .each loop on the index page.
      If you were doing this in your show page, your code would instead be:
      Because @post is the post object's name in there, given from the controller's show action.

    • @theDaveBaxter
      @theDaveBaxter 2 года назад

      @@Deanin Thanks, will give it a go.

    • @theDaveBaxter
      @theDaveBaxter 2 года назад +1

      @@Deanin Works perfectly, thank you.

    • @Deanin
      @Deanin  2 года назад +1

      Happy to help! Glad it worked.

  • @trad6078
    @trad6078 Год назад

    rails db:drop isnt working can we use any other comment to drop the database

  • @merlin2049er
    @merlin2049er 2 года назад +2

    Which website do you need to build to get a job?

    • @Deanin
      @Deanin  2 года назад

      It honestly depends. At the end of the day, the project you're passionate about is the one that will impress in interviews. If it's not something you're passionate about, because at the end of the day software is just another job, then at least be comfortable explaining it to someone who hasn't seen it before.
      I realize that's not really helpful, but there's not a good "just make this" answer. You kind of want to start with a tutorial project and build on it.
      Grab a portfolio tutorial website and then add your own flare to it. Add some other tutorials that you worked on, and add your own flare to those.
      A good example is https:pathfindout.com. It's based on the pathfinding visualizer tutorial by Clem
      (ruclips.net/video/msttfIHHkak/видео.html) but it has my own spin on it with procedural terrain generation.
      The resume that landed me my first job included my school projects, this channel, and pathfindout.com. We spent most of the time talking about this channel because it's what I read passionate about and it was something I could relate to the job.
      I actually just found a link to my original that I can share (it is a PDF, so don't click if you don't trust me etc):
      deanin.com/wp-content/uploads/2020/05/Web-Safe-Resume-Dean-DeHart.pdf
      I also have my updated resume up on my website, also a PDF:
      deanin.com/wp-content/uploads/2021/07/Dean-DeHart-WebSafe-Resume-07032021.pdf
      I hope this helps!

    • @merlin2049er
      @merlin2049er 2 года назад

      @@Deanin oh, I built my own group purchasing ecommerce website but have nothing to sell.

  • @theDaveBaxter
    @theDaveBaxter 2 года назад +1

    I don’t have a views folder but I do have a public folder. I notices your pages subfolder got created inside views.

    • @Deanin
      @Deanin  2 года назад +1

      That's really strange. It *should* create a pages subdirectory. I think that it'll avoid creating the views directory if you create a project with the --api flag, like this:
      rails new project_name --api
      So maybe for some reason your Rails installation thinks it's in API mode?
      Does this happen if you try to recreate a blank project using
      rails new project_name
      If it does keep happening, let me know and I'll try to help figure out why Rails is being a bully lol

    • @theDaveBaxter
      @theDaveBaxter 2 года назад +1

      @@Deanin ignore me, my mistake. I didn’t notice it was all in the app folder, I was looking in the root folder.

  • @burtking4270
    @burtking4270 Месяц назад

    Aimed at beginners but you don't explain what things are - for example, you said you're generating a controller but don't explain what that means....

  • @patriotpirate8167
    @patriotpirate8167 11 месяцев назад

    You aren't explaining what you are doing and why you are doing it. There are too many, "Let's do this" and "I'm going to do this" then just deleting a bunch of code. Please break it down Derek Banas style

  • @programmingcheatsheet
    @programmingcheatsheet Год назад

    Labeling a tutorial Rails 7 without references to key rails 7 features such as turbo frames, turbo streams, feels dishonest.

  • @emmanuellugadilu1059
    @emmanuellugadilu1059 Год назад

    i immediately get a routing error once i ran localhost/pages/home