Cplex giving infeasible in objective column of log output - machine-learning

I'm getting an infeasible row in objective column of logs, and beacuse of that model keeps running for longs hours.
for given number of constriants model keeps runing for hours and it runs out of memory(even 128GB) , this seems very problematic to assign such heavy resources. I'm attaching logoutput. please help me to how to figure this issue
Model: docplex_model2
- number of variables: 457809
- binary=0, integer=456048, continuous=0, semi-continuous=1761
- number of constraints: 37076
- linear=37076
- parameters:
parameters.emphasis.mip = 1
parameters.mip.tolerances.mipgap = 0.35000000000000
- objective: maximize
- problem type is: MILP
here is log output----
CPXPARAM_Emphasis_MIP 1
CPXPARAM_MIP_Tolerances_MIPGap 0.34999999999999998
Tried aggregator 3 times.
MIP Presolve eliminated 4748 rows and 61614 columns.
MIP Presolve modified 16 coefficients.
Aggregator did 19860 substitutions.
Reduced MIP has 15990 rows, 377635 columns, and 769615 nonzeros.
Reduced MIP has 3955 binaries, 372041 generals, 0 SOSs, and 0 indicators.
Presolve time = 2.21 sec. (2205.73 ticks)
Tried aggregator 1 time.
Detecting symmetries...
Reduced MIP has 15990 rows, 377635 columns, and 769615 nonzeros.
Reduced MIP has 3955 binaries, 372041 generals, 0 SOSs, and 0 indicators.
Presolve time = 1.86 sec. (1558.18 ticks)
Probing fixed 1 vars, tightened 291 bounds.
Probing time = 0.16 sec. (46.27 ticks)
Clique table members: 3626.
MIP emphasis: integer feasibility.
MIP search method: dynamic search.
Parallel mode: deterministic, using up to 4 threads.
Root relaxation solution time = 1.17 sec. (760.41 ticks)
Nodes Cuts/
Node Left Objective IInf Best Integer Best Bound ItCnt Gap
0 0 5447054.2576 568 5447054.2576 7411
0 0 5446256.0396 2550 Cuts: 3105 11523
0 0 5445582.9819 3313 Cuts: 2609 15362
0 0 5443111.8900 3879 Cuts: 1793 19392
0 1 5443111.8900 3879 5443111.8900 19392
Elapsed time = 28.84 sec. (18204.70 ticks, tree = 0.02 MB, solutions = 0)
7 8 5424995.5661 3422 5427140.2491 19602
12 13 5424025.4253 2980 5427140.2491 19901
19 20 5424008.3599 2834 5427140.2491 20019
24 23 5423705.3128 3481 5427119.7653 22030
26 24 5424539.9397 4284 5427057.2493 22919
28 26 5423701.9049 3508 5427057.2493 24217
31 31 5423519.5986 3292 5427024.1000 32459
34 31 5424673.8781 3987 5426984.4114 34984
36 34 5424539.1738 4209 5426984.4114 37899
48 44 5424035.7444 3884 5426984.4114 40985
Elapsed time = 32.69 sec. (22078.80 ticks, tree = 5.41 MB, solutions = 0)
127 74 5422280.0110 3032 5426984.4114 42820
219 164 5422903.9976 3221 5426984.4114 44186
305 255 5422151.6347 2984 5426984.4114 46975
388 316 5409466.1277 2461 5426984.4114 47488
457 391 5419580.4261 2238 5426984.4114 50940
506 448 5419173.6547 2131 5426984.4114 57287
553 481 5401742.1028 1718 5426984.4114 63918
591 529 5389251.7601 1272 5426984.4114 72056
632 574 **infeasible** 5426984.4114 79106
675 596 5398682.6980 1566 5426984.4114 81099
Elapsed time = 43.66 sec. (31720.81 ticks, tree = 181.23 MB, solutions = 0)
705 609 5404307.7518 1513 5426984.4114 85133
754 657 5422924.3660 3173 5426984.4114 97279
825 726 5420872.5251 2739 5426984.4114 101585
898 763 5384923.7790 1488 5426984.4114 103060
966 843 5376292.5417 937 5426984.4114 107764
1031 898 5394081.5952 1003 5426984.4114 109361
1101 976 5372102.4281 1103 5426984.4114 112509
1173 1036 5393219.2485 869 5426984.4114 116229
1252 1106 5398144.9886 1754 5426984.4114 117850
1330 1148 5371456.5486 868 5426984.4114 121077
Elapsed time = 54.19 sec. (41408.05 ticks, tree = 534.37 MB, solutions = 0)
1400 1262 5396613.5760 1430 5426984.4114 126293
1482 1300 5392103.1569 819 5426984.4114 125806
1563 1428 5396352.6299 1234 5426984.4114 133285
1638 1459 5391806.7612 764 5426984.4114 134133
1701 1540 5371435.0973 678 5426984.4114 135347
1755 1603 5391965.9348 717 5426984.4114 141811
1806 1656 5421590.6214 3079 5426984.4114 145378
1873 1687 5386074.1901 649 5426984.4114 148265
1916 1780 5406119.1903 2245 5426984.4114 158126
1952 1802 5400035.4985 1963 5426984.4114 158659
Elapsed time = 65.70 sec. (51106.01 ticks, tree = 956.74 MB, solutions = 0)
1993 1837 5399984.5162 1714 5426984.4114 164792
2046 1868 5399199.1117 1709 5426984.4114 176903
2116 1900 5409091.4055 2920 5426984.4114 180187
2194 1956 5409096.1850 2748 5426984.4114 185734
2263 2045 5395631.1560 1229 5426984.4114 191503
2299 2083 5417884.0649 2180 5426984.4114 195258
2307 2106 5394566.8771 1769 5426984.4114 199129
2326 2131 5409642.8769 2386 5426984.4114 209111
2337 2129 5393094.1052 1774 5426984.4114 214143
2344 2160 5380420.7567 2071 5426984.4114 232449
Elapsed time = 76.93 sec. (61429.58 ticks, tree = 1067.83 MB, solutions = 0)
2395 2173 5412998.2623 3089 5426984.4114 244438
2445 2184 5311151.8238 1640 5426984.4114 255958
2499 2213 5401804.4871 2029 5426984.4114 258719
2531 2282 5393804.1209 1771 5426984.4114 267432
2579 2272 5415355.4047 3780 5426984.4114 267184
2615 2319 5310045.7515 1240 5426984.4114 269611
2663 2377 5408859.8378 2442 5426984.4114 279749
2726 2401 5379550.1445 1486 5426984.4114 282757
2791 2439 5309774.2007 1177 5426984.4114 290254
2834 2510 5413748.0466 3160 5426984.4114 295756
Elapsed time = 89.00 sec. (71126.64 ticks, tree = 1263.45 MB, solutions = 0)
2853 2525 5408741.2417 2684 5426984.4114 296581
2880 2525 5415209.9026 4120 5426984.4114 303367
2916 2566 5418536.5596 3645 5426984.4114 315754
2964 2626 5408703.1497 2705 5426984.4114 323603
3021 2691 5407778.6853 2649 5426984.4114 329944
3086 2716 5399275.4604 2268 5426984.4114 333471
3160 2799 5399364.7532 2316 5426984.4114 337939
3236 2832 5398929.9160 1705 5426984.4114 340882
3292 2928 5398898.9016 1704 5426984.4114 343929
3350 2948 5398898.9008 1683 5426984.4114 344110
Elapsed time = 99.95 sec. (80755.29 ticks, tree = 1414.32 MB, solutions = 0)
3410 2969 5397943.8252 1840 5426984.4114 351908
3462 3018 5395313.6357 986 5426984.4114 353878
3513 3110 5395311.0280 993 5426984.4114 357262
3577 3127 5395288.3990 904 5426984.4114 358271
3645 3168 5397199.3357 1114 5426984.4114 370737
3718 3215 5395066.1468 754 5426984.4114 373522
3788 3339 5395066.1391 700 5426984.4114 381975
3857 3388 5395944.8892 819 5426984.4114 383179
3920 3458 5395066.1391 629 5426984.4114 386279
3985 3437 5396858.2083 850 5426984.4114 385567
Elapsed time = 111.67 sec. (90345.62 ticks, tree = 1588.45 MB, solutions = 0)
4031 3491 5407565.7631 2780 5426984.4114 400026
4098 3640 5405298.0780 2396 5426984.4114 402831
4177 3695 5395052.5234 608 5426984.4114 406870
4250 3737 5395869.1675 682 5426984.4114 409458
4316 3812 5396858.2017 739 5426984.4114 413233
4393 3832 5396858.1944 733 5426984.4114 413317
4471 3900 5394988.6288 546 5426984.4114 413564
4555 4072 5395869.0990 608 5426984.4114 419039
4644 4021 5396858.1910 623 5426984.4114 419080
4733 4115 5395869.0973 590 5426984.4114 419752
Elapsed time = 122.15 sec. (99976.83 ticks, tree = 1856.46 MB, solutions = 0)
4819 4250 5394988.6220 491 5426984.4114 421914
4898 4366 **infeasible** 5426984.4114 425370
4975 4468 5379274.3718 563 5426984.4114 426559
5058 4402 5396199.1795 588 5426984.4114 426041
5138 4600 5394342.0730 473 5426984.4114 429670
5217 4712 5396952.6974 810 5426984.4114 431089
5301 4749 5395586.7800 581 5426984.4114 431476
5383 4908 5396951.9009 738 5426984.4114 432228
5471 4789 5395586.7800 569 5426984.4114 431655
5705 5202 5389705.4806 535 5426984.4114 438101
Elapsed time = 138.72 sec. (112480.76 ticks, tree = 2314.33 MB, solutions = 0)
Nodefile size = 249.91 MB (135.33 MB after compression)
5879 5330 5395614.4696 496 5426984.4114 450886
6168 5528 5389681.1285 545 5426984.4114 474496
6484 5744 5389680.1611 498 5426984.4114 482597
6810 6058 5395611.1982 431 5426984.4114 502814
7033 6364 5388473.8481 490 5426984.4114 511099
7248 6504 5387478.5235 518 5426984.4114 527293
7478 6674 5387476.9499 490 5426984.4114 545602
7761 6958 infeasible 5426984.4114 566811
8105 7342 5392996.6596 1078 5426984.4114 571908
8434 7579 5387466.8418 444 5426984.4114 574887
Elapsed time = 192.15 sec. (150730.09 ticks, tree = 3461.46 MB, solutions = 0)
Nodefile size = 1384.18 MB (691.75 MB after compression)
8709 7810 5397037.0153 838 5426984.4114 578870
9007 8112 5384414.0235 2186 5426984.4114 597517
9269 8293 5396621.2916 673 5426984.4114 596439
9509 8665 5394951.1841 365 5426984.4114 614950
9781 8916 5396630.9062 1311 5426984.4114 632021
10039 9090 5387434.8861 342 5426984.4114 638327
10277 9353 5386224.1164 328 5426984.4114 655878
10528 9467 5382940.5147 1184 5426984.4114 681490
10865 9891 5379821.1913 683 5426984.4114 696064
11275 10109 5386092.4028 307 5426984.4114 704392
Elapsed time = 245.52 sec. (189003.15 ticks, tree = 4796.42 MB, solutions = 0)
Nodefile size = 2692.95 MB (1435.87 MB after compression)
11597 10675 5377146.8013 627 5426984.4114 710049
11877 10706 5395739.9394 1911 5426984.4114 724018
12115 11083 5380946.8455 775 5426984.4114 735232
12416 11357 5390818.3099 896 5426984.4114 741661
12804 11901 5326007.6723 638 5426984.4114 776244
13121 12085 5378349.6560 620 5426984.4114 779793
13458 12363 5389599.2004 643 5426984.4114 788537
13824 12733 5325990.7395 548 5426984.4114 792704
14090 13096 5325963.0516 600 5426984.4114 805870
14354 13319 5397488.8033 1782 5426984.4114 818543
Elapsed time = 302.45 sec. (227261.05 ticks, tree = 6271.27 MB, solutions = 0)
Nodefile size = 4188.32 MB (2302.65 MB after compression)
14627 13512 5386890.7225 556 5426984.4114 821318
14895 13829 5386888.5939 524 5426984.4114 831183
15187 13963 5377020.3945 504 5426984.4114 834645
15455 14294 5377020.3898 505 5426984.4114 844715
15680 14635 5377020.4007 520 5426984.4114 852027
15976 14783 5381527.6047 733 5426984.4114 856152
16177 14937 5381511.9443 520 5426984.4114 861753
16451 15339 5376578.6410 473 5426984.4114 876699
16689 15404 5325878.3808 610 5426984.4114 879652
16935 15755 5325878.3164 613 5426984.4114 891454
Elapsed time = 356.26 sec. (265571.16 ticks, tree = 7501.52 MB, solutions = 0)
Nodefile size = 5404.22 MB (3002.08 MB after compression)
17160 16158 5401085.5148 771 5426984.4114 910569
17388 16285 5380972.9071 472 5426984.4114 912559
17663 16416 5376553.4444 432 5426984.4114 915484
17996 16789 5391612.5021 1154 5426984.4114 945195
18370 17016 5399149.8996 661 5426984.4114 946617
18699 17178 5376545.5419 431 5426984.4114 950159
19014 17641 5379024.1276 486 5426984.4114 954633
19340 17899 5383193.5734 645 5426984.4114 960081
19581 18232 5376404.4175 428 5426984.4114 961628
19853 18478 **infeasible** 5426984.4114 981564
Elapsed time = 413.45 sec. (303842.46 ticks, tree = 8828.29 MB, solutions = 0)
Nodefile size = 6720.90 MB (3762.30 MB after compression)
20165 18909 5385867.9420 1066 5426984.4114 994135
20457 19070 5379016.2952 432 5426984.4114 994483
20728 19337 5360733.6497 607 5426984.4114 1001533
21024 19760 5360732.4758 599 5426984.4114 1011198
21356 19923 5385581.0389 620 5426984.4114 1014584
21702 20302 5360727.4646 589 5426984.4114 1016715
22022 20494 5384699.5095 546 5426984.4114 1018323
22309 20749 5372959.8072 431 5426984.4114 1019547
22593 21255 5372956.2581 440 5426984.4114 1021651
22910 21449 5360374.1876 576 5426984.4114 1022311
Elapsed time = 470.00 sec. (342129.94 ticks, tree = 10417.44 MB, solutions = 0)
Nodefile size = 8263.60 MB (4646.00 MB after compression)
23237 21859 5360335.4920 575 5426984.4114 1031050
23560 22046 5383736.0244 537 5426984.4114 1032783
23879 22426 5360333.9633 576 5426984.4114 1034900
24119 22732 5378781.2447 415 5426984.4114 1036538
24393 22999 5360321.5653 574 5426984.4114 1039237
24617 23392 5398904.1723 1155 5426984.4114 1066359
24936 23397 5392844.8271 1514 5426984.4114 1063103
25291 23694 5372215.0641 428 5426984.4114 1069151
25565 24143 5372213.8210 421 5426984.4114 1080186
25833 24498 5378351.9222 405 5426984.4114 1091270
Elapsed time = 527.85 sec. (380399.19 ticks, tree = 12081.63 MB, solutions = 0)
Nodefile size = 9987.11 MB (5635.13 MB after compression)
26112 24647 5372183.3830 418 5426984.4114 1092716
26388 24796 5391904.6857 967 5426984.4114 1111331
26638 25128 5372042.5916 424 5426984.4114 1110020
26918 25490 5372036.4388 424 5426984.4114 1132170
27227 25682 5390109.8411 640 5426984.4114 1137477
27478 25965 5372001.7107 424 5426984.4114 1148303
27757 26212 5394104.4759 1459 5426984.4114 1171142
28054 26395 5378084.1732 395 5426984.4114 1163286
28399 26826 5378077.2330 392 5426984.4114 1179971
28693 26951 5371934.7413 413 5426984.4114 1182067
I have tried couple of hyperparameters like bbinterval, nodeselect, feasiblity, etc. but it keeps running for hours and not able to find and feasible or optimal solution.

Related

SVG stroke gradient causes horizontal lines to display on iOS Safari

Adding a radial gradient to my SVG path seems to cause weird horizontal (anti-aliasing?) lines on some iOS devices or when you zoom in/out on an iOS device. I wasn't able to replicate it anywhere else.
Here's the (isolated) code:
<svg class="componentClass__chart-svg" width="335" height="318" viewBox="0 0 335 320" xmlns="http://www.w3.org/2000/svg">
<defs>
<radialGradient id="axesGradient" cx="50%" cy="0%" fx="50%" fy="0%" r="50%">
<stop stop-color="#FFFFFF" offset="10%"></stop>
<stop stop-color="#FFFFFF" offset="100%" stop-opacity="0.2"></stop>
</radialGradient>
</defs>
<path class="componentClass__axes" stroke-width="2" stroke="url(#axesGradient)" fill="none" d="M151 12 Q167 0 183 12 L319 108 Q335 120 329 139 L276 299 Q270 318 250 318 L85 318 Q65 318 59 299 L6 139 Q0 120 16 108 Z
M151 37 Q167 25 183 37 L293 116 Q309 128 303 147 L260 275 Q254 294 234 294 L101 294 Q81 294 75 275 L32 147 Q26 128 42 116 Z
M151 62 Q167 50 183 62 L267 124 Q283 136 277 155 L244 251 Q238 270 218 270 L117 270 Q97 270 91 251 L58 155 Q52 136 68 124 Z
M151 87 Q167 75 183 87 L241 132 Q257 144 251 163 L228 227 Q222 246 202 246 L133 246 Q113 246 107 227 L84 163 Q78 144 94 132 Z
M152 113 Q167 100 183 113 L215 139 Q231 152 224 171 L213 203 Q206 222 186 222 L149 222 Q129 222 122 203 L111 171 Q104 152 119 139 Z
" />
</svg>
And the issue:
SVG showing horizontal line
Note this doesn't happen on every iPhone or iPad, but you're usually able to replicate it when you try zooming in and out.
I was able to nail down the issue to this particular use case: as soon as you add the gradient to the stroke, it starts happening. If you change stroke="url(#axesGradient) to just stroke="#FFF", it doesn't seem to happen.
Is there any way I can optimize the SVG to prevent rendering issues?
Here's a Codepen with the exact code above.
Had the same problem, but in my case these lines appeared in any browser on IOS 16, updating to IOS 16.3 fixed it

How to overcome with this error when using Networkx's kernighan_lin_bisection

I want to use kernighan_lin_bisection from Networkx to separate a network data.
But the error below showed up and I'm stuck.
It would be highly appreciated if you could help me overcome this error.
QT-------------------------------------------------------------------------
IndexError Traceback (most recent call last)
in ()
17 for c in init_partition:
18 for n in c:
---> 19 color_map_i[n]=colors[counter]
20 counter=counter+1
21
IndexError: list assignment index out of range
UNQT---------------------------------------------------------------------------
The coding I used and data source"200224_04_act.prn" are below.
QT---------------------------------------------------
G=nx.read_edgelist("200224_04_act.prn",nodetype=int)
colors=["red","blue","green"]
pos=nx.spring_layout(G)
init_nodes=np.array_split(G.nodes(),2)
init_partition=[set(init_nodes[0]),set(init_nodes[1])]
print(init_partition)
from networkx.algorithms.community import kernighan_lin_bisection
color_map_i=["black"]*nx.number_of_nodes(G)
print(color_map_i)
counter=0
for c in init_partition:
for n in c:
color_map_i[n]=colors[counter]
counter=counter+1
print(color_map_i)
nx.draw_networkx_edges(G,pos)
nx.draw_networkx_nodes(G,pos,node_color=color_map_i)
nx.draw_networkx_labels(G,pos)
plt.axis("off")
plt.show()
lst_b=kernighan_lin_bisection(G,partition=init_partition)
color_map_b=["black"]*nx.number_of_nodes(G)
counter=0
for c in lst_b:
for n in c:
color_map_b[n]=colors[counter]
counter=counter+1
nx.draw_networkx_edges(G,pos)
nx.draw_networkx_nodes(G,pos,node_color=color_map_b)
nx.draw_networkx_labels(G,pos)
plt.axis("off")
plt.show()
UNQT--------------------------------------------------------------
"200224_04_act.prn" below.(Number of nodes is around 2000 but I made it
small due to the limit of number of character)
1 415
2 415
3 415
3 1350
4 1351
5 1352
6 383
7 993
8 1353
9 887
10 887
11 887
12 887
13 887
14 1185
15 1185
16 1185
17 1185
18 1185
19 1146
20 1146
21 1146
22 1146
21 776
23 776
24 707
25 707
26 707
27 707
28 707
29 754
21 754
30 754
31 754
32 754
33 778
34 778
35 778
36 778
37 778
38 859
39 859
40 1354
41 563
42 563
43 563
44 563
45 563
46 1209
47 1209
48 1209
49 1209
50 1209
51 715
52 715
53 715
54 715
55 715
56 1048
57 1048
58 1047
59 1047
60 1047
61 1047
62 1047
63 718
64 718
65 718
66 718
67 718
68 947
17 947
69 947
70 889
71 744
72 744
73 744
74 744
75 744
76 1137
77 1137
78 1137
79 1137
80 612
81 612
82 612
83 612
17 612
84 790
85 790
86 790
87 790
88 790
89 922
90 922
91 922
92 922
93 922
21 738
94 738
95 738
96 738
97 738
98 1355
81 807
99 807
17 807
100 725
101 725
17 725
102 725
103 725
23 1046
104 661
105 661
106 661
107 661
108 661
109 907
110 907
111 907
112 907
113 907
114 840
115 840
116 840
117 840
17 840
118 759
23 759
119 759
23 761
120 761
121 761
122 761
123 1356
124 1265
125 1265
126 1265
127 1265
128 1265
129 894
29 894
130 894
131 894
132 667
133 667
124 758
134 758
135 758
122 758
136 758
137 471
138 471
You've got
for c in init_partition:
for n in c:
color_map_i[n]=colors[counter]
counter=counter+1
It looks to me like n will loop over all of the nodes of the graph. I do not see any entries in the graph that are 0. So probably the nodes are numbered 1 to N, while color_map_i is indexed from 0 to N-1. So it would break when n=N.
A good way to hunt for bugs like this in general would be to print n right before the line giving the error. This would give a hint to what the problem is.

Postgres performance issue in my Rails app

I'm using derailed_benchmark gem to track my app performance:
$ PATH_TO_HIT="/api/v2/feed.json?per_page=30&page=1&category_name=Feed" USER_SERVER=webrick TEST_COUNT=20 bundle exec derailed exec perf:stackprof
==================================
Mode: cpu(1000)
Samples: 20708 (0.42% miss rate)
GC: 3219 (15.54%)
==================================
TOTAL (pct) SAMPLES (pct) FRAME
4720 (22.8%) 4694 (22.7%) block in ActiveRecord::ConnectionAdapters::PostgreSQLAdapter#exec_cache
542 (2.6%) 502 (2.4%) ActiveSupport::Inflector#underscore
413 (2.0%) 413 (2.0%) ActiveSupport::PerThreadRegistry#instance
364 (1.8%) 364 (1.8%) ActiveRecord::QueryMethods#validate_order_args
309 (1.5%) 309 (1.5%) block in ActiveSupport::Inflector#apply_inflections
282 (1.4%) 282 (1.4%) ThreadSafe::NonConcurrentCacheBackend#[]
257 (1.2%) 257 (1.2%) ActiveRecord::Relation#initialize
410 (2.0%) 235 (1.1%) ActiveRecord::Relation#initialize_copy
229 (1.1%) 229 (1.1%) ActiveRecord::Delegation::DelegateCache#relation_delegate_class
212 (1.0%) 212 (1.0%) block in ActiveRecord::Relation::Merger#merge
562 (2.7%) 198 (1.0%) ActiveRecord::QueryMethods#preprocess_order_args
190 (0.9%) 189 (0.9%) ActiveRecord::Core::ClassMethods#arel_table
181 (0.9%) 181 (0.9%) JSON#parse
175 (0.8%) 175 (0.8%) ActiveRecord::Relation#reset
165 (0.8%) 165 (0.8%) ActiveRecord::Attribute#initialize
153 (0.7%) 153 (0.7%) ActiveRecord::Relation#values
151 (0.7%) 151 (0.7%) ActiveRecord::Inheritance::ClassMethods#base_class
333 (1.6%) 151 (0.7%) ActiveRecord::Scoping::Default::ClassMethods#build_default_scope
144 (0.7%) 144 (0.7%) Skylight::Normalizers::ActiveRecord::SQL#extract_rust
142 (0.7%) 142 (0.7%) ActiveRecord::QueryMethods#joins_values
138 (0.7%) 138 (0.7%) block (4 levels) in Class#class_attribute
195 (0.9%) 133 (0.6%) ActiveRecord::DynamicMatchers#respond_to?
158 (0.8%) 121 (0.6%) ActiveRecord::QueryMethods#where_values=
125 (0.6%) 115 (0.6%) ActiveRecord::Reflection::AssociationReflection#klass
113 (0.5%) 113 (0.5%) ActiveRecord::Result#initialize_copy
110 (0.5%) 110 (0.5%) Arel::Table#initialize
193 (0.9%) 109 (0.5%) ActiveRecord::ConnectionAdapters::PostgreSQL::Utils#extract_schema_qualified_name
114 (0.6%) 106 (0.5%) Arel::Nodes::Binary#hash
104 (0.5%) 104 (0.5%) ActiveRecord::QueryMethods#extending_values
99 (0.5%) 99 (0.5%) ActiveRecord::QueryMethods#order_values
How can I fix the "block in ActiveRecord::ConnectionAdapters::PostgreSQLAdapter#exec_cache" performance issue?
UPDATE
After running same command with "config.middleware.delete "ActiveRecord::QueryCache" in my config/application.rb
the results are:
==================================
Mode: cpu(1000)
Samples: 21116 (0.42% miss rate)
GC: 2213 (10.48%)
==================================
TOTAL (pct) SAMPLES (pct) FRAME
5619 (26.6%) 5600 (26.5%) block in ActiveRecord::ConnectionAdapters::PostgreSQLAdapter#exec_cache
2268 (10.7%) 2268 (10.7%) block in ActiveRecord::ConnectionAdapters::PostgreSQLAdapter#exec_no_cache
421 (2.0%) 383 (1.8%) ActiveSupport::Inflector#underscore
304 (1.4%) 304 (1.4%) ActiveSupport::PerThreadRegistry#instance
294 (1.4%) 294 (1.4%) block in ActiveSupport::Inflector#apply_inflections
270 (1.3%) 270 (1.3%) ThreadSafe::NonConcurrentCacheBackend#[]
245 (1.2%) 245 (1.2%) ActiveRecord::Relation#initialize
229 (1.1%) 229 (1.1%) ActiveRecord::QueryMethods#validate_order_args
219 (1.0%) 219 (1.0%) ActiveRecord::Delegation::DelegateCache#relation_delegate_class
207 (1.0%) 207 (1.0%) ActiveRecord::Inheritance::ClassMethods#base_class
285 (1.3%) 188 (0.9%) ActiveRecord::Relation#initialize_copy
184 (0.9%) 184 (0.9%) ActiveRecord::Attribute#initialize
181 (0.9%) 179 (0.8%) ActiveRecord::Core::ClassMethods#arel_table
175 (0.8%) 175 (0.8%) Skylight::Normalizers::ActiveRecord::SQL#extract_rust
165 (0.8%) 165 (0.8%) block in ActiveRecord::Relation::Merger#merge
147 (0.7%) 147 (0.7%) block (4 levels) in Class#class_attribute
374 (1.8%) 145 (0.7%) ActiveRecord::QueryMethods#preprocess_order_args
113 (0.5%) 113 (0.5%) ActiveRecord::Relation#values
112 (0.5%) 112 (0.5%) ActiveRecord::QueryMethods#joins_values
171 (0.8%) 109 (0.5%) ActiveRecord::ConnectionAdapters::PostgreSQL::Utils#extract_schema_qualified_name
99 (0.5%) 99 (0.5%) Arel::Table#initialize
97 (0.5%) 97 (0.5%) ActiveRecord::Relation#reset
271 (1.3%) 96 (0.5%) ActiveRecord::Scoping::Default::ClassMethods#build_default_scope
107 (0.5%) 95 (0.4%) ActiveRecord::Reflection::AssociationReflection#klass
93 (0.4%) 93 (0.4%) ActiveRecord::QueryMethods#order_values
125 (0.6%) 93 (0.4%) ActiveRecord::QueryMethods#where_values=
88 (0.4%) 88 (0.4%) ActiveRecord::Reflection::ThroughReflection#active_record
106 (0.5%) 87 (0.4%) Skylight::Trace#start
81 (0.4%) 81 (0.4%) ActiveRecord::QueryMethods#check_cached_relation
80 (0.4%) 80 (0.4%) ActiveRecord::QueryMethods#where_values
UDPATE 2
After running the query with "wall time" mode and not "cpu time" mode, this is the results:
==================================
Mode: wall(1000)
Samples: 41424 (1.92% miss rate)
GC: 3648 (8.81%)
==================================
TOTAL (pct) SAMPLES (pct) FRAME
4780 (11.5%) 4718 (11.4%) block in ActiveRecord::ConnectionAdapters::PostgreSQLAdapter#exec_cache
2783 (6.7%) 2783 (6.7%) block in ActiveRecord::ConnectionAdapters::PostgreSQLAdapter#exec_no_cache
1088 (2.6%) 1088 (2.6%) ActiveSupport::PerThreadRegistry#instance
934 (2.3%) 934 (2.3%) ThreadSafe::NonConcurrentCacheBackend#[]
1031 (2.5%) 926 (2.2%) ActiveSupport::Inflector#underscore
739 (1.8%) 739 (1.8%) block in ActiveSupport::Inflector#apply_inflections
626 (1.5%) 626 (1.5%) ActiveRecord::Relation#initialize
589 (1.4%) 589 (1.4%) ActiveRecord::Delegation::DelegateCache#relation_delegate_class
577 (1.4%) 577 (1.4%) ThreadSafe::NonConcurrentCacheBackend#get_or_default
549 (1.3%) 549 (1.3%) ActiveRecord::Attribute#initialize
497 (1.2%) 497 (1.2%) block in ActiveRecord::Relation::Merger#merge
497 (1.2%) 497 (1.2%) ActiveRecord::QueryMethods#validate_order_args
702 (1.7%) 424 (1.0%) ActiveRecord::Relation#initialize_copy
419 (1.0%) 417 (1.0%) ActiveRecord::Core::ClassMethods#arel_table
384 (0.9%) 384 (0.9%) ActiveRecord::Inheritance::ClassMethods#base_class
383 (0.9%) 383 (0.9%) block (4 levels) in Class#class_attribute
358 (0.9%) 358 (0.9%) Skylight::Normalizers::ActiveRecord::SQL#extract_rust
329 (0.8%) 329 (0.8%) ActiveRecord::Base.logger
321 (0.8%) 321 (0.8%) rescue in Net::BufferedIO#rbuf_fill
315 (0.8%) 315 (0.8%) ActiveRecord::Core#update_attributes_from_transaction_state
314 (0.8%) 314 (0.8%) ActiveRecord::ConnectionAdapters::AbstractAdapter#type_map
795 (1.9%) 298 (0.7%) ActiveRecord::QueryMethods#preprocess_order_args
284 (0.7%) 284 (0.7%) Arel::Table#initialize
279 (0.7%) 279 (0.7%) ActiveRecord::Relation#values
278 (0.7%) 278 (0.7%) ActiveRecord::Relation#reset
734 (1.8%) 264 (0.6%) ActiveRecord::Scoping::Default::ClassMethods#build_default_scope
263 (0.6%) 263 (0.6%) ActiveRecord::QueryMethods#joins_values
394 (1.0%) 258 (0.6%) ActiveRecord::ConnectionAdapters::PostgreSQL::Utils#extract_schema_qualified_name
15323 (37.0%) 249 (0.6%) ActiveRecord::Querying#find_by_sql
257 (0.6%) 246 (0.6%) ActiveRecord::Reflection::AssociationReflection#klass
I'm building my feed.json using index.json.jbuilder, this is how it looks:
json.battles #battles do |battle|
if (battle.products.size == 2)
battle_results = battle.calculate_results
json.(battle, :id)
vote = battle.votes.find_by(user_id: current_user.id)
json.voted vote.present?
if vote
json.product_voted vote.product.id == battle.products[0].id ? "first" : "second"
end
json.mybattle battle.try(:user).try(:id) == current_user.id
json.user do
username = ""
if (battle.try(:user).try(:nickname).present?)
username = battle.try(:user).try(:nickname)
else
username = battle.try(:user).try(:name).try(:downcase).try(:delete,' ')
end
json.username username
json.user_id battle.try(:user_id)
json.profile_image battle.try(:user).try(:image) || ""
json.full_name battle.try(:user).try(:name) || ""
end
json.votes battle_results[:votes]
json.created_at time_ago_in_words(battle.created_at) + " ago"
json.title battle.title
json.first_product do
first_product = battle.products[0]
json.id first_product.id
json.voted first_product.votes.find_by(user_id: current_user.id).present?
json.percentage battle_results[:percentage_product_one]
# json.percentage_after_voting battle_results[:percentage_after_voting_product_one]
json.name first_product.name
json.price SearchFunctions.convert_currency(first_product.price.to_s, current_user.currency_code, 'USD')
# json.price first_product.price.to_s
json.url first_product.url
if first_product.images["sub"] && first_product.images["sub"].kind_of?(Array)
first_product.images["sub"] = first_product.images["sub"].first(10)
end
json.images first_product.images
json.manufacturer first_product.manufacturer
json.description first_product.description
json.is_user_saved first_product.saved_products.find_by(user_id: current_user.id).present?
json.saved_count first_product.saved_products.length
end
json.second_product do
second_product = battle.products[1]
json.id second_product.id
json.voted second_product.votes.find_by(user_id: current_user.id).present?
json.percentage battle_results[:percentage_product_two]
# json.percentage_after_voting battle_results[:percentage_after_voting_product_two]
json.name second_product.name
json.price SearchFunctions.convert_currency(second_product.price.to_s, current_user.currency_code, 'USD')
# json.price second_product.price.to_s
json.url second_product.url
if second_product.images["sub"] && second_product.images["sub"].kind_of?(Array)
second_product.images["sub"] = second_product.images["sub"].first(10)
end
json.images second_product.images
json.manufacturer second_product.manufacturer
json.description second_product.description
json.is_user_saved second_product.saved_products.find_by(user_id: current_user.id).present?
json.saved_count second_product.saved_products.length
end
end
end
Well, this may be silly answer, but you probably should decrease or optimise number of queries executed during building feed.json. Check for N+1 queries, for example maybe you are loading author for each feed item or something like that.
You can use bullet gem to help you find N+1 queries. And you can fix those by adding includes to your queries.
Update Based on json view.
It is pretty big json and it looks like you use a lot of models from your application. BY looking at this it is impossible to give you any clear guidelines on how to optimise this. You should probably paste your whole app here, but I think that's not appropriate for SO.
For sure there is a lot space for improvement on database side, but I think your best and easiest way is to just cache this view. By caching I mean using fragment caching for each separate battle.
json.battles #battles do |battle|
if (battle.products.size == 2)
json.cache! "#{battle.id}/#{battle.updated_at}" do
battle_results = battle.calculate_results
json.(battle, :id)
vote = battle.votes.find_by(user_id: current_user.id)
json.voted vote.present?
if vote
json.product_voted vote.product.id == battle.products[0].id ? "first" : "second"
end
json.mybattle battle.try(:user).try(:id) == current_user.id
json.user do
username = ""
if (battle.try(:user).try(:nickname).present?)
username = battle.try(:user).try(:nickname)
else
username = battle.try(:user).try(:name).try(:downcase).try(:delete,' ')
end
json.username username
json.user_id battle.try(:user_id)
json.profile_image battle.try(:user).try(:image) || ""
json.full_name battle.try(:user).try(:name) || ""
end
json.votes battle_results[:votes]
json.created_at time_ago_in_words(battle.created_at) + " ago"
json.title battle.title
json.first_product do
first_product = battle.products[0]
json.id first_product.id
json.voted first_product.votes.find_by(user_id: current_user.id).present?
json.percentage battle_results[:percentage_product_one]
# json.percentage_after_voting battle_results[:percentage_after_voting_product_one]
json.name first_product.name
json.price SearchFunctions.convert_currency(first_product.price.to_s, current_user.currency_code, 'USD')
# json.price first_product.price.to_s
json.url first_product.url
if first_product.images["sub"] && first_product.images["sub"].kind_of?(Array)
first_product.images["sub"] = first_product.images["sub"].first(10)
end
json.images first_product.images
json.manufacturer first_product.manufacturer
json.description first_product.description
json.is_user_saved first_product.saved_products.find_by(user_id: current_user.id).present?
json.saved_count first_product.saved_products.length
end
json.second_product do
second_product = battle.products[1]
json.id second_product.id
json.voted second_product.votes.find_by(user_id: current_user.id).present?
json.percentage battle_results[:percentage_product_two]
# json.percentage_after_voting battle_results[:percentage_after_voting_product_two]
json.name second_product.name
json.price SearchFunctions.convert_currency(second_product.price.to_s, current_user.currency_code, 'USD')
# json.price second_product.price.to_s
json.url second_product.url
if second_product.images["sub"] && second_product.images["sub"].kind_of?(Array)
second_product.images["sub"] = second_product.images["sub"].first(10)
end
json.images second_product.images
json.manufacturer second_product.manufacturer
json.description second_product.description
json.is_user_saved second_product.saved_products.find_by(user_id: current_user.id).present?
json.saved_count second_product.saved_products.length
end
end
end
end
I added some code at line 3. I just wrote this out of my head, I am not exactly sure if syntax is 100% correct, but it should give you a hint. Also remember that caching is not enabled in development environment. To enable it you need to set config.action_controller.perform_caching = true in config/environments/developement.rb

Xcode 6.2 debugger detaches from device on app crash

Xcode 6.2's debugger doesn't seem to be catching a crash from my application. Whenever it crashes, I just get a popup that says:
Restore the connection to "Agile Lab's iPhone 6 Plus" and run "Tag
Beta" again, or if "Tag Beta" is still running, you can attach to it
by selecting Debug > Attach to Process > Tag Beta.
I have breakpoints on and a breakpoint for "All Exceptions." When I go to Window > Devices and hit "View Device Logs" it shows this:
Hardware Model: iPhone7,1
OS Version: iPhone OS 8.1.3 (12B466)
Kernel Version: Darwin Kernel Version 14.0.0: Mon Jan 12 21:30:05 PST 2015; root:xnu-2783.3.26~3/RELEASE_ARM64_T7000
Date: 2015-03-31 15:12:15 -0400
Time since snapshot: 1230 ms
Free pages: 2404
Active pages: 40050
Inactive pages: 18785
Speculative pages: 1206
Throttled pages: 0
Purgeable pages: 524
Wired pages: 147884
File-backed pages: 11282
Anonymous pages: 48760
Compressions: 487127
Decompressions: 189679
Compressor Size: 40449
Uncompressed Pages in Compressor: 103077
Page Size: 16384
Largest process: Tag Beta
Processes
Name | <UUID> | CPU Time| rpages| purgeable| recent_max| lifetime_max| fds | [reason] | (state)
WirelessRadioMan <REMOVED_FOR_PRIVACY> 0.036 295 0 - 889 50 [vm-pageshortage] (daemon) (idle)
nsurlstoraged <REMOVED_FOR_PRIVACY> 0.072 294 0 - 680 50 [vm-pageshortage] (daemon) (idle)
seld <REMOVED_FOR_PRIVACY> 0.052 218 0 - 995 50 [vm-pageshortage] (daemon)
nsurlsessiond <REMOVED_FOR_PRIVACY> 0.285 389 0 - 1326 50 [vm-pageshortage] (daemon)
passd <REMOVED_FOR_PRIVACY> 0.211 623 0 - 2400 50 [vm-pageshortage] (daemon)
nfcd <REMOVED_FOR_PRIVACY> 0.024 192 0 - 634 50 [vm-pageshortage] (daemon)
biometrickitd <REMOVED_FOR_PRIVACY> 0.084 232 0 - 720 50 [vm-pageshortage] (daemon)
debugserver <REMOVED_FOR_PRIVACY> 1.059 212 0 - 703 50 [vm-pageshortage] (daemon)
MobileMail <REMOVED_FOR_PRIVACY> 0.471 1277 0 - 3744 50 [vm-pageshortage] (resume) (continuous)
lsd <REMOVED_FOR_PRIVACY> 0.612 361 0 - 1136 50 [vm-pageshortage] (daemon)
tccd <REMOVED_FOR_PRIVACY> 0.146 281 0 - 968 50 (daemon)
Tag Beta <REMOVED_FOR_PRIVACY> 19.967 97247 524 - 55588 100 (frontmost) (resume)
ptpd <REMOVED_FOR_PRIVACY> 1.226 786 0 - 2356 50 (daemon)
BTServer <REMOVED_FOR_PRIVACY> 0.303 483 0 - 1811 50 (daemon)
wifid <REMOVED_FOR_PRIVACY> 2.303 544 0 - 1786 50 (daemon)
lockdownd <REMOVED_FOR_PRIVACY> 1.481 279 0 - 1007 50 (daemon)
locationd <REMOVED_FOR_PRIVACY> 35.207 2182 0 - 5074 50 (daemon)
discoveryd <REMOVED_FOR_PRIVACY> 4.462 580 0 - 1232 100 (daemon)
mediaserverd <REMOVED_FOR_PRIVACY> 28.952 36002 0 - 5968 50 (daemon)
imagent <REMOVED_FOR_PRIVACY> 0.418 522 0 - 1531 50 (daemon)
iaptransportd <REMOVED_FOR_PRIVACY> 0.333 308 0 - 906 50 (daemon)
identityservices <REMOVED_FOR_PRIVACY> 1.016 724 0 - 2027 50 (daemon)
cfprefsd <REMOVED_FOR_PRIVACY> 1.371 400 0 - 798 50 (daemon)
syslogd <REMOVED_FOR_PRIVACY> 1.376 233 0 - 449 50 (daemon)
powerd <REMOVED_FOR_PRIVACY> 0.608 215 0 - 514 50 (daemon)
apsd <REMOVED_FOR_PRIVACY> 1.141 733 0 - 2076 50 (daemon)
networkd <REMOVED_FOR_PRIVACY> 1.341 650 0 - 1747 50 (daemon)
vmd <REMOVED_FOR_PRIVACY> 0.086 550 0 - 2441 50 (daemon)
dataaccessd <REMOVED_FOR_PRIVACY> 0.571 853 0 - 2657 50 (daemon)
sharingd <REMOVED_FOR_PRIVACY> 0.360 719 0 - 2260 50 (daemon)
searchd <REMOVED_FOR_PRIVACY> 0.402 874 0 - 2886 50 (daemon)
syslog_relay <REMOVED_FOR_PRIVACY> 0.246 113 0 - 237 50 (daemon)
geod <REMOVED_FOR_PRIVACY> 1.152 868 0 - 1847 50 (daemon)
SpringBoard <REMOVED_FOR_PRIVACY> 14.007 6886 0 - 28595 50
backboardd <REMOVED_FOR_PRIVACY> 63.774 13669 524 - 3673 50 (daemon)
UserEventAgent <REMOVED_FOR_PRIVACY> 17.578 916 0 - 2959 100 (daemon)
fseventsd <REMOVED_FOR_PRIVACY> 0.689 387 0 - 629 50 (daemon)
configd <REMOVED_FOR_PRIVACY> 0.729 530 0 - 1544 50 (daemon)
fairplayd.H2 <REMOVED_FOR_PRIVACY> 0.530 149 0 - 1052 50 (daemon)
assertiond <REMOVED_FOR_PRIVACY> 0.319 296 0 - 1012 50 (daemon)
distnoted <REMOVED_FOR_PRIVACY> 0.078 186 0 - 321 50 (daemon)
wirelessproxd <REMOVED_FOR_PRIVACY> 0.068 248 0 - 1065 50 (daemon)
aggregated <REMOVED_FOR_PRIVACY> 23.356 1192 0 - 2375 50 (daemon)
discoveryd_helpe <REMOVED_FOR_PRIVACY> 0.020 153 0 - 752 50 (daemon)
filecoordination <REMOVED_FOR_PRIVACY> 0.030 224 0 - 898 50 (daemon)
DTMobileIS <REMOVED_FOR_PRIVACY> 3.415 642 0 +25 2345 50 (daemon)
gputoolsd <REMOVED_FOR_PRIVACY> 0.285 948 0 - 2340 50 (daemon)
CommCenter <REMOVED_FOR_PRIVACY> 30.132 1626 0 - 5021 50 (daemon)
notifyd <REMOVED_FOR_PRIVACY> 2.168 347 0 - 413 50 (daemon)
ReportCrash <REMOVED_FOR_PRIVACY> 0.043 162 0 - 579 50 (daemon)
**End**
Now if I run the app in production mode, and attach Fabric, it does catch the exception properly:
Fatal Exception: NSInvalidArgumentException
-[TAGFeedJourneyTableViewCell previewImageView]: unrecognized selector sent to instance 0x14271e9d0
Thread : Fatal Exception: NSInvalidArgumentException
0 CoreFoundation 0x000000018349a59c __exceptionPreprocess + 132
1 libobjc.A.dylib 0x0000000193bec0e4 objc_exception_throw + 60
2 CoreFoundation 0x00000001834a1664 __methodDescriptionForSelector
3 CoreFoundation 0x000000018349e418 ___forwarding___ + 928
4 CoreFoundation 0x00000001833a2b6c _CF_forwarding_prep_0 + 92
5 Tag Beta 0x000000010012ca3c -[TAGFeedViewController tableView:didSelectRowAtIndexPath:] (TAGFeedViewController.m:603)
6 UIKit 0x0000000187d71390 -[UITableView _selectRowAtIndexPath:animated:scrollPosition:notifyDelegate:] + 1280
7 UIKit 0x0000000187e2ecdc -[UITableView _userSelectRowAtPendingSelectionIndexPath:] + 276
8 UIKit 0x0000000187ccb564 _applyBlockToCFArrayCopiedToStack + 356
9 UIKit 0x0000000187c3ce78 _afterCACommitHandler + 532
10 CoreFoundation 0x0000000183452a50 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 32
11 CoreFoundation 0x000000018344f9dc __CFRunLoopDoObservers + 360
12 CoreFoundation 0x000000018344fdbc __CFRunLoopRun + 836
13 CoreFoundation 0x000000018337d0a4 CFRunLoopRunSpecific + 396
14 GraphicsServices 0x000000018c5175a4 GSEventRunModal + 168
15 UIKit 0x0000000187caeaa4 UIApplicationMain + 1488
16 Tag Beta 0x0000000100123f7c main (main.m:14)
17 libdyld.dylib 0x000000019425aa08 start + 4
While it's nice that Fabric is able to catch the issue, It'd be much more helpful if the debugger would catch the exception, so I could see values, stack traces, etc. Is there some setting that I just don't have on or is this an issue with Xcode?

can't run "rails server" on windows 7

I am just One hour new to ROR. I am getting trained by the "Lynda.com Ruby on Rails 4 Essential Training". And after installing all the components, I am unable to start the web server. What I do is the following:-
////////////////////////This is what i get after i type "rails server" in command prompt /////////////
port/descendants_tracker.rb
415 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-4.1.5/lib/active_sup
port/callbacks.rb
416 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activerecord-4.1.5/lib/active_reco
rd/connection_adapters/abstract_adapter.rb
417 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activerecord-4.1.5/lib/active_reco
rd/scoping.rb
418 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activerecord-4.1.5/lib/active_reco
rd.rb
419 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activemodel-4.1.5/lib/active_model
/railtie.rb
420 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-4.1.5/lib/active_sup
port/core_ext/module/attr_internal.rb
421 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-4.1.5/lib/active_sup
port/core_ext/module/anonymous.rb
422 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/actionpack-4.1.5/lib/abstract_cont
roller.rb
423 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/actionpack-4.1.5/lib/action_dispat
ch/http/filter_redirect.rb
424 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rack-1.5.2/lib/rack/request.rb
425 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rack-1.5.2/lib/rack/response.rb
426 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/actionpack-4.1.5/lib/action_dispat
ch/http/cache.rb
427 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/actionpack-4.1.5/lib/action_dispat
ch/http/response.rb
428 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-4.1.5/lib/active_sup
port/json/decoding.rb
429 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-4.1.5/lib/active_sup
port/json/encoding.rb
430 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-4.1.5/lib/active_sup
port/json.rb
431 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/actionpack-4.1.5/lib/action_contro
ller/metal/live.rb
432 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-4.1.5/lib/active_sup
port/hash_with_indifferent_access.rb
433 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-4.1.5/lib/active_sup
port/core_ext/hash/indifferent_access.rb
434 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-4.1.5/lib/active_sup
port/rescuable.rb
435 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/actionpack-4.1.5/lib/action_dispat
ch/http/upload.rb
436 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rack-test-0.6.2/lib/rack/mock_sess
ion.rb
437 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rack-test-0.6.2/lib/rack/test/cook
ie_jar.rb
438 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rack-test-0.6.2/lib/rack/test/mock
_digest_request.rb
439 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rack-test-0.6.2/lib/rack/test/util
s.rb
440 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rack-test-0.6.2/lib/rack/test/meth
ods.rb
441 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rack-test-0.6.2/lib/rack/test/uplo
aded_file.rb
442 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rack-test-0.6.2/lib/rack/test.rb
443 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/actionpack-4.1.5/lib/action_contro
ller/metal/strong_parameters.rb
444 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-4.1.5/lib/active_sup
port/core_ext/load_error.rb
445 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-4.1.5/lib/active_sup
port/core_ext/name_error.rb
446 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-4.1.5/lib/active_sup
port/core_ext/uri.rb
447 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/actionpack-4.1.5/lib/action_contro
ller.rb
448 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/actionpack-4.1.5/lib/abstract_cont
roller/railties/routes_helpers.rb
449 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/actionpack-4.1.5/lib/action_contro
ller/railties/helpers.rb
450 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/actionview-4.1.5/lib/action_view/g
em_version.rb
451 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/actionview-4.1.5/lib/action_view/v
ersion.rb
452 C:/Ruby200-x64/lib/ruby/2.0.0/erb.rb
453 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-4.1.5/lib/active_sup
port/core_ext/string/output_safety.rb
454 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/actionview-4.1.5/lib/action_view.r
b
455 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/actionview-4.1.5/lib/action_view/r
ailtie.rb
456 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/actionpack-4.1.5/lib/action_contro
ller/railtie.rb
457 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activerecord-4.1.5/lib/active_reco
rd/railtie.rb
458 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/actionmailer-4.1.5/lib/action_mail
er/gem_version.rb
459 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/actionmailer-4.1.5/lib/action_mail
er/version.rb
460 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-4.1.5/lib/active_sup
port/core_ext/class/delegating_attributes.rb
461 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-4.1.5/lib/active_sup
port/core_ext/module/reachable.rb
462 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-4.1.5/lib/active_sup
port/core_ext/class/subclasses.rb
463 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-4.1.5/lib/active_sup
port/core_ext/class.rb
464 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/actionmailer-4.1.5/lib/action_mail
er.rb
465 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/actionmailer-4.1.5/lib/action_mail
er/railtie.rb
466 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-4.1.5/lib/rails/test_unit
/railtie.rb
467 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sprockets-2.11.0/lib/sprockets/ver
sion.rb
468 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/hike-1.2.3/lib/hike.rb
469 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/tilt-1.4.1/lib/tilt/template.rb
470 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/tilt-1.4.1/lib/tilt/string.rb
471 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/tilt-1.4.1/lib/tilt/erb.rb
472 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/tilt-1.4.1/lib/tilt/etanni.rb
473 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/tilt-1.4.1/lib/tilt/haml.rb
474 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/tilt-1.4.1/lib/tilt/css.rb
475 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/tilt-1.4.1/lib/tilt/csv.rb
476 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/tilt-1.4.1/lib/tilt/coffee.rb
477 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/tilt-1.4.1/lib/tilt/nokogiri.rb
478 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/tilt-1.4.1/lib/tilt/builder.rb
479 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/tilt-1.4.1/lib/tilt/markaby.rb
480 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/tilt-1.4.1/lib/tilt/liquid.rb
481 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/tilt-1.4.1/lib/tilt/radius.rb
482 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/tilt-1.4.1/lib/tilt/markdown.rb
483 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/tilt-1.4.1/lib/tilt/textile.rb
484 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/tilt-1.4.1/lib/tilt/rdoc.rb
485 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/tilt-1.4.1/lib/tilt/wiki.rb
486 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/tilt-1.4.1/lib/tilt/yajl.rb
487 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/tilt-1.4.1/lib/tilt/asciidoc.rb
488 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/tilt-1.4.1/lib/tilt/plain.rb
489 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/tilt-1.4.1/lib/tilt.rb
490 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sprockets-2.11.0/lib/sprockets/eco
_template.rb
491 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sprockets-2.11.0/lib/sprockets/ejs
_template.rb
492 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sprockets-2.11.0/lib/sprockets/jst
_processor.rb
493 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sprockets-2.11.0/lib/sprockets/uti
ls.rb
494 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sprockets-2.11.0/lib/sprockets/eng
ines.rb
495 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rack-1.5.2/lib/rack/mime.rb
496 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sprockets-2.11.0/lib/sprockets/mim
e.rb
497 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sprockets-2.11.0/lib/sprockets/pro
cessor.rb
498 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sprockets-2.11.0/lib/sprockets/pro
cessing.rb
499 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sprockets-2.11.0/lib/sprockets/com
pressing.rb
500 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sprockets-2.11.0/lib/sprockets/pat
hs.rb
501 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/hike-1.2.3/lib/hike/normalized_arr
ay.rb
502 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/hike-1.2.3/lib/hike/extensions.rb
503 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/hike-1.2.3/lib/hike/index.rb
504 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/hike-1.2.3/lib/hike/paths.rb
505 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/hike-1.2.3/lib/hike/trail.rb
506 C:/Ruby200-x64/lib/ruby/2.0.0/shellwords.rb
507 C:/Ruby200-x64/lib/ruby/2.0.0/psych/syntax_error.rb
508 C:/Ruby200-x64/lib/ruby/2.0.0/x64-mingw32/psych.so
509 C:/Ruby200-x64/lib/ruby/2.0.0/psych/nodes/node.rb
510 C:/Ruby200-x64/lib/ruby/2.0.0/psych/nodes/stream.rb
511 C:/Ruby200-x64/lib/ruby/2.0.0/psych/nodes/document.rb
512 C:/Ruby200-x64/lib/ruby/2.0.0/psych/nodes/sequence.rb
513 C:/Ruby200-x64/lib/ruby/2.0.0/psych/nodes/scalar.rb
514 C:/Ruby200-x64/lib/ruby/2.0.0/psych/nodes/mapping.rb
515 C:/Ruby200-x64/lib/ruby/2.0.0/psych/nodes/alias.rb
516 C:/Ruby200-x64/lib/ruby/2.0.0/psych/nodes.rb
517 C:/Ruby200-x64/lib/ruby/2.0.0/psych/streaming.rb
518 C:/Ruby200-x64/lib/ruby/2.0.0/psych/visitors/visitor.rb
519 C:/Ruby200-x64/lib/ruby/2.0.0/psych/scalar_scanner.rb
520 C:/Ruby200-x64/lib/ruby/2.0.0/psych/visitors/to_ruby.rb
521 C:/Ruby200-x64/lib/ruby/2.0.0/psych/visitors/emitter.rb
522 C:/Ruby200-x64/lib/ruby/2.0.0/psych/visitors/yaml_tree.rb
523 C:/Ruby200-x64/lib/ruby/2.0.0/psych/json/ruby_events.rb
524 C:/Ruby200-x64/lib/ruby/2.0.0/psych/visitors/json_tree.rb
525 C:/Ruby200-x64/lib/ruby/2.0.0/psych/visitors/depth_first.rb
526 C:/Ruby200-x64/lib/ruby/2.0.0/psych/visitors.rb
527 C:/Ruby200-x64/lib/ruby/2.0.0/psych/handler.rb
528 C:/Ruby200-x64/lib/ruby/2.0.0/psych/tree_builder.rb
529 C:/Ruby200-x64/lib/ruby/2.0.0/psych/parser.rb
530 C:/Ruby200-x64/lib/ruby/2.0.0/psych/omap.rb
531 C:/Ruby200-x64/lib/ruby/2.0.0/psych/set.rb
532 C:/Ruby200-x64/lib/ruby/2.0.0/psych/coder.rb
533 C:/Ruby200-x64/lib/ruby/2.0.0/psych/core_ext.rb
534 C:/Ruby200-x64/lib/ruby/2.0.0/psych/deprecated.rb
535 C:/Ruby200-x64/lib/ruby/2.0.0/psych/stream.rb
536 C:/Ruby200-x64/lib/ruby/2.0.0/psych/json/yaml_events.rb
537 C:/Ruby200-x64/lib/ruby/2.0.0/psych/json/tree_builder.rb
538 C:/Ruby200-x64/lib/ruby/2.0.0/psych/json/stream.rb
539 C:/Ruby200-x64/lib/ruby/2.0.0/psych/handlers/document_stream.rb
540 C:/Ruby200-x64/lib/ruby/2.0.0/psych.rb
541 C:/Ruby200-x64/lib/ruby/2.0.0/yaml.rb
542 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sprockets-2.11.0/lib/sprockets/dir
ective_processor.rb
543 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sprockets-2.11.0/lib/sprockets/saf
ety_colons.rb
544 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sprockets-2.11.0/lib/sprockets/cha
rset_normalizer.rb
545 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sprockets-2.11.0/lib/sprockets/sas
s_compressor.rb
546 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sprockets-2.11.0/lib/sprockets/yui
_compressor.rb
547 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sprockets-2.11.0/lib/sprockets/clo
sure_compressor.rb
548 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sprockets-2.11.0/lib/sprockets/ugl
ifier_compressor.rb
549 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sprockets-2.11.0/lib/sprockets/sas
s_template.rb
550 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sprockets-2.11.0/lib/sprockets/scs
s_template.rb
551 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sprockets-2.11.0/lib/sprockets.rb
552 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-4.1.5/lib/active_sup
port/benchmarkable.rb
553 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/actionview-4.1.5/lib/action_view/h
elpers/active_model_helper.rb
554 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/actionview-4.1.5/lib/action_view/h
elpers/asset_url_helper.rb
555 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/actionview-4.1.5/lib/action_view/h
elpers/capture_helper.rb
556 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/actionview-4.1.5/lib/action_view/h
elpers/tag_helper.rb
557 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/actionview-4.1.5/lib/action_view/h
elpers/asset_tag_helper.rb
558 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/actionview-4.1.5/lib/action_view/h
elpers/atom_feed_helper.rb
559 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/actionview-4.1.5/lib/action_view/h
elpers/cache_helper.rb
560 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/actionview-4.1.5/lib/action_view/h
elpers/controller_helper.rb
561 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/actionview-4.1.5/lib/action_view/h
elpers/csrf_helper.rb
562 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/actionview-4.1.5/lib/action_view/h
elpers/date_helper.rb
563 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/actionview-4.1.5/lib/action_view/h
elpers/debug_helper.rb
564 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/actionview-4.1.5/lib/action_view/h
elpers/javascript_helper.rb
565 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-4.1.5/lib/active_sup
port/core_ext/array/access.rb
566 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/actionview-4.1.5/lib/action_view/h
elpers/url_helper.rb
567 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-4.1.5/lib/active_sup
port/core_ext/string/filters.rb
568 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/actionview-4.1.5/lib/action_view/v
endor/html-scanner.rb
569 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/actionview-4.1.5/lib/action_view/h
elpers/sanitize_helper.rb
570 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/actionview-4.1.5/lib/action_view/h
elpers/output_safety_helper.rb
571 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/actionview-4.1.5/lib/action_view/h
elpers/text_helper.rb
572 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/actionview-4.1.5/lib/action_view/h
elpers/form_tag_helper.rb
573 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/actionview-4.1.5/lib/action_view/m
odel_naming.rb
574 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/actionview-4.1.5/lib/action_view/h
elpers/form_helper.rb
575 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/actionview-4.1.5/lib/action_view/h
elpers/form_options_helper.rb
576 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-4.1.5/lib/active_sup
port/number_helper.rb
577 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/actionview-4.1.5/lib/action_view/h
elpers/number_helper.rb
578 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-4.1.5/lib/active_sup
port/core_ext/module/concerning.rb
579 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-4.1.5/lib/active_sup
port/core_ext/module/qualified_const.rb
580 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-4.1.5/lib/active_sup
port/core_ext/module.rb
581 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/actionview-4.1.5/lib/action_view/r
ecord_identifier.rb
582 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/actionview-4.1.5/lib/action_view/h
elpers/record_tag_helper.rb
583 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/actionview-4.1.5/lib/action_view/h
elpers/rendering_helper.rb
584 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/actionview-4.1.5/lib/action_view/h
elpers/translation_helper.rb
585 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/actionview-4.1.5/lib/action_view/h
elpers.rb
586 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sprockets-rails-2.1.3/lib/sprocket
s/rails/helper.rb
587 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sprockets-rails-2.1.3/lib/sprocket
s/rails/version.rb
588 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-4.1.5/lib/rails/engine/co
nfiguration.rb
589 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-4.1.5/lib/rails/applicati
on/configuration.rb
590 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sprockets-rails-2.1.3/lib/sprocket
s/railtie.rb
591 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-4.1.5/lib/rails/all.rb
592 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/mysql2-0.3.16/lib/mysql2/version.r
b
593 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/mysql2-0.3.16/lib/mysql2/error.rb
[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
C:\Users\bestacademyonline\Sites\simple_cms>
//////////////////////////////////////////////End//////////////////////////////////////////
Please Help me guys, waiting for you guys!
check your cofig/database.yml file. your user and password for mysql installation should match with mentioned in database.yml.
If this is correct can you show me your gem file details.

Resources