質問編集履歴

7

追記

2020/02/20 16:32

投稿

tomtom1
tomtom1

スコア168

test CHANGED
File without changes
test CHANGED
@@ -390,7 +390,51 @@
390
390
 
391
391
  gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
392
392
 
393
-
393
+ ```
394
+
395
+ ###追記4
396
+
397
+ エラーfront.js:8をクリックし、表示される文
398
+
399
+ ```ここに言語を入力
400
+
401
+ /*
402
+
403
+ * This file is part of TokyoLoader <https://tokyoloader.com/>
404
+
405
+ * Due to restrictions of Google's terms, downloading videos from YouTube is disabled in this extension.
406
+
407
+ */
408
+
409
+
410
+
411
+ 'use strict';
412
+
413
+ document.addEventListener("DOMContentLoaded", function(event) {
414
+
415
+ const WebExtensions = navigator.userAgent.includes("Chrome") ? chrome : browser; #こちらに赤字エラー
416
+
417
+ const CMD_GET_SCRIPTS = "cmd_get_scripts";
418
+
419
+ .
420
+
421
+ . #省略
422
+
423
+ .
424
+
425
+
426
+
427
+ ```
428
+
429
+ fontawesomeの定義
430
+
431
+ application.html.erb
432
+
433
+ ```ここに言語を入力
434
+
435
+ <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.5.0/css/all.css" integrity="sha384-B4dIYHKNBt8Bc12p+WXckhzcICo0wtJAoU8YZTY5qE0Id1GSseTk6S+L3BlXeVIU" crossorigin="anonymous">
436
+
437
+ #その下にjscollのscriptを記述
394
438
 
395
439
  ```
396
440
 

6

追記

2020/02/20 16:32

投稿

tomtom1
tomtom1

スコア168

test CHANGED
File without changes
test CHANGED
@@ -210,6 +210,190 @@
210
210
 
211
211
  ![イメージ説明](3a8170c7037c68c1c51f7577a7ba6420.png)
212
212
 
213
+ ###追記3
214
+
215
+ ```gem
216
+
217
+ source 'https://rubygems.org'
218
+
219
+ git_source(:github) { |repo| "https://github.com/#{repo}.git" }
220
+
221
+
222
+
223
+ ruby '2.5.0'
224
+
225
+
226
+
227
+ # Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
228
+
229
+ gem 'rails', '~> 5.2.1'
230
+
231
+ # Use Puma as the app server
232
+
233
+ gem 'puma', '~> 3.11'
234
+
235
+ # Use SCSS for stylesheets
236
+
237
+ gem 'sass-rails', '~> 5.0'
238
+
239
+ # Use Uglifier as compressor for JavaScript assets
240
+
241
+ gem 'uglifier', '>= 1.3.0'
242
+
243
+ # See https://github.com/rails/execjs#readme for more supported runtimes
244
+
245
+ # gem 'mini_racer', platforms: :ruby
246
+
247
+ gem 'therubyracer', platforms: :ruby
248
+
249
+ # デフォルトの言語を日本語に設定する
250
+
251
+ gem 'rails-i18n', '~> 5.1'
252
+
253
+ # Use CoffeeScript for .coffee assets and views
254
+
255
+ gem 'coffee-rails', '~> 4.2'
256
+
257
+ # Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
258
+
259
+ gem 'turbolinks', '~> 5'
260
+
261
+ # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
262
+
263
+ gem 'jbuilder', '~> 2.5'
264
+
265
+ # Use Redis adapter to run Action Cable in production
266
+
267
+ # gem 'redis', '~> 4.0'
268
+
269
+ # Use ActiveModel has_secure_password
270
+
271
+ gem 'bcrypt', '~> 3.1.7'
272
+
273
+ # Use ActiveStorage variant
274
+
275
+ # gem 'mini_magick', '~> 4.8'
276
+
277
+ # consoleのエラー対応
278
+
279
+ gem 'rb-readline'
280
+
281
+ # Use Capistrano for deployment
282
+
283
+ # gem 'capistrano-rails', group: :development
284
+
285
+ gem 'carrierwave'
286
+
287
+ # 写真保存用
288
+
289
+ gem 'fog-aws'
290
+
291
+ # 「fog-aws」はS3へのアップロードを簡易的におこなうために必要
292
+
293
+ gem 'rmagick'
294
+
295
+ # ImageMagickを操作してサムネイル画像などを作成するために必要
296
+
297
+ gem 'jquery-rails'
298
+
299
+ gem 'jquery-ui-rails'
300
+
301
+ # spin.jsを利用するため
302
+
303
+ gem 'spinjs-rails'
304
+
305
+ # ページレーションのgem
306
+
307
+ gem 'kaminari'
308
+
309
+
310
+
311
+ # Reduces boot times through caching; required in config/boot.rb
312
+
313
+ gem 'bootsnap', '>= 1.1.0', require: false
314
+
315
+
316
+
317
+ group :development, :test do
318
+
319
+ # Call 'byebug' anywhere in the code to stop execution and get a debugger console
320
+
321
+ gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
322
+
323
+ end
324
+
325
+
326
+
327
+ group :development do
328
+
329
+ # Access an interactive console on exception pages or by calling 'console' anywhere in the code.
330
+
331
+ gem 'web-console', '>= 3.3.0'
332
+
333
+ gem 'listen', '>= 3.0.5', '< 3.2'
334
+
335
+ # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
336
+
337
+ gem 'spring'
338
+
339
+ gem 'spring-watcher-listen', '~> 2.0.0'
340
+
341
+ # Use sqlite3 as the database for Active Record
342
+
343
+ # gem 'sqlite3'
344
+
345
+ # generateする際にエラーでこちらのバージョンを使うよう指示があった
346
+
347
+ gem 'sqlite3', '~> 1.3.6'
348
+
349
+
350
+
351
+ end
352
+
353
+
354
+
355
+ group :test do
356
+
357
+ # Adds support for Capybara system testing and selenium driver
358
+
359
+ gem 'capybara', '>= 2.15'
360
+
361
+ gem 'selenium-webdriver'
362
+
363
+ # Easy installation and use of chromedriver to run system tests with Chrome
364
+
365
+ gem 'chromedriver-helper'
366
+
367
+ # Use sqlite3 as the database for Active Record
368
+
369
+ # gem 'sqlite3'
370
+
371
+ # generateする際にエラーでこちらのバージョンを使うよう指示があった
372
+
373
+ gem 'sqlite3', '~> 1.3.6'
374
+
375
+ end
376
+
377
+
378
+
379
+ group :production do
380
+
381
+ gem 'pg'
382
+
383
+ gem 'rails_12factor'
384
+
385
+ end
386
+
387
+
388
+
389
+ # Windows does not include zoneinfo files, so bundle the tzinfo-data gem
390
+
391
+ gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
392
+
393
+
394
+
395
+ ```
396
+
213
397
  ###やってみたこと
214
398
 
215
399
  ・//= require jquery.jscroll.min.jsの配置順を変えてみた

5

追記

2020/02/20 12:50

投稿

tomtom1
tomtom1

スコア168

test CHANGED
File without changes
test CHANGED
@@ -198,6 +198,18 @@
198
198
 
199
199
  ```
200
200
 
201
+ ###追記2
202
+
203
+ 下記の実行の上、表示されているエラー
204
+
205
+ ・//= require jquery.jscroll.min.jsを削除
206
+
207
+ ・bundle install
208
+
209
+ ・サーバー再起動
210
+
211
+ ![イメージ説明](3a8170c7037c68c1c51f7577a7ba6420.png)
212
+
201
213
  ###やってみたこと
202
214
 
203
215
  ・//= require jquery.jscroll.min.jsの配置順を変えてみた

4

追記

2020/02/20 12:04

投稿

tomtom1
tomtom1

スコア168

test CHANGED
File without changes
test CHANGED
@@ -134,6 +134,70 @@
134
134
 
135
135
  ```
136
136
 
137
+ application.html.erb
138
+
139
+ ```
140
+
141
+ <!DOCTYPE html>
142
+
143
+ <html>
144
+
145
+ <head>
146
+
147
+ <title>MyApplication</title>
148
+
149
+ <%= csrf_meta_tags %>
150
+
151
+ <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
152
+
153
+ <%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>
154
+
155
+ <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.5.0/css/all.css" integrity="sha384-B4dIYHKNBt8Bc12p+WXckhzcICo0wtJAoU8YZTY5qE0Id1GSseTk6S+L3BlXeVIU" crossorigin="anonymous">
156
+
157
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/jscroll/2.4.1/jquery.jscroll.min.js"></script>
158
+
159
+ </head>
160
+
161
+ <body>
162
+
163
+ <header>
164
+
165
+ <ul class="header-menus">
166
+
167
+ <li>
168
+
169
+ <%= link_to "/posts/index", :method => :get do %>
170
+
171
+ <i class="fa fa-list header-icon-size"></i>Menu<% end %>
172
+
173
+ </li>
174
+
175
+ </ul>
176
+
177
+ </header>
178
+
179
+ <% if flash[:notice] %>
180
+
181
+ <div class="flash">
182
+
183
+ <%= flash[:notice] %>
184
+
185
+ </div>
186
+
187
+ <% end %>
188
+
189
+ <%= yield %>
190
+
191
+ <footer>
192
+
193
+ </footer>
194
+
195
+ </body>
196
+
197
+ </html>
198
+
199
+ ```
200
+
137
201
  ###やってみたこと
138
202
 
139
203
  ・//= require jquery.jscroll.min.jsの配置順を変えてみた

3

エラーを追記

2020/02/20 11:43

投稿

tomtom1
tomtom1

スコア168

test CHANGED
File without changes
test CHANGED
@@ -112,7 +112,11 @@
112
112
 
113
113
  ```
114
114
 
115
+ ###追記
116
+
115
117
  コンソールにて、
118
+
119
+ ![イメージ説明](f889bbd13bd616f9943aa170d2e2930c.png)
116
120
 
117
121
  ```Error
118
122
 
@@ -122,6 +126,14 @@
122
126
 
123
127
  ```
124
128
 
129
+ ```Error
130
+
131
+ Uncaught ReferenceError: browser is not defined
132
+
133
+ at HTMLDocument.<anonymous> (front.js:8)
134
+
135
+ ```
136
+
125
137
  ###やってみたこと
126
138
 
127
139
  ・//= require jquery.jscroll.min.jsの配置順を変えてみた

2

追加

2020/02/20 11:01

投稿

tomtom1
tomtom1

スコア168

test CHANGED
File without changes
test CHANGED
@@ -50,8 +50,6 @@
50
50
 
51
51
  ```js
52
52
 
53
- //= require jquery.jscroll.min.js
54
-
55
53
  //= require activestorage
56
54
 
57
55
  //= require turbolinks
@@ -61,6 +59,8 @@
61
59
  //= require jquery
62
60
 
63
61
  //= require jquery_ujs
62
+
63
+ //= require jquery.jscroll.min.js #こちらに追加
64
64
 
65
65
  //= require spin
66
66
 
@@ -112,6 +112,16 @@
112
112
 
113
113
  ```
114
114
 
115
+ コンソールにて、
116
+
117
+ ```Error
118
+
119
+ jquery.jscroll.min.self-320f80a26ab25dd3acd45f04faa1a57634af0c7ecf542282bc101519965447e0.js?body=1:13 Uncaught ReferenceError: jQuery is not defined
120
+
121
+ at jquery.jscroll.min.self-320f80a26ab25dd3acd45f04faa1a57634af0c7ecf542282bc101519965447e0.js?body=1:13
122
+
123
+ ```
124
+
115
125
  ###やってみたこと
116
126
 
117
127
  ・//= require jquery.jscroll.min.jsの配置順を変えてみた

1

内容に誤り

2020/02/20 10:58

投稿

tomtom1
tomtom1

スコア168

test CHANGED
File without changes
test CHANGED
@@ -22,6 +22,10 @@
22
22
 
23
23
  **下記コードで反応が全く得られないので、解決したいです。**
24
24
 
25
+ Rails -v 5.2.1
26
+
27
+ ruby -v 2.5.0p0
28
+
25
29
  ###コード
26
30
 
27
31
  application.html.erb
@@ -29,8 +33,6 @@
29
33
  ```view
30
34
 
31
35
  <script src="https://cdnjs.cloudflare.com/ajax/libs/jscroll/2.4.1/jquery.jscroll.min.js"></script>
32
-
33
- //= require jquery.jscroll.min.js
34
36
 
35
37
  ```
36
38
 
@@ -47,6 +49,22 @@
47
49
  application.js
48
50
 
49
51
  ```js
52
+
53
+ //= require jquery.jscroll.min.js
54
+
55
+ //= require activestorage
56
+
57
+ //= require turbolinks
58
+
59
+ //= require_tree .
60
+
61
+ //= require jquery
62
+
63
+ //= require jquery_ujs
64
+
65
+ //= require spin
66
+
67
+ //= require jquery.spin
50
68
 
51
69
  $(document).on('turbolinks:load', function() {
52
70