rails tutorial Chapter 5

Introduction

I will post the process of advancing the rails tutorial on my own.

It touches on words that I didn't understand in the process, jammed errors, and so on.

Please point out any mistakes as it is an output of personal learning.

Since this is my first post, I think there are many places that are difficult to read, but please forgive me.

Chapter 5 Creating a layout

5.1.2 Bootstrap and custom CSS

It's a digression.

After introducing the Bootstrap CSS framework in Listing 5.6, I checked it in a browser. Then, the image of the cat was still displayed in the previous exercise (Exercise 3 in 5.1.1), so I tried to comment out with CTRL + /.

# <%= image_tag("kitten.jpg ", alt: "cat image") %>

When I checked it with a browser, the image of the cat was still displayed.

Apparently if you want to comment out erb

<%#= image_tag("kitten.jpg ", alt: "cat image") %>

And it seems that # is added after <%. (I was followed about this content in the next exercise)

5.4.2 URL for user registration

Exercise 1 If you haven't started the exercise in 5.4.1.1 yet, start by modifying it as shown in Listing 5.41 so that you can use the named route signup_path. Also, make sure the test is green at this point, as the named route is now available in Listing 5.43. (rails tutorial Quoted from Chapter 5)

a problem occured!! I got an error in a test that should succeed.

ERROR["test_should_get_root", #<Minitest::Reporters::Suite:0x00000000091feba0 @name="StaticPagesControllerTest">, 0.5797893999842927]
 test_should_get_root#StaticPagesControllerTest (0.58s)
ActionView::Template::Error:         ActionView::Template::Error: Permission denied @ rb_file_s_rename - (C:/environment/sample_app/tmp/cache/assets/sprockets/v4.0.0/99/99m8UCKl4j8IpsVOK8ltLHyNh8Ae0nHw3GBkC34V_co.cache.47870560.18376.12839, C:/environment/sample_app/tmp/cache/assets/sprockets/v4.0.0/99/99m8UCKl4j8IpsVOK8ltLHyNh8Ae0nHw3GBkC34V_co.cache)

Huh? Similar error Like I encountered in Chapter 3 ... Articles referred to in Chapter 3 https://qiita.com/yasumichi/items/ccf1f7f57b6627034226

So again

> rails tmp:cache:clear
> rails assets:precompile

I entered this command and ran the test and it was successful.

At the end

I was able to finish this chapter without stumbling so much.

Recommended Posts

rails tutorial Chapter 6
rails tutorial Chapter 1
rails tutorial Chapter 7
rails tutorial Chapter 5
rails tutorial Chapter 10
rails tutorial Chapter 9
rails tutorial Chapter 8
Rails Tutorial Chapter 5 Notes
Rails Tutorial Chapter 10 Notes
Rails Tutorial Chapter 3 Notes
Rails Tutorial Chapter 3 Learning
Rails Tutorial Memorandum (Chapter 3, 3.1)
Rails Tutorial Chapter 4 Notes
Rails Tutorial Chapter 4 Learning
Rails Tutorial Chapter 1 Learning
Rails Tutorial Chapter 2 Learning
Rails Tutorial Chapter 8 Notes
Rails Tutorial Memorandum (Chapter 3, 3.3.2)
rails tutorial
rails tutorial
rails tutorial
rails tutorial
rails tutorial
rails tutorial
rails tutorial
[Rails Tutorial Chapter 4] Rails-flavored Ruby
[Rails Struggle/Rails Tutorial] Summary of Rails Tutorial Chapter 2
Rails tutorial test
[Rails Tutorial Chapter 5] Create a layout
rails tutorial chapter 10 summary (for self-learning)
Rails tutorial memorandum 1
Rails tutorial memorandum 2
Chewing Rails Tutorial [Chapter 2 Toy Application]
Start Rails Tutorial
[Beginner] Rails Tutorial
Rails Tutorial (4th Edition) Memo Chapter 6
Rails Tutorial 6th Edition Learning Summary Chapter 7
Rails Tutorial 6th Edition Learning Summary Chapter 9
Rails Tutorial 6th Edition Learning Summary Chapter 2
Rails Tutorial Chapter 0: Preliminary Basic Knowledge Learning 5
Rails Tutorial 6th Edition Learning Summary Chapter 3
Rails Tutorial 6th Edition Learning Summary Chapter 8
Chapter 4 Rails Flavored Ruby
Rails Tutorial cheat sheet
[Rails] Learning with Rails tutorial
rails tutorial fighting notes Ⅲ
[Rails Struggle/Rails Tutorial] What you learned in Rails Tutorial Chapter 3
Rails Tutorial Chapter 1 From Zero to Deployment [Try]
Chewing Rails Tutorial [Chapter 3 Creating Almost Static Pages]
[Rails tutorial] A memorandum of "Chapter 11 Account Activation"
Resolve Gem :: FilePermissionError when running gem install rails (Rails Tutorial Chapter 1)
[Ruby on Rails Tutorial] Error in the test in Chapter 3
11.1 AccountActivations Resources: Rails Tutorial Notes-Chapter 11
Rails Tutorial Records and Memorandum # 0
Rails Tutorial (4th Edition) Summary
Rails Tutorial 4th Edition: Chapter 1 From Zero to Deployment
Resolve ActiveRecord :: NoDatabaseError when doing rails test (Rails tutorial Chapter 3)
I tried Rails beginner [Chapter 2]
[Rails] Implementation of tutorial function
Chewing Rails Tutorial [Chapter 1 From Zero to Deployment] Second Half
Chewing Rails Tutorial [Chapter 1 From Zero to Deployment] First Half