質問編集履歴
3
編集
title
CHANGED
File without changes
|
body
CHANGED
@@ -19,8 +19,6 @@
|
|
19
19
|
33 redirect_to posts_path
|
20
20
|
34 end
|
21
21
|
|
22
|
-
|
23
|
-
Rails.root: /Users/iwasakenta/projects/hondeput
|
24
22
|
```
|
25
23
|
### 該当のソースコード
|
26
24
|
|
2
見やすいように変更
title
CHANGED
File without changes
|
body
CHANGED
@@ -143,61 +143,7 @@
|
|
143
143
|
|
144
144
|
```
|
145
145
|
|
146
|
-
|
147
|
-
### 試したこと
|
148
146
|
```
|
149
|
-
application.jsに追記
|
150
|
-
|
151
|
-
// This file is automatically compiled by Webpack, along with any other files
|
152
|
-
// present in this directory. You're encouraged to place your actual application logic in
|
153
|
-
// a relevant structure within app/javascript and only use these pack files to reference
|
154
|
-
// that code so it'll be compiled.
|
155
|
-
|
156
|
-
require("@rails/ujs").start()
|
157
|
-
require("turbolinks").start()
|
158
|
-
require("@rails/activestorage").start()
|
159
|
-
require("channels")
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
// Uncomment to copy all static images under ../images to the output folder and reference
|
165
|
-
// them with the image_pack_tag helper in views (e.g <%= image_pack_tag 'rails.png' %>)
|
166
|
-
// or the `imagePath` JavaScript helper below.
|
167
|
-
//
|
168
|
-
// const images = require.context('../images', true)
|
169
|
-
// const imagePath = (name) => images(name, true)
|
170
|
-
#ここから追記
|
171
|
-
//= require activestorage
|
172
|
-
//= require turbolinks
|
173
|
-
//= require jquery
|
174
|
-
//= require popper
|
175
|
-
//= require bootstrap
|
176
|
-
//= require_tree .
|
177
|
-
//= require jquery_ujs //
|
178
|
-
```
|
179
|
-
|
180
|
-
```
|
181
|
-
app/viwes/layouts/application.html.erb
|
182
|
-
<!DOCTYPE html>
|
183
|
-
<html>
|
184
|
-
<head>
|
185
|
-
<title>Hondeput</title>
|
186
|
-
<%= csrf_meta_tags %>
|
187
|
-
<%= csp_meta_tag %>
|
188
|
-
|
189
|
-
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.9.0/css/all.min.css" integrity="sha256-UzFD2WYH2U1dQpKDjjZK72VtPeWP50NoJjd26rnAdUI=" crossorigin="anonymous" />
|
190
|
-
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
|
191
|
-
<%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>
|
192
|
-
</head>
|
193
|
-
|
194
|
-
【変更内容】
|
195
|
-
<%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %> → <%= javascript_pack_tag 'application', 'data-turbolinks-track': 'reload' %>に変更。
|
196
|
-
|
197
|
-
※webpackerも確認しましたが、Rails6から導入されているらしくそこはいじっておりません。
|
198
|
-
```
|
199
|
-
### 補足情報(FW/ツールのバージョンなど)
|
200
|
-
```
|
201
147
|
Gemfile
|
202
148
|
|
203
149
|
source 'https://rubygems.org'
|
@@ -263,4 +209,59 @@
|
|
263
209
|
```
|
264
210
|
|
265
211
|
|
212
|
+
### 試したこと
|
213
|
+
```
|
214
|
+
application.jsに追記
|
215
|
+
|
216
|
+
// This file is automatically compiled by Webpack, along with any other files
|
217
|
+
// present in this directory. You're encouraged to place your actual application logic in
|
218
|
+
// a relevant structure within app/javascript and only use these pack files to reference
|
219
|
+
// that code so it'll be compiled.
|
220
|
+
|
221
|
+
require("@rails/ujs").start()
|
222
|
+
require("turbolinks").start()
|
223
|
+
require("@rails/activestorage").start()
|
224
|
+
require("channels")
|
225
|
+
|
226
|
+
|
227
|
+
|
228
|
+
|
229
|
+
// Uncomment to copy all static images under ../images to the output folder and reference
|
230
|
+
// them with the image_pack_tag helper in views (e.g <%= image_pack_tag 'rails.png' %>)
|
231
|
+
// or the `imagePath` JavaScript helper below.
|
232
|
+
//
|
233
|
+
// const images = require.context('../images', true)
|
234
|
+
// const imagePath = (name) => images(name, true)
|
235
|
+
#ここから追記
|
236
|
+
//= require activestorage
|
237
|
+
//= require turbolinks
|
238
|
+
//= require jquery
|
239
|
+
//= require popper
|
240
|
+
//= require bootstrap
|
241
|
+
//= require_tree .
|
242
|
+
//= require jquery_ujs //
|
243
|
+
```
|
244
|
+
|
245
|
+
```
|
246
|
+
app/viwes/layouts/application.html.erb
|
247
|
+
<!DOCTYPE html>
|
248
|
+
<html>
|
249
|
+
<head>
|
250
|
+
<title>Hondeput</title>
|
251
|
+
<%= csrf_meta_tags %>
|
252
|
+
<%= csp_meta_tag %>
|
253
|
+
|
254
|
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.9.0/css/all.min.css" integrity="sha256-UzFD2WYH2U1dQpKDjjZK72VtPeWP50NoJjd26rnAdUI=" crossorigin="anonymous" />
|
255
|
+
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
|
256
|
+
<%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>
|
257
|
+
</head>
|
258
|
+
|
259
|
+
【変更内容】
|
260
|
+
<%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %> → <%= javascript_pack_tag 'application', 'data-turbolinks-track': 'reload' %>に変更。
|
261
|
+
|
262
|
+
※webpackerも確認しましたが、Rails6から導入されているらしくそこはいじっておりません。
|
263
|
+
```
|
264
|
+
### 補足情報(FW/ツールのバージョンなど)
|
265
|
+
|
266
|
+
|
266
267
|
ここにより詳細な情報を記載してください。
|
1
Gemfileの追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -192,12 +192,75 @@
|
|
192
192
|
</head>
|
193
193
|
|
194
194
|
【変更内容】
|
195
|
-
<%=
|
195
|
+
<%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %> → <%= javascript_pack_tag 'application', 'data-turbolinks-track': 'reload' %>に変更。
|
196
196
|
|
197
197
|
※webpackerも確認しましたが、Rails6から導入されているらしくそこはいじっておりません。
|
198
198
|
```
|
199
199
|
### 補足情報(FW/ツールのバージョンなど)
|
200
|
+
```
|
201
|
+
Gemfile
|
200
202
|
|
203
|
+
source 'https://rubygems.org'
|
204
|
+
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
|
201
205
|
|
206
|
+
ruby '2.6.5'
|
202
207
|
|
208
|
+
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
|
209
|
+
gem 'rails', '~> 6.0.0'
|
210
|
+
# Use mysql as the database for Active Record
|
211
|
+
gem 'mysql2', '>= 0.5.3'
|
212
|
+
# Use Puma as the app server
|
213
|
+
gem 'puma', '~> 3.11'
|
214
|
+
# Use SCSS for stylesheets
|
215
|
+
gem 'sass-rails', '~> 5'
|
216
|
+
# Transpile app-like JavaScript. Read more: https://github.com/rails/webpacker
|
217
|
+
gem 'webpacker', '~> 4.0'
|
218
|
+
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
|
219
|
+
gem 'turbolinks', '~> 5'
|
220
|
+
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
|
221
|
+
gem 'jbuilder', '~> 2.7'
|
222
|
+
# Use Redis adapter to run Action Cable in production
|
223
|
+
# gem 'redis', '~> 4.0'
|
224
|
+
# Use Active Model has_secure_password
|
225
|
+
# gem 'bcrypt', '~> 3.1.7'
|
226
|
+
|
227
|
+
# Use Active Storage variant
|
228
|
+
# gem 'image_processing', '~> 1.2'
|
229
|
+
|
230
|
+
# Reduces boot times through caching; required in config/boot.rb
|
231
|
+
gem 'bootsnap', '>= 1.4.2', require: false
|
232
|
+
|
233
|
+
group :development, :test do
|
234
|
+
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
|
235
|
+
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
|
236
|
+
end
|
237
|
+
|
238
|
+
group :development do
|
239
|
+
# Access an interactive console on exception pages or by calling 'console' anywhere in the code.
|
240
|
+
gem 'web-console', '>= 3.3.0'
|
241
|
+
gem 'listen', '>= 3.0.5', '< 3.2'
|
242
|
+
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
|
243
|
+
gem 'spring'
|
244
|
+
gem 'spring-watcher-listen', '~> 2.0.0'
|
245
|
+
end
|
246
|
+
|
247
|
+
group :test do
|
248
|
+
# Adds support for Capybara system testing and selenium driver
|
249
|
+
gem 'capybara', '>= 2.15'
|
250
|
+
gem 'selenium-webdriver'
|
251
|
+
# Easy installation and use of web drivers to run system tests with browsers
|
252
|
+
gem 'webdrivers'
|
253
|
+
end
|
254
|
+
|
255
|
+
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
|
256
|
+
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
|
257
|
+
gem 'pry-rails'
|
258
|
+
gem 'devise'
|
259
|
+
gem "refile", require: "refile/rails", github: 'manfe/refile'
|
260
|
+
gem "refile-mini_magick"
|
261
|
+
gem "bulma-rails"
|
262
|
+
|
263
|
+
```
|
264
|
+
|
265
|
+
|
203
266
|
ここにより詳細な情報を記載してください。
|