An error occurred in the free course of RubyOnRails Udemy, solved it, and went through to the end

An error occurred in the free course of RubyOnRails Udemy, solved it, and went through to the end

For those of you who have just started learning RubyOnRails and have taken the following free Udemy courses, but have stumbled on an error and couldn't complete it to the end, we will share the errors and solutions we have experienced.

[You can do it in as little as 30 minutes!] Introduction to Ruby on Rails: Easy for beginners! Browser

When the error occurs-1

  1. Course of "14. Addition of image files and addition of editing functions" スクリーンショット 2020-10-27 200600.png

  2. An error occurred in the terminal when I typed "rake db: migrate" in the terminal. スクリーンショット 2020-10-27 212832.png

  3. I also got the error "ActiveRecord :: PendingMigrationError" on localhost: 3000. スクリーンショット 2020-10-27 213027.png

Cause, solution-1

The reason is that'paperclip' depends on the version of rails. After careful confirmation, it was stated that the course was based on Ruby on Rails 5.2. For me, PaizaCloud was based on Ruby on Rails 6 at the moment.

  1. Hit "gem list rails" in the terminal to check the rails version. スクリーンショット 2020-10-27 211106.png
  1. Create a new project.
  1. In the terminal, type "rails _ (version) _ new boardgame-app --database = mysql" to create a project that uses RubyOnRails 5 series. スクリーンショット 2020-10-27 211203.png

Operation check-1

  1. Let's proceed according to the course.

  2. When I checked the operation in the course of "14. Adding image files and adding editing functions", it proceeded without any error. There is no problem with localhost: 3000. スクリーンショット 2020-10-27 195849_.png


When the error occurs-2

  1. Course of "14. Addition of image files and addition of editing functions" スクリーンショット 2020-10-27 200405.png

Cause, solution-2

The cause is unknown, but unlike the others, it seems that the cause is using "<% = from ...". スクリーンショット 2020-10-27 200428_.png

  1. Rewrite "<% = from ..." to "<% = f ...". スクリーンショット 2020-10-27 200443_.png

Operation check-2

  1. It was displayed without any problem on localhost: 3000.

** I think Laravel is the same, but there were many unexpected deficiencies depending on the version (the description method was different, the package could not be used, etc.). If you encounter an error, don't be frustrated, and I hope everyone will work together to resolve it. ** **

Free courses may not allow you to ask questions to the instructor even if you encounter an error. I hope this post will be a driving force for those who are starting to learn Ruby On Rails to go through to the end without giving up.

Recommended Posts

An error occurred in the free course of RubyOnRails Udemy, solved it, and went through to the end
[Java] Output the result of ffprobe -show_streams in JSON and map it to an object with Jackson
[Docker] The story that an error occurred in docker-compose up
It doesn't respond to the description in .js of the packs file
[Swift5] How to get an array and the complement of arrays
Method to add the number of years and get the end of the month
How to get the length of an audio file in java
It should be the same as the sample when logging in to Twitter, but an error occurs ~ resolution
The end of catastrophic programming # 03 "Comparison of integers, if" a> b ", assume that it is" a --b> 0 ""
Specify the default value with @Builder of Lombok
Test the contents of an Excel file with JUnit
You can do it with copy! Aspect-oriented programming (Android)
The difference between programming with Ruby classes and programming without it
An example of a small work when you want to divide the definition value according to the environment but do not want to be aware of it
The story of toString () starting with passing an array to System.out.println
[Java] Output the result of ffprobe -show_streams in JSON and map it to an object with Jackson
An error occurred in the free course of RubyOnRails Udemy, solved it, and went through to the end
What I did when I was addicted to the error "Could not find XXX in any of the sources" when I added a Gem and built it
The story of forgetting to close a file in Java and failing
Add the pre-built jar library to Android and call it in the framework
Confirmation and refactoring of the flow from request to controller in [httpclient]
What to do and how to install when an error occurs in DXRuby 1.4.7
Solved the problem of freezing due to sudden "EXT4-fs error" on Ubuntu 20.04
Get the type of an array element to determine if it is an array
How to change the maximum and maximum number of POST data in Spark
I want to display an error message when registering in the database
Is it possible to put the library (aar) in the Android library (aar) and use it?
An error occurred when executing a function from MyBatis with the OUT parameter set to CURSOR in PostgreSQL.
A solution to an error that makes you angry that you are not following the MySQL default setting ONLY_FULL_GROUP_BY in a production environment and it is not unique.