質問編集履歴

6

修正

2021/05/18 23:34

投稿

kondo22
kondo22

スコア1

test CHANGED
File without changes
test CHANGED
@@ -206,7 +206,7 @@
206
206
 
207
207
 
208
208
 
209
- <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
209
+ line #8 <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
210
210
 
211
211
  <%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>
212
212
 

5

書式の改善

2021/05/18 23:34

投稿

kondo22
kondo22

スコア1

test CHANGED
File without changes
test CHANGED
@@ -4,13 +4,17 @@
4
4
 
5
5
  解決方法をご教授いただきたいです。
6
6
 
7
+ OSはwindows10でruby '2.5.1' rails '5.2.1'を利用です。
8
+
7
9
 
8
10
 
9
11
  <エラー内容>
10
12
 
13
+ ```ここに言語を入力
14
+
11
15
  ExecJS::ProgramError in Questions#index
12
16
 
13
- Showing /home/ec2-user/environment/rails_projects/qanda/app/views/layouts/application.html.erb where line #8 raised:
17
+ Showing /home/ec2-user/environment/rails_projects/qanda/app/views/layouts/application.html.erb where line #8 raised:
14
18
 
15
19
 
16
20
 
@@ -18,6 +22,8 @@
18
22
 
19
23
  Rails.root: /home/ec2-user/environment/rails_projects/qanda
20
24
 
25
+ ```
26
+
21
27
 
22
28
 
23
29
  ---------------------
@@ -26,6 +32,8 @@
26
32
 
27
33
 
28
34
 
35
+ ```ここに言語を入力
36
+
29
37
  source 'https://rubygems.org'
30
38
 
31
39
  git_source(:github) { |repo| "https://github.com/#{repo}.git" }
@@ -150,6 +158,8 @@
150
158
 
151
159
  gem 'jquery-rails', '~> 4.3.1'
152
160
 
161
+ ```
162
+
153
163
 
154
164
 
155
165
  ---------------------
@@ -158,6 +168,8 @@
158
168
 
159
169
 
160
170
 
171
+ ```ここに言語を入力
172
+
161
173
  //= require rails-ujs
162
174
 
163
175
  //= require activestorage
@@ -172,9 +184,101 @@
172
184
 
173
185
  //= require_tree .
174
186
 
175
-
187
+ ```
176
-
188
+
177
- ---------------------
189
+ ---------------------
190
+
191
+ <application.html.erb>
192
+
193
+ ```ここに言語を入力
194
+
195
+ <!DOCTYPE html>
196
+
197
+ <html>
198
+
199
+ <head>
200
+
201
+ <title>Qanda</title>
202
+
203
+ <%= csrf_meta_tags %>
204
+
205
+ <%= csp_meta_tag %>
206
+
207
+
208
+
209
+ <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
210
+
211
+ <%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>
212
+
213
+ </head>
214
+
215
+
216
+
217
+ <body>
218
+
219
+ <%= yield %>
220
+
221
+ </body>
222
+
223
+ </html>
224
+
225
+ ```
226
+
227
+ ---------------------
228
+
229
+ <index.html.erb>
230
+
231
+ ```ここに言語を入力
232
+
233
+ <h2>Questions</h2>
234
+
235
+ <div class="row">
236
+
237
+ <div col-md-12>
238
+
239
+ <table class="table table-striped">
240
+
241
+ <thead class="thead-light">
242
+
243
+ <tr>
244
+
245
+ <th>ID</th>
246
+
247
+ <th>Title</th>
248
+
249
+ <th>Menu</th>
250
+
251
+ </tr>
252
+
253
+ </thead>
254
+
255
+ <tbody>
256
+
257
+ <% @questions.each do |question| %>
258
+
259
+ <tr>
260
+
261
+ <td><%= question.id %></td>
262
+
263
+ <td><%= question.title %></td>
264
+
265
+ <td>[Edit][Delete]</td>
266
+
267
+ </tr>
268
+
269
+ <% end%>
270
+
271
+ </tbody>
272
+
273
+ </table>
274
+
275
+ </div>
276
+
277
+ </div>
278
+
279
+ ---------
280
+
281
+ ```------------
178
282
 
179
283
  試したこと
180
284
 

4

修正

2021/05/18 23:30

投稿

kondo22
kondo22

スコア1

test CHANGED
File without changes
test CHANGED
@@ -1,6 +1,8 @@
1
1
  railsを学習中の者です。
2
2
 
3
3
  railsにbootstrap4を導入したいのですが下記のエラーが出て困っています。
4
+
5
+ 解決方法をご教授いただきたいです。
4
6
 
5
7
 
6
8
 
@@ -173,3 +175,11 @@
173
175
 
174
176
 
175
177
  ---------------------
178
+
179
+ 試したこと
180
+
181
+ ※Gemfileにgem 'coffee-script-source', '1.8.0' を追記し、bundle update coffee-script-sourceと入力するが改善なし
182
+
183
+
184
+
185
+ ※nodeコマンドでset NODE_PATH=C:\Users\a\AppData\Roaming\npm\node_modules2を実行するもSyntaxError: Unexpected identifierとのエラー表示

3

修正

2021/05/18 14:21

投稿

kondo22
kondo22

スコア1

test CHANGED
File without changes
test CHANGED
File without changes

2

書式の改善

2021/05/18 14:13

投稿

kondo22
kondo22

スコア1

test CHANGED
File without changes
test CHANGED
@@ -34,69 +34,69 @@
34
34
 
35
35
 
36
36
 
37
- Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
37
+
38
38
 
39
39
  gem 'rails', '~> 5.2.1'
40
40
 
41
- Use sqlite3 as the database for Active Record
41
+
42
42
 
43
43
  gem 'sqlite3', '~> 1.3.6'
44
44
 
45
- Use Puma as the app server
45
+
46
46
 
47
47
  gem 'puma', '~> 3.11'
48
48
 
49
- Use SCSS for stylesheets
49
+
50
50
 
51
51
  gem 'sass-rails', '~> 5.0'
52
52
 
53
- Use Uglifier as compressor for JavaScript assets
53
+
54
54
 
55
55
  gem 'uglifier', '>= 1.3.0'
56
56
 
57
- See https://github.com/rails/execjs#readme for more supported runtimes
57
+
58
58
 
59
59
  gem 'mini_racer', platforms: :ruby
60
60
 
61
61
 
62
62
 
63
- Use CoffeeScript for .coffee assets and views
63
+
64
64
 
65
65
  gem 'coffee-rails', '~> 4.2'
66
66
 
67
67
  gem 'coffee-script-source', '1.8.0'
68
68
 
69
- Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
69
+
70
70
 
71
71
  gem 'turbolinks', '~> 5'
72
72
 
73
- Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
73
+
74
74
 
75
75
  gem 'jbuilder', '~> 2.5'
76
76
 
77
- Use Redis adapter to run Action Cable in production
77
+
78
78
 
79
79
  gem 'redis', '~> 4.0'
80
80
 
81
- Use ActiveModel has_secure_password
81
+
82
82
 
83
83
  gem 'bcrypt', '~> 3.1.7'
84
84
 
85
85
 
86
86
 
87
- Use ActiveStorage variant
87
+
88
88
 
89
89
  gem 'mini_magick', '~> 4.8'
90
90
 
91
91
 
92
92
 
93
- Use Capistrano for deployment
93
+
94
94
 
95
95
  gem 'capistrano-rails', group: :development
96
96
 
97
97
 
98
98
 
99
- Reduces boot times through caching; required in config/boot.rb
99
+
100
100
 
101
101
  gem 'bootsnap', '>= 1.1.0', require: false
102
102
 
@@ -104,7 +104,7 @@
104
104
 
105
105
  group :development, :test do
106
106
 
107
- Call 'byebug' anywhere in the code to stop execution and get a debugger console
107
+
108
108
 
109
109
  gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
110
110
 
@@ -114,13 +114,13 @@
114
114
 
115
115
  group :development do
116
116
 
117
- Access an interactive console on exception pages or by calling 'console' anywhere in the code.
117
+
118
118
 
119
119
  gem 'web-console', '>= 3.3.0'
120
120
 
121
121
  gem 'listen', '>= 3.0.5', '< 3.2'
122
122
 
123
- Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
123
+
124
124
 
125
125
  gem 'spring'
126
126
 
@@ -132,23 +132,15 @@
132
132
 
133
133
  group :test do
134
134
 
135
- Adds support for Capybara system testing and selenium driver
135
+
136
136
 
137
137
  gem 'capybara', '>= 2.15'
138
138
 
139
139
  gem 'selenium-webdriver'
140
140
 
141
- Easy installation and use of chromedriver to run system tests with Chrome
141
+
142
-
143
- gem 'chromedriver-helper'
144
142
 
145
143
  end
146
-
147
-
148
-
149
- Windows does not include zoneinfo files, so bundle the tzinfo-data gem
150
-
151
- gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
152
144
 
153
145
 
154
146
 

1

書式の改善

2021/05/18 14:05

投稿

kondo22
kondo22

スコア1

test CHANGED
File without changes
test CHANGED
@@ -34,69 +34,69 @@
34
34
 
35
35
 
36
36
 
37
- # Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
37
+ Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
38
38
 
39
39
  gem 'rails', '~> 5.2.1'
40
40
 
41
- # Use sqlite3 as the database for Active Record
41
+ Use sqlite3 as the database for Active Record
42
42
 
43
43
  gem 'sqlite3', '~> 1.3.6'
44
44
 
45
- # Use Puma as the app server
45
+ Use Puma as the app server
46
46
 
47
47
  gem 'puma', '~> 3.11'
48
48
 
49
- # Use SCSS for stylesheets
49
+ Use SCSS for stylesheets
50
50
 
51
51
  gem 'sass-rails', '~> 5.0'
52
52
 
53
- # Use Uglifier as compressor for JavaScript assets
53
+ Use Uglifier as compressor for JavaScript assets
54
54
 
55
55
  gem 'uglifier', '>= 1.3.0'
56
56
 
57
- # See https://github.com/rails/execjs#readme for more supported runtimes
57
+ See https://github.com/rails/execjs#readme for more supported runtimes
58
58
 
59
- # gem 'mini_racer', platforms: :ruby
59
+ gem 'mini_racer', platforms: :ruby
60
60
 
61
61
 
62
62
 
63
- # Use CoffeeScript for .coffee assets and views
63
+ Use CoffeeScript for .coffee assets and views
64
64
 
65
65
  gem 'coffee-rails', '~> 4.2'
66
66
 
67
67
  gem 'coffee-script-source', '1.8.0'
68
68
 
69
- # Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
69
+ Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
70
70
 
71
71
  gem 'turbolinks', '~> 5'
72
72
 
73
- # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
73
+ Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
74
74
 
75
75
  gem 'jbuilder', '~> 2.5'
76
76
 
77
- # Use Redis adapter to run Action Cable in production
77
+ Use Redis adapter to run Action Cable in production
78
78
 
79
- # gem 'redis', '~> 4.0'
79
+ gem 'redis', '~> 4.0'
80
80
 
81
- # Use ActiveModel has_secure_password
81
+ Use ActiveModel has_secure_password
82
82
 
83
- # gem 'bcrypt', '~> 3.1.7'
83
+ gem 'bcrypt', '~> 3.1.7'
84
84
 
85
85
 
86
86
 
87
- # Use ActiveStorage variant
87
+ Use ActiveStorage variant
88
88
 
89
- # gem 'mini_magick', '~> 4.8'
89
+ gem 'mini_magick', '~> 4.8'
90
90
 
91
91
 
92
92
 
93
- # Use Capistrano for deployment
93
+ Use Capistrano for deployment
94
94
 
95
- # gem 'capistrano-rails', group: :development
95
+ gem 'capistrano-rails', group: :development
96
96
 
97
97
 
98
98
 
99
- # Reduces boot times through caching; required in config/boot.rb
99
+ Reduces boot times through caching; required in config/boot.rb
100
100
 
101
101
  gem 'bootsnap', '>= 1.1.0', require: false
102
102
 
@@ -104,7 +104,7 @@
104
104
 
105
105
  group :development, :test do
106
106
 
107
- # Call 'byebug' anywhere in the code to stop execution and get a debugger console
107
+ Call 'byebug' anywhere in the code to stop execution and get a debugger console
108
108
 
109
109
  gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
110
110
 
@@ -114,13 +114,13 @@
114
114
 
115
115
  group :development do
116
116
 
117
- # Access an interactive console on exception pages or by calling 'console' anywhere in the code.
117
+ Access an interactive console on exception pages or by calling 'console' anywhere in the code.
118
118
 
119
119
  gem 'web-console', '>= 3.3.0'
120
120
 
121
121
  gem 'listen', '>= 3.0.5', '< 3.2'
122
122
 
123
- # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
123
+ Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
124
124
 
125
125
  gem 'spring'
126
126
 
@@ -132,13 +132,13 @@
132
132
 
133
133
  group :test do
134
134
 
135
- # Adds support for Capybara system testing and selenium driver
135
+ Adds support for Capybara system testing and selenium driver
136
136
 
137
137
  gem 'capybara', '>= 2.15'
138
138
 
139
139
  gem 'selenium-webdriver'
140
140
 
141
- # Easy installation and use of chromedriver to run system tests with Chrome
141
+ Easy installation and use of chromedriver to run system tests with Chrome
142
142
 
143
143
  gem 'chromedriver-helper'
144
144
 
@@ -146,7 +146,7 @@
146
146
 
147
147
 
148
148
 
149
- # Windows does not include zoneinfo files, so bundle the tzinfo-data gem
149
+ Windows does not include zoneinfo files, so bundle the tzinfo-data gem
150
150
 
151
151
  gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
152
152