How I start EVERY Rails app (pt. 1)

Поделиться
HTML-код
  • Опубликовано: 14 ноя 2022
  • In this video I show you how I set up a Rails app from scratch to use RSpec, Devise and Tailwind CSS.
    The source code for this lesson is available here: github.com/phawk/youtube-rail...
    ---
    Has this video helped you out? Consider buying me a coffee to say thanks and support future content like this, thanks!
    app.payhere.co/rapid-ruby/buy...
    You can also find more content like this, including premium courses and exclusive community and mentorship to help you level-up! Head over to rapidruby.com and use the code RRRUclips for a discount!
  • НаукаНаука

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

  • @TeenaCode
    @TeenaCode Год назад +9

    Hi Pete, I don't know if I mentioned this already, but here goes it:
    I'm a Laravel developer and have never built anything more than a simple blog with Rails.
    But guess what? I watch your videos, EVERY SINGLE one of them.
    I like the way you explain concepts and show your thought process. I take some of your ideas and opinions and translate them to my Laravel apps/projects.
    You're a great teacher and your produce great videos.
    If I could subscribe to your channel 1000x, I would!
    Take care and stay awesome✌🏿

    • @rapid-ruby
      @rapid-ruby  Год назад +3

      Thanks so much Teena! I'm glad you are getting value from them even though you aren't developing in rails. I used to use laravel quite some time ago, it's a great framework! Hopefully you'll like part two of this series where it's mostly focussed on Tailwind CSS :)

  • @kengreeff
    @kengreeff 7 месяцев назад +2

    Great stuff mate! I need to setup a doc like the one you are using for starting apps, really handy

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

    Hugely helpful - thank you so much for posting this video and part 2.

  • @alexk6444
    @alexk6444 4 месяца назад

    Just stumbled on this video and gotta say, its amazing! About to binge watch all your vids

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

    Stumbled across your channel recently, big fan of your videos. I hope you continue to create more content

  • @MarceloGonzalez-is3pu
    @MarceloGonzalez-is3pu 4 месяца назад +1

    Excellent video!

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

    I'd like to see how you also design your app/db and gather the business requirements things like that, modeling relationships etc.

  • @crr4141
    @crr4141 5 месяцев назад

    You are amazing man. Thanks

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

    early grats on 1k

  • @EricChua-gm9in
    @EricChua-gm9in 7 месяцев назад +1

    Thanks for the video. Two questions,
    a. how do you link the login and register to use auth.html.erb and not the default layout application.html.erb? Do you also recommend to have separate layouts like your video?
    b. Is there a reason to favor esbuild over importmap?
    Thanks.

    • @rapid-ruby
      @rapid-ruby  7 месяцев назад

      Hey Eric!
      A) you put “layout ‘auth’” into your controller for signups and sign ins.
      B) yeah, I made a video on migrating to esbuild and explain in that why I made the switch, I hope that helps!

    • @EricChua-gm9in
      @EricChua-gm9in 7 месяцев назад

      @@rapid-ruby I looked into the controllers folder, I could see only application_controller.rb and pages_controller.rb (also concerns folder). Wonder how come it knows how to use the auth.html.erb layout instead? I can't find the "layout 'auth'" codes if based on part I and II videos.

  • @Mr.Plutonium
    @Mr.Plutonium 3 месяца назад

    Have you updated your setup?

  • @RR-et6zp
    @RR-et6zp Год назад

    also , when you start a project do you mkdir X , cd X , git init y , cd y and then start the rails new z project? or ?

    • @rapid-ruby
      @rapid-ruby  Год назад +1

      I have a folder that I keep all my projects in `~/Sites`, so I go there, and just run `rails new name` and then `cd name`, Rails creates a git repo for you. Hope that helps!

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

    I have a problem:
    The asset "application.css" is not present in the asset pipeline.
    In the line:
    Same version ruby and rails that you used. I dont know why this error :(

  • @RR-et6zp
    @RR-et6zp Год назад

    How do you seperate the views and layouts folders? Did you copy paste everything from application controller into auth.html.erb? For me the auth.html.erb file was with white text, didn't register or something..

    • @rapid-ruby
      @rapid-ruby  Год назад +1

      To follow along with the code in this episode, just copy all the stuff across to auth.html.erb from application.html.erb. In my actual projects I tend to create a file in `app/views/layouts/partials/_head.html.erb` to share the code between them, and then load that partial in each layout. Hope that's useful!

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

      @@rapid-ruby why didnt you name your layout 'devise.html.erb' (the same as the controller name) ? That way you would be going with the convention.

    • @rapid-ruby
      @rapid-ruby  Год назад

      Because I don’t want to name any of my code the names of the underlying gems if I can avoid it, for me auth.html.erb makes the most sense for the job I’m using it for. Also I’m no longer using devise in as many projects going forward, but I’m still calling my layouts auth.html.erb by my own convention. Hope that helps :)

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

      @@rapid-ruby I still think that when you are using devise, that’s a good idea to use layout named devise, because that’s the name of the controller and you don’t need any additional configuration. Convention over configuration as you’ve probably heard. Keep up the good work with videos :)

    • @rapid-ruby
      @rapid-ruby  Год назад

      As far as I know, you would still need to set the layout manually, Rails will always default to application.html.erb, no?

  • @RR-et6zp
    @RR-et6zp Год назад +2

    Does this work on rails 7 ?

    • @rapid-ruby
      @rapid-ruby  Год назад

      Yeah, this is a Rails 7 app :)

    • @RR-et6zp
      @RR-et6zp Год назад +1

      @@rapid-ruby Cool thanks. Applying to junior rails dev jobs soon so it's cool for you to make this vid haha. Thanks