質問編集履歴

2

application.html.erbの中身を訂正

2020/11/28 07:54

投稿

kanou-shimon
kanou-shimon

スコア6

test CHANGED
File without changes
test CHANGED
@@ -152,23 +152,15 @@
152
152
 
153
153
  <link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
154
154
 
155
-
156
-
157
155
  <link href="//fonts.googleapis.com/css?family=Playfair+Display:400,700%7COpen+Sans:300,400,600,700" rel="stylesheet">
158
156
 
157
+ <link rel="stylesheet" type="text/css" href="assets/vendors/bootstrap/css/bootstrap.css">
159
158
 
159
+ <link rel="stylesheet" type="text/css" href="assets/vendors/font-awesome/css/fontawesome-all.min.css">
160
160
 
161
- <link rel="stylesheet" type="text/css" href="app/assets/vendors/bootstrap/css/bootstrap.css">
161
+ <link rel="stylesheet" type="text/css" href="assets/vendors/magnific-popup/magnific-popup.css">
162
162
 
163
-
164
-
165
- <link rel="stylesheet" type="text/css" href="app/assets/vendors/font-awesome/css/fontawesome-all.min.css">
166
-
167
- <link rel="stylesheet" type="text/css" href="app/assets/vendors/magnific-popup/magnific-popup.css">
168
-
169
-
170
-
171
- <link rel="stylesheet" type="text/css" href="assets/css/styles.css">
163
+ <link rel="stylesheet" type="text/css" href="assets/css/mystyles.css">
172
164
 
173
165
 
174
166
 

1

ご回答いただいたファイル配置とパイプラインを利用後、エラーが発生

2020/11/28 07:53

投稿

kanou-shimon
kanou-shimon

スコア6

test CHANGED
File without changes
test CHANGED
@@ -31,3 +31,149 @@
31
31
  今回railsに反映させたい元ファイルの構成
32
32
 
33
33
  ![イメージ説明](e76c54ec8a555e23562ac2d5d487b30d.png)
34
+
35
+
36
+
37
+
38
+
39
+ ------------------------------------------
40
+
41
+ ### いただいたご回答に沿って変更した後
42
+
43
+ →以下のようなエラーが発生(boostrapのcssファイルが見つからない)
44
+
45
+ ![イメージ説明](5446f5e92d68f7e4eb8be4d7fc95fbb3.png)
46
+
47
+
48
+
49
+
50
+
51
+ ファイル構造
52
+
53
+ ![イメージ説明](0d2c0429f222cba7a62a13330acc4b91.png)
54
+
55
+
56
+
57
+ ```
58
+
59
+ application.js
60
+
61
+ // This is a manifest file that'll be compiled into application.js, which will include all the files
62
+
63
+ // listed below.
64
+
65
+ //
66
+
67
+ // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, or any plugin's
68
+
69
+ // vendor/assets/javascripts directory can be referenced here using a relative path.
70
+
71
+ //
72
+
73
+ // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
74
+
75
+ // compiled file. JavaScript code in this file should be added after the last require_* statement.
76
+
77
+ //
78
+
79
+ // Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
80
+
81
+ // about supported directives.
82
+
83
+ //
84
+
85
+
86
+
87
+ //= require vendors/jquery.min
88
+
89
+ //= require vendors/jquery.migrate.min
90
+
91
+ //= require vendors/popper.min
92
+
93
+ //= require vendors/bootstrap/js/bootstrap.min
94
+
95
+ //= require js/myglobal
96
+
97
+ ```
98
+
99
+
100
+
101
+ ```
102
+
103
+ application.css
104
+
105
+ /*
106
+
107
+ *= require vendors/bootstrap/css/bootstrap
108
+
109
+ *= require css/mystyles
110
+
111
+ */
112
+
113
+ ```
114
+
115
+
116
+
117
+ ```
118
+
119
+ application.html.erb
120
+
121
+
122
+
123
+ <!DOCTYPE html>
124
+
125
+ <html>
126
+
127
+ <head>
128
+
129
+ <title><%= full_title(yield(:title)) %></title>
130
+
131
+ <%= csrf_meta_tags %>
132
+
133
+ <%= csp_meta_tag %>
134
+
135
+ <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
136
+
137
+ <%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>
138
+
139
+
140
+
141
+ <meta charset="utf-8"/>
142
+
143
+ <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
144
+
145
+ <meta http-equiv="x-ua-compatible" content="ie=edge">
146
+
147
+ <meta name="description" content="サービス紹介から抜粋">
148
+
149
+ <meta name="author" content="Kanou Shimon">
150
+
151
+
152
+
153
+ <link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
154
+
155
+
156
+
157
+ <link href="//fonts.googleapis.com/css?family=Playfair+Display:400,700%7COpen+Sans:300,400,600,700" rel="stylesheet">
158
+
159
+
160
+
161
+ <link rel="stylesheet" type="text/css" href="app/assets/vendors/bootstrap/css/bootstrap.css">
162
+
163
+
164
+
165
+ <link rel="stylesheet" type="text/css" href="app/assets/vendors/font-awesome/css/fontawesome-all.min.css">
166
+
167
+ <link rel="stylesheet" type="text/css" href="app/assets/vendors/magnific-popup/magnific-popup.css">
168
+
169
+
170
+
171
+ <link rel="stylesheet" type="text/css" href="assets/css/styles.css">
172
+
173
+
174
+
175
+ <%= render 'layouts/shim' %>
176
+
177
+ </head>
178
+
179
+ ```