質問編集履歴

5

boxes-controllerのコードをapplication\.cssにしました。

2016/11/02 09:20

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -16,153 +16,501 @@
16
16
 
17
17
  ```ruby
18
18
 
19
- class BoxesController < ApplicationController
20
-
21
- before_action :set_box, only: [:show, :edit, :update, :destroy]
22
-
23
-
24
-
25
- # GET /boxes
26
-
27
- # GET /boxes.json
28
-
29
- def index
30
-
31
- @boxes = Box.order(created_at: :desc)
32
-
33
- end
34
-
35
-
36
-
37
- # GET /boxes/1
38
-
39
- # GET /boxes/1.json
40
-
41
- def show
42
-
43
- end
44
-
45
-
46
-
47
- # GET /boxes/new
48
-
49
- def new
50
-
51
- @box = Box.new
52
-
53
- end
54
-
55
-
56
-
57
- # GET /boxes/1/edit
58
-
59
- def edit
60
-
61
- end
62
-
63
-
64
-
65
- # POST /boxes
66
-
67
- # POST /boxes.json
68
-
69
- def create
70
-
71
- @box = Box.new(box_params)
72
-
73
-
74
-
75
- respond_to do |format|
76
-
77
- if @box.save
78
-
79
- format.html { redirect_to controller: 'boxes', action: 'index', notice: 'Box was successfully created.' }
80
-
81
- format.json { render :show, status: :created, location: @box }
82
-
83
- else
84
-
85
- format.html { render :new }
86
-
87
- format.json { render json: @box.errors, status: :unprocessable_entity }
88
-
89
- end
90
-
91
- end
92
-
93
- end
94
-
95
-
96
-
97
- # PATCH/PUT /boxes/1
98
-
99
- # PATCH/PUT /boxes/1.json
100
-
101
- def update
102
-
103
- respond_to do |format|
104
-
105
- if @box.update(box_params)
106
-
107
- format.html { redirect_to @controller: 'boxes', action: 'index', notice: 'Box was successfully updated.' }
108
-
109
- format.json { render :show, status: :ok, location: @box }
110
-
111
- else
112
-
113
- format.html { render :edit }
114
-
115
- format.json { render json: @box.errors, status: :unprocessable_entity }
116
-
117
- end
118
-
119
- end
120
-
121
- end
122
-
123
-
124
-
125
- # DELETE /boxes/1
126
-
127
- # DELETE /boxes/1.json
128
-
129
- def destroy
130
-
131
- @box.destroy
132
-
133
- respond_to do |format|
134
-
135
- format.html { redirect_to boxes_url, notice: 'Box was successfully destroyed.' }
136
-
137
- format.json { head :no_content }
138
-
139
- end
140
-
141
- end
142
-
143
-
144
-
145
- private
146
-
147
- # Use callbacks to share common setup or constraints between actions.
148
-
149
- def set_box
150
-
151
- @box = Box.find(params[:id])
152
-
153
- end
154
-
155
-
156
-
157
- # Never trust parameters from the scary internet, only allow the white list through.
158
-
159
- def box_params
160
-
161
- params.require(:box).permit(:opinion)
162
-
163
- end
164
-
165
- end
19
+ /*
20
+
21
+ * This is a manifest file that'll be compiled into application.css, which will include all the files
22
+
23
+ * listed below.
24
+
25
+ *
26
+
27
+ * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
28
+
29
+ * or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
30
+
31
+ *
32
+
33
+ * You're free to add application-wide styles to this file and they'll appear at the bottom of the
34
+
35
+ * compiled file so the styles you add here take precedence over styles defined in any styles
36
+
37
+ * defined in the other CSS/SCSS files in this directory. It is generally better to create a new
38
+
39
+ * file per style scope.
40
+
41
+ *
42
+
43
+ *= require_tree .
44
+
45
+ *= require_self
46
+
47
+ */
48
+
49
+ @import "bootstrap-sprockets";
50
+
51
+ @import "bootstrap";
52
+
53
+
54
+
55
+ body { background: #9cb8b3; }
56
+
57
+
58
+
59
+ h1 {
60
+
61
+ font: 600 1.5em/1 'Raleway', sans-serif;
62
+
63
+ /*font-size: 1rem;*/
64
+
65
+ color: rgba(0,0,0,.5);
66
+
67
+ text-align: center;
68
+
69
+ text-transform: uppercase;
70
+
71
+ letter-spacing: .5em;
72
+
73
+ margin-top: 2rem;
74
+
75
+ width: 100%;
76
+
77
+ }
78
+
79
+
80
+
81
+ span, span:after {
82
+
83
+ font-weight: 900;
84
+
85
+ color: #efedce;
86
+
87
+ white-space: nowrap;
88
+
89
+ display: inline-block;
90
+
91
+ position: relative;
92
+
93
+ letter-spacing: .1em;
94
+
95
+ padding: .5em 0 .5em 0;
96
+
97
+ }
98
+
99
+
100
+
101
+ span {
102
+
103
+ font-size: 4em;
104
+
105
+ z-index: 100;
106
+
107
+ text-shadow: .04em .04em 0 #9cb8b3;
108
+
109
+ }
110
+
111
+
112
+
113
+ span:after {
114
+
115
+ content: attr(data-shadow-text);
116
+
117
+ color: rgba(0,0,0,.35);
118
+
119
+ text-shadow: none;
120
+
121
+ position: absolute;
122
+
123
+ left: .065em;
124
+
125
+ top: .0875em;
126
+
127
+ z-index: -1;
128
+
129
+ -webkit-mask-image: url(http://f.cl.ly/items/1t1C0W3y040g1J172r3h/mask.png);
130
+
131
+ }
132
+
133
+ @media screen and (max-width: 767px) {
134
+
135
+ span{
136
+
137
+ font-size: 4rem;
138
+
139
+ }
140
+
141
+ }
142
+
143
+ .small{
144
+
145
+ font-size: 0.8rem;
146
+
147
+ }
148
+
149
+ a:hover {
150
+
151
+ background-color: transparent;
152
+
153
+ text-decoration: none;
154
+
155
+ /*color: transparent;*/
156
+
157
+ }
158
+
159
+ .circlePositioner {
160
+
161
+ margin-left: auto;
162
+
163
+ margin-right: auto;
164
+
165
+ /*width: 400px;*/
166
+
167
+ text-align: center;
168
+
169
+ margin-top: 7%;
170
+
171
+ /*background-color: #fff;*/
172
+
173
+ }
174
+
175
+
176
+
177
+ .mainCircle {
178
+
179
+ background-color: #0881AA;
180
+
181
+ width: 200px;
182
+
183
+ height: 200px;
184
+
185
+ border-radius: 50%;
186
+
187
+ display: inline-block;
188
+
189
+ overflow: hidden;
190
+
191
+ cursor: pointer;
192
+
193
+ opacity: .99;
194
+
195
+ transition: all 2s ease-in-out;
196
+
197
+ animation-iteration-count: infinite;
198
+
199
+ }
200
+
201
+
202
+
203
+ .spinningContainer {
204
+
205
+ background-color: #efefef;
206
+
207
+ height: 50px;
208
+
209
+ width: 100%;
210
+
211
+ margin-top: 75px;
212
+
213
+ position: relative;
214
+
215
+ animation: mymoveR 2s ease-in-out;
216
+
217
+ transform: scaleY(2);
218
+
219
+ transition: all 4s cubic-bezier(.18, 1.51, .85, 1.4);
220
+
221
+ animation-iteration-count: infinite;
222
+
223
+ }
224
+
225
+
226
+
227
+ .mainCircle:hover .overlay {
228
+
229
+ background-color: #7C9FAB;
230
+
231
+ transition: all .6s ease-in-out;
232
+
233
+ animation-iteration-count: infinite;
234
+
235
+ }
236
+
237
+
238
+
239
+ .mainCircle:hover .overlay p, .mainCircle:hover .small{
240
+
241
+ color: white;
242
+
243
+ transition: all .6s ease-in-out;
244
+
245
+ animation-iteration-count: infinite;
246
+
247
+ }
248
+
249
+
250
+
251
+ .mainCircle:hover .spinningContainer {
252
+
253
+ -webkit-filter: blur(5px);
254
+
255
+ animation: mymove 2s cubic-bezier(1, .22, 1, .92), myscale 4s 2s ease-in-out;
256
+
257
+ animation-iteration-count: infinite;
258
+
259
+ }
260
+
261
+
262
+
263
+ @keyframes mymove {
264
+
265
+ from {
266
+
267
+ transform: rotate(0deg);
268
+
269
+ }
270
+
271
+ to {
272
+
273
+ transform: rotate(1080deg);
274
+
275
+ }
276
+
277
+ }
278
+
279
+
280
+
281
+ @keyframes mymoveR {
282
+
283
+ from {
284
+
285
+ transform: rotate(1080deg);
286
+
287
+ }
288
+
289
+ to {
290
+
291
+ transform: rotate(0deg);
292
+
293
+ }
294
+
295
+ }
296
+
297
+
298
+
299
+ @keyframes myscale {
300
+
301
+ 0% {
302
+
303
+ transform: scaleY(2);
304
+
305
+ }
306
+
307
+ 25% {
308
+
309
+ transform: scaleY(2.5);
310
+
311
+ }
312
+
313
+ 50% {
314
+
315
+ transform: scaleY(3);
316
+
317
+ }
318
+
319
+ 75% {
320
+
321
+ transform: scaleY(3.5);
322
+
323
+ }
324
+
325
+ 100% {
326
+
327
+ transform: scaleY(4);
328
+
329
+ }
330
+
331
+ }
332
+
333
+
334
+
335
+ .mainCircle:hover {
336
+
337
+ background-color: white;
338
+
339
+ transition: all 1s ease-in-out;
340
+
341
+ transition-delay: .8s;
342
+
343
+ }
344
+
345
+
346
+
347
+ .leftContainer {
348
+
349
+ background-color: rgba(255, 255, 255, 0.79);
350
+
351
+ height: 50px;
352
+
353
+ width: 50px;
354
+
355
+ float: left;
356
+
357
+ }
358
+
359
+
360
+
361
+ .rightContainer {
362
+
363
+ background-color: rgba(255, 255, 255, 0.79);
364
+
365
+ height: 50px;
366
+
367
+ width: 50px;
368
+
369
+ float: right;
370
+
371
+ }
372
+
373
+
374
+
375
+ .overlay {
376
+
377
+ background-color: #46626B;
378
+
379
+ height: 190px;
380
+
381
+ width: 190px;
382
+
383
+ position: relative;
384
+
385
+ margin-left: auto;
386
+
387
+ margin-right: auto;
388
+
389
+ margin-top: -120px;
390
+
391
+ border-radius: 50%;
392
+
393
+ transition: all .3s ease-in-out;
394
+
395
+ }
396
+
397
+
398
+
399
+ .overlay p {
400
+
401
+ position: relative;
402
+
403
+ text-align: center;
404
+
405
+ margin-left: auto;
406
+
407
+ margin-right: auto;
408
+
409
+ margin-top: 39%;
410
+
411
+ display: inline-block;
412
+
413
+ font-family: 'Sigmar One', cursive;
414
+
415
+ font-size: 16pt;
416
+
417
+ transition: all .3s ease-in-out;
418
+
419
+ }
420
+
421
+
422
+
423
+
424
+
425
+ .container{
426
+
427
+ width: 80%;
428
+
429
+ display: block;
430
+
431
+ margin-left: auto;
432
+
433
+ margin-right: auto;
434
+
435
+ }
436
+
437
+ .panel-heading{
438
+
439
+ text-align: center;
440
+
441
+ }
442
+
443
+ table{
444
+
445
+ text-align: center;
446
+
447
+ color: #0881AA;
448
+
449
+ }
450
+
451
+ td{
452
+
453
+ text-align: left;
454
+
455
+ color: #000;
456
+
457
+ }
458
+
459
+
460
+
461
+ textarea {
462
+
463
+ width: 100%;
464
+
465
+ margin-top: 4rem;
466
+
467
+ border:solid 1px #ccc;
468
+
469
+ border-radius: 10px;
470
+
471
+ -moz-box-shadow: inset 1px 4px 9px -6px rgba(0,0,0,0.5);
472
+
473
+ -webkit-box-shadow: inset 1px 4px 9px -6px rgba(0, 0, 0, 0.5);
474
+
475
+ box-shadow: inset 1px 4px 9px -6px rgba(0,0,0,0.5);
476
+
477
+ }
478
+
479
+
480
+
481
+ .btn{
482
+
483
+ width: 20%;
484
+
485
+ color: #fff;
486
+
487
+ /*background-color: rgba(255, 255, 255, 0.79);*/
488
+
489
+ text-align: center;
490
+
491
+ display: block;
492
+
493
+ margin-left: auto;
494
+
495
+ margin-right: auto;
496
+
497
+ }
498
+
499
+ @media screen and (max-width: 767px) {
500
+
501
+ .container{
502
+
503
+ width: 100%;
504
+
505
+ }
506
+
507
+ .btn{
508
+
509
+ width: 50%;
510
+
511
+ }
512
+
513
+ }
166
514
 
167
515
 
168
516
 

4

Error文を追加しました

2016/11/02 09:20

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -190,10 +190,28 @@
190
190
 
191
191
  ~省略~
192
192
 
193
+ remote: Bundle completed (23.94s)
194
+
195
+ remote: Cleaning up the bundler cache.
196
+
197
+ remote: -----> Preparing app for Rails asset pipeline
198
+
199
+ remote: Running: rake assets:precompile
200
+
201
+ remote: I, [2016-11-02T06:11:22.102661 #939] INFO -- : Writing /tmp/build_a2935a0b6c52cbfe5a31b000fd607b51/public/assets/application-a28559506691956cf975ecc0992d16f83c609962bca6c25154dab4926edd97a9.js
202
+
203
+ remote: I, [2016-11-02T06:11:22.103275 #939] INFO -- : Writing /tmp/build_a2935a0b6c52cbfe5a31b000fd607b51/public/assets/application-a28559506691956cf975ecc0992d16f83c609962bca6c25154dab4926edd97a9.js.gz
204
+
193
205
  remote: rake aborted!
194
206
 
195
207
  remote: NoMethodError: undefined method `[]' for nil:NilClass
196
208
 
209
+ remote: /tmp/build_a2935a0b6c52cbfe5a31b000fd607b51/vendor/bundle/ruby/2.2.0/gems/sprockets-3.7.0/lib/sprockets/sass_processor.rb:278:in `sprockets_context'
210
+
211
+ remote: /tmp/build_a2935a0b6c52cbfe5a31b000fd607b51/vendor/bundle/ruby/2.2.0/gems/sprockets-3.7.0/lib/sprockets/sass_processor.rb:124:in `asset_path'
212
+
213
+ remote: /tmp/build_a2935a0b6c52cbfe5a31b000fd607b51/vendor/bundle/ruby/2.2.0/gems/sprockets-3.7.0/lib/sprockets/sass_processor.rb:200:in `font_path'
214
+
197
215
  ~省略~
198
216
 
199
217
  remote: Tasks: TOP => assets:precompile

3

RAILS_ENV=production bundle exec rake assets:precompileの実行結果

2016/11/02 06:15

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -230,4 +230,44 @@
230
230
 
231
231
  RAILS_ENV=production bundle exec rake assets:precompileの結果です。
232
232
 
233
+ ```ここに言語を入力
234
+
235
+ katsuwlan173150:hoikubox hajime$ RAILS_ENV=production bundle exec rake assets:precompile
236
+
237
+ I, [2016-11-02T14:50:29.325031 #12495] INFO -- : Writing /Users/hajime/hoikubox/public/assets/application-e5726d610429bff169907e5452fe956b758a808220d80062cc2c2cfd692f8da1.js
238
+
239
+ I, [2016-11-02T14:50:29.336553 #12495] INFO -- : Writing /Users/hajime/hoikubox/public/assets/application-e5726d610429bff169907e5452fe956b758a808220d80062cc2c2cfd692f8da1.js.gz
240
+
241
+ rake aborted!
242
+
243
+ NoMethodError: undefined method `[]' for nil:NilClass
244
+
245
+ /Library/Ruby/Gems/2.0.0/gems/sprockets-3.7.0/lib/sprockets/sass_processor.rb:278:in `sprockets_context'
246
+
247
+ /Library/Ruby/Gems/2.0.0/gems/sprockets-3.7.0/lib/sprockets/sass_processor.rb:124:in `asset_path'
248
+
249
+ /Library/Ruby/Gems/2.0.0/gems/sprockets-3.7.0/lib/sprockets/sass_processor.rb:200:in `font_path'
250
+
251
+ ~省略~
252
+
253
+ /Library/Ruby/Gems/2.0.0/gems/bundler-1.12.5/lib/bundler/cli.rb:11:in `start'
254
+
255
+ /Library/Ruby/Gems/2.0.0/gems/bundler-1.12.5/exe/bundle:27:in `block in <top (required)>'
256
+
257
+ /Library/Ruby/Gems/2.0.0/gems/bundler-1.12.5/lib/bundler/friendly_errors.rb:98:in `with_friendly_errors'
258
+
259
+ /Library/Ruby/Gems/2.0.0/gems/bundler-1.12.5/exe/bundle:19:in `<top (required)>'
260
+
261
+ /usr/local/bin/bundle:23:in `load'
262
+
263
+ /usr/local/bin/bundle:23:in `<main>'
264
+
265
+ Tasks: TOP => assets:precompile
266
+
267
+ (See full trace by running task with --trace)
268
+
269
+ ```
270
+
271
+
272
+
233
273
  ![RAILS_ENV=production bundle exec rake assets:precompileの結果](ca277b4700ed5a02de880c04e29a3847.png)

2

RAILS_ENV=production bundle exec rake assets:precompileの結果を載せた

2016/11/02 06:08

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -227,3 +227,7 @@
227
227
  error: failed to push some refs to 'https://git.heroku.com/toywonder-hoikubox.git'
228
228
 
229
229
  ```
230
+
231
+ RAILS_ENV=production bundle exec rake assets:precompileの結果です。
232
+
233
+ ![RAILS_ENV=production bundle exec rake assets:precompileの結果](ca277b4700ed5a02de880c04e29a3847.png)

1

ターミナルの画面をのせました。

2016/11/02 05:55

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -167,3 +167,63 @@
167
167
 
168
168
 
169
169
  ```
170
+
171
+
172
+
173
+ ちなみにターミナル上の画面はこのようになっています。
174
+
175
+ ```
176
+
177
+ katsuwlan173150:hoikubox hajime$ git push heroku master
178
+
179
+ Counting objects: 134, done.
180
+
181
+ Delta compression using up to 4 threads.
182
+
183
+ Compressing objects: 100% (122/122), done.
184
+
185
+ Writing objects: 100% (134/134), 26.73 KiB | 0 bytes/s, done.
186
+
187
+ Total 134 (delta 27), reused 0 (delta 0)
188
+
189
+ remote: I, [2016-11-02T05:35:06.864085 #940] INFO -- : Writing /tmp/build_2eb7710262bd71ca3da40830d57d958d/public/assets/application-e5726d610429bff169907e5452fe956b758a808220d80062cc2c2cfd692f8da1.js.gz
190
+
191
+ ~省略~
192
+
193
+ remote: rake aborted!
194
+
195
+ remote: NoMethodError: undefined method `[]' for nil:NilClass
196
+
197
+ ~省略~
198
+
199
+ remote: Tasks: TOP => assets:precompile
200
+
201
+ remote: (See full trace by running task with --trace)
202
+
203
+ remote: !
204
+
205
+ remote: ! Precompiling assets failed.
206
+
207
+ remote: !
208
+
209
+ remote: ! Push rejected, failed to compile Ruby app.
210
+
211
+ remote:
212
+
213
+ remote: ! Push failed
214
+
215
+ remote: Verifying deploy...
216
+
217
+ remote:
218
+
219
+ remote: ! Push rejected to toywonder-hoikubox.
220
+
221
+ remote:
222
+
223
+ To https://git.heroku.com/toywonder-hoikubox.git
224
+
225
+ ! [remote rejected] master -> master (pre-receive hook declined)
226
+
227
+ error: failed to push some refs to 'https://git.heroku.com/toywonder-hoikubox.git'
228
+
229
+ ```