[Ruby] What Rails newbies have learned by solving errors

1 minute read

Hello, it’s Shota!

I’m currently stuck in an error creating a portfolio in Rails.

And there are three things I learned again by solving various errors.

***1: Know the meaning of the error statement

  1. When asking questions, don’t just ask what to do
  2. It is important to leave the code once***

Then, I will explain one by one for beginners.

First, know the meaning of the error statement It really changes if you understand the meaning of the error statement. I’m a beginner and can’t speak English, but when I see an error message written in English that I’ve never seen, “What is this! Difficult…” I feel it. However, by googling English meanings and error sentences, you can get closer to the solution. The point is to “know exactly what the error means”. It tends to be easy for beginners “When you hit an error statement and a solution to a similar error hits, you try to copy it without understanding its meaning.” It turned out to be not so good.

** Second, when asking a question, don’t just ask “What should I do?” ** Beginners, including myself, may especially ask these questions. However, when asking a question, not only “error statement and what to do”, It is better to explain “Current status ➜ Question ➜ Trial”. By doing so, you can tell exactly what you want to solve, The respondent should be able to answer comfortably.

** Third, it’s important to leave the code once ** After refreshing once, sleeping, and then restarting the next day, I was able to solve it quickly! There are quite a few things. Also, among beginners like me, “I don’t really understand anything, but since it worked, let’s do it.” I think that kind of idea is totally ant! I sought for perfection, but I think it’s better than stagnation because I don’t understand it.

That’s all for resolving the error and realizing that it is important again.

These three will continue

***1: Know the meaning of the error statement

  1. When asking questions, don’t just ask what to do
  2. It is important to leave the code once***

We will be aware of this and fight against errors!