Learn Ruby on Rails before I start building my web app?

I am a new programmer. I know Javascript, CSS, and HTML. I’ve never written a web app. I can cobble together code for my first try, but it is likely that as a beginner programmer code, it can quickly become an unmaintainable mess. I learned that Ruby on Rails helps build applications using basic patterns to inform better code design. Should I learn Ruby on Rails before I start coding? Or do I build it with HTML, CSS, and JavaScript and then modify it to fit the patterns? I don’t understand the best way to go about it.

If you know HTML, CSS, and JS, then you’re more than ready to try RoR. Go through a tutorial like www.railstutorial.org. I started with https://onemonth.com/courses/one-month-rails/ and really liked that course.

I know I’m ready to learn it. What I asked was: Should I learn Ruby on Rails before I start coding? Or do I build it with HTML, CSS, and JavaScript and then modify it to fit the patterns? I don’t understand the best way to go about it.

I think I’m confused by your question. Rails is a framework that uses the Ruby language. Are you asking if you should learn Ruby first? If that’s your question, then I’d say you don’t have to do it first, but it would help. If you go through one of the tutorials that I recommended, then you’ll use Ruby as you go through it and pick it up. You could pick up Chris Pine’s book, “Learn To Program”, which is a good first Ruby book.

Don't develop the pages first, or you will end up with html/js that
does not easily fit with rails. Start with Rails and work up to the
UI. Apart from anything else you will find a lot of the html is
generated by helpers.

Colin