Now that I've learned Progate's Rails course, can I make the same on my PC (local environment)? I thought, I made an SNS application that also serves as a review and output.
macOS catalina version 10.15.6
Rails 6.0.3.2
Local development environment → Deploy to heroku (make it visible to everyone)
【problem】
I enter various rails commands to mess with the database in the terminal, but I encounter a phenomenon that only zsh: command not found appears
【Solution】
I just forgot to type rails console
...
Also, since you can't hit rails s during rails console, you need to close the rails console with "exit" ...
I didn't know that I had to close the server every time to operate the terminal.
(In Progate, I used to operate the rails console normally with the server open with rails s
)
【problem】
An error occurs when deploying to heroku or changing a gem.
【Solution】
I forgot to type rails db: migrate
, or I forgot to type bundle install
.
→ There was a scene where I was distracted by the MVC structure and forgot the roles of the database and table, and I felt that a migration error had occurred.
【problem】
Even if I post an image, I encountered a phenomenon that it disappears after a certain period of time for some reason
[Cause]
In the free version of heroku, it turned out that the image is automatically deleted after a certain period of time. This can't be helped.
I think it was a good experience because I had to start building the environment from scratch, even though it was local.
What I did was almost a sutra copy, but it took longer than I expected to complete due to a series of errors that could not have occurred with Progate.
I've heard stories in many places that "engineers spend more time googled than writing code," but I realized that was the case.
I googled with the thought that "If you get stuck, you should google, there must be a predecessor who was in trouble with the same thing."
-When trying to deploy to heroku from a local environment https://qiita.com/Kohei_Kishimoto0214/items/d4a4ca13d4a8ab11b3f8