Heroku and my production environment are not loading the jQuery JavaScript Library leading to the following "Failed to load resource: the server responded with a status of 404 (Not Found)".
Heroku和我的生产环境没有加载jQuery JavaScript库,导致以下“无法加载资源:服务器响应状态为404(未找到)”。
All the research I have done point to a asset pipeline issues, but i have confirmed the assets are being precompiled localy and delivered to Heroku.
我所做的所有研究都指向资产管道问题,但我已经确认资产正在进行预编译并交付给Heroku。
I have performed / tested the following and still having issues.
- arranged my asset order in application.js
- changed production.rb: config.assets.compile = true , from default config.serve_static_files = ENV['RAILS_SERVE_STATIC_FILES'].present?
- ran the command: rake assets:precompile then git push heroku master
- ran the command: RAILS_ENV=production bundle exec rake assets:precompile
- ran the command: heroku run rake assets:precompile --app appName
- added the gem 'rails_serve_static_assets' as mentioned in heroku documentation
- precompiled production assets and pushhed and compiled on Heroku. RAILS_ENV=production bundle exec rake assets:precompile
- Debugged in Heroku: confirmed precompiled assets loaded to public/assets $ heroku run bash $ ls public/assets
- Still getting the 404 error in my console "Failed to load resource: the server responded with a status of 404 (Not Found)" specifically naming the Jquery javascript library. Hit a road block on what I am doing wrong. Any help is appreciated.
在application.js中安排了我的资产订单
更改了production.rb:config.assets.compile = true,来自默认的config.serve_static_files = ENV ['RAILS_SERVE_STATIC_FILES']。现在?
运行命令:rake assets:precompile然后git push heroku master
运行命令:RAILS_ENV =生产包exec rake assets:预编译
运行命令:heroku run rake assets:precompile --app appName
添加了heroku文档中提到的gem“rails_serve_static_assets”
预编译的生产资产,并在Heroku上进行推送和编译。 RAILS_ENV =生产包exec rake资产:预编译
在Heroku中调试:已确认加载到公共/资产的预编译资产$ heroku运行bash $ ls public / assets
我的控制台仍然出现404错误“无法加载资源:服务器响应状态为404(未找到)”,专门命名Jquery javascript库。我做错了什么路障。任何帮助表示赞赏。
My problem seems similar to this issue with no answer although i am getting a 404 error.
Jquery not working in Production & Heroku but works perfectly well in development
Jquery不在Production&Heroku工作,但在开发中运行良好
code
application.js
//= require jquery
//= require jquery_ujs
//= require turbolinks
//= require map_theme/vendor/modernizr.custom
//= require map_theme/vendor/matchMedia
//= require map_theme/vendor/bootstrap
//= require map_theme/vendor/jquery.storageapi
//= require map_theme/vendor/jquery.easing
//= require map_theme/vendor/animo
//= require map_theme/vendor/jquery.slimscroll.min
//= require map_theme/vendor/screenfull
//= require map_theme/vendor/jquery.localize
//= require map_theme/demo/demo-rtl
//= require map_theme/vendor/index
//= require map_theme/vendor/jquery.classyloader.min
//= require map_theme/vendor/moment-with-locales.min
//= require map_theme/app
production.rb
config.cache_classes = true
config.eager_load = true
config.consider_all_requests_local = false
config.action_controller.perform_caching = true
config.serve_static_files = true
config.assets.js_compressor = :uglifier
config.assets.compile = false
config.assets.digest = true
config.log_level = :debug
config.i18n.fallbacks = true
config.active_support.deprecation = :notify
config.log_formatter = ::Logger::Formatter.new
config.active_record.dump_schema_after_migration = false
config.middleware.use('PartyFoul::Middleware')
config.secret_key_base = ENV["SECRET_KEY_BASE"]
gemfile
gem 'rails', '4.2.5.1'
gem 'sass-rails', '~> 5.0'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.1.0'
gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder', '~> 2.0'
gem 'sdoc', '~> 0.4.0', group: :doc
gem "figaro"
gem 'geocoder'
gem 'seed_dump'
gem 'gmaps4rails'
gem 'devise'
gem 'puma'
gem 'activeadmin', github: 'activeadmin'
gem 'filterrific'
gem 'sprockets-rails', '2.3.3'
gem 'by_star', git: "git://github.com/radar/by_star"
gem 'colorize'
gem 'carrierwave'
gem 'mandrill-api'
gem 'active_model_serializers', '~> 0.10.0'
gem 'moving_average'
gem 'party_foul'
gem 'rails_serve_static_assets'
group :production do
gem 'pg'
gem 'rails_12factor'
end
group :development, :test do
gem 'byebug'
gem 'sqlite3'
end
view
<script>
var map;
var infoWindow;
// Map Display options
function initMap() {
map = new google.maps.Map(document.getElementById('map'), {
zoom: 9,
center: {lat: 42.05, lng: -70.25},
mapTypeId: google.maps.MapTypeId.SATELLITE,
scrollwheel: false,
scaleControl: false,
});
var polygons = [];
$.ajax({
url: '/species_filter',
type: "get", //send it through get method
data:{target_species:$('#species_select').val()},
success: function(response) {
console.log(response);
for (var i = 0; i < response.length ; i++) {
polygons.push(new google.maps.Polygon({
paths: response[i].cfile,
strokeColor: '#F7F8FF',
strokeOpacity: 0.8,
strokeWeight: .35,
fillColor: response[i].color,
fillOpacity: 0.45,
editable: false,
map: map,
loc: response[i].location,
rep: response[i].reports,
mavg: response[i].movingavg
}));
polygons[polygons.length-1].setMap(map);
var p = polygons[i];
google.maps.event.addListener(p, 'click', function (event) {
console.log(this);
// console.log(location_reports);
var contentString = '<table><thead><tr><th>Date</th><th>Target Species</th><th>Vessel Name</th><th>Primary Method</th><th>Catch Total</th><th>Trip Summary</th></tr></thead><tbody><b>' + this.loc.short_name +'</b> <br>' + this.loc.long_name +'<br> <br>';
for(var j=0;j<this.rep.length; j++){
contentString += '<tr><td>' +this.rep[j].rep.date + '</td> <td>' +this.rep[j].rep.target_species + '</td><td>' +this.rep[j].vessel_name + '</td><td>' +this.rep[j].rep.primary_method + '</td><td>' +this.rep[j].rep.catch_total + '</td><td>' +this.rep[j].rep.trip_summary + '</td></tr>';
};
contentString +='</tbody></table>';
// Replace the info window's content and position.
infoWindow = new google.maps.InfoWindow;
infoWindow.setContent(contentString);
infoWindow.setPosition(event.latLng);
google.maps.event.addListener(infoWindow, 'domready', function() {
var iwOuter = $('.gm-style-iw');
var iwBackground = iwOuter.prev();
// Remove the background shadow DIV
iwBackground.children(':nth-child(2)').css({'display' : 'none'});
// Remove the white background DIV
iwBackground.children(':nth-child(4)').css({'display' : 'none'});
iwOuter.parent().parent().css({left: '115px'});
iwBackground.children(':nth-child(1)').attr('style', function(i,s){ return s + 'left: 76px !important;'});
iwBackground.children(':nth-child(3)').attr('style', function(i,s){ return s + 'left: 155px !important;'});
iwBackground.children(':nth-child(3)').find('div').children().css({'box-shadow': 'rgba(72, 181, 233, 0.6) 0px 1px 6px', 'z-index' : '1'});
var iwCloseBtn = iwOuter.next();
// Apply the desired effect to the close button
iwCloseBtn.css({
opacity: '1', // by default the close button has an opacity of 0.7
right: '44px', top: '8px', // button repositioning
// border: '7px solid #48b5e9', // increasing button border and new color
'border-radius': '13px', // circular effect
'box-shadow': '0 0 5px #3990B9' // 3D effect to highlight the button
});
iwCloseBtn.mouseout(function(){
$(this).css({opacity: '1'});
});
});
infoWindow.open(map);
});
google.maps.event.addListener(p, 'mouseover',function (event){
$("#locdetails").css("display", "block");
$( "#locdetails" ).append( "<div class='hoverrow'> <div class='hoverclass'>Location</div> <div class='hoverclass'>Average Catch Per Trip</div> <div class='hoverclass'>Reports posted past 7 days</div> </div> <div class='hoverrow'><div class='hoverclass'>"+ this.loc.short_name +"</div>" +"<div class='hoverclass'>" + this.mavg + "</div>"+"<div class='hoverclass'>" + this.rep.length + "</div></div>" );
map.data.revertStyle();
this.setOptions({
strokeColor: '#F7F8FF',
strokeWeight: 3 ,
fillOpacity: 0.75
});
});
google.maps.event.addListener(p, 'mouseout',function (event){
$("#locdetails").css("display", "none");
$( "#locdetails" ).empty();
map.data.revertStyle();
this.setOptions({
strokeColor: '#F7F8FF',
strokeOpacity: 0.8,
strokeWeight: .35,
fillOpacity: 0.5,
});
});
};
},
error: function(xhr) {
}
});
}
$('#species_select').change(function(){
initMap();
infoWindow.close();
});
</script>
<script async defer
src="https://maps.googleapis.com/maps/api/js?key=""&callback=initMap">
</script>
logs
2017-01-13T15:34:39.920225+00:00 app[web.1]: Report Load (1.3ms) SELECT DISTINCT(tide) FROM "reports" WHERE "reports"."user_id" = $1 [["user_id", 3]]
2017-01-13T15:34:39.944172+00:00 app[web.1]: Location Load (1.0ms) SELECT "locations".* FROM "locations" WHERE "locations"."id" = $1 LIMIT 1 [["id", 15]]
2017-01-13T15:34:39.945545+00:00 app[web.1]: CACHE (0.0ms) SELECT "locations".* FROM "locations" WHERE "locations"."id" = $1 LIMIT 1 [["id", 6]]
2017-01-13T15:34:39.946432+00:00 app[web.1]: CACHE (0.0ms) SELECT "locations".* FROM "locations" WHERE "locations"."id" = $1 LIMIT 1 [["id", 15]]
2017-01-13T15:34:39.938746+00:00 app[web.1]: Location Load (2.7ms) SELECT "locations".* FROM "locations" WHERE "locations"."id" = $1 LIMIT 1 [["id", 6]]
2017-01-13T15:34:39.949118+00:00 app[web.1]: Location Load (0.8ms) SELECT "locations".* FROM "locations" WHERE "locations"."id" = $1 LIMIT 1 [["id", 7]]
2017-01-13T15:34:39.947292+00:00 app[web.1]: CACHE (0.0ms) SELECT "locations".* FROM "locations" WHERE "locations"."id" = $1 LIMIT 1 [["id", 6]]
2017-01-13T15:34:39.954280+00:00 app[web.1]: Rendered layouts/_navbar.html.erb (2.0ms)
2017-01-13T15:34:39.950113+00:00 app[web.1]: CACHE (0.0ms) SELECT "locations".* FROM "locations" WHERE "locations"."id" = $1 LIMIT 1 [["id", 7]]
2017-01-13T15:34:39.950936+00:00 app[web.1]: Rendered reports/index.html.erb within layouts/application (72.2ms)
2017-01-13T15:34:39.954731+00:00 app[web.1]: Completed 200 OK in 98ms (Views: 63.7ms | ActiveRecord: 20.2ms)
2017-01-13T15:34:40.100226+00:00 heroku[router]: at=info method=GET path="/assets/lighthouse2-ad6fdcbcefd4cb9d7254996e97d636d1010a916771ce0142bd8d2c0769f2b70b.jpg" host=currents.herokuapp.com request_id=887c16fd-2968-4772-8a3f-8ab815a033df fwd="199.253.243.3" dyno=web.1 connect=0ms service=1ms status=304 bytes=48
2017-01-13T15:34:41.085541+00:00 heroku[router]: at=info method=GET path="/maps" host=currents.herokuapp.com request_id=9b3b88a2-dd64-4fe0-b14b-c9393f4a1db3 fwd="199.253.243.3" dyno=web.1 connect=1ms service=25ms status=200 bytes=13348
2017-01-13T15:34:41.031038+00:00 app[web.1]: Started GET "/maps" for 199.253.243.3 at 2017-01-13 15:34:41 +0000
2017-01-13T15:34:41.034594+00:00 app[web.1]: Processing by MapsController#index as HTML
2017-01-13T15:34:41.036794+00:00 app[web.1]: User Load (0.8ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["id", 3]]
2017-01-13T15:34:41.048084+00:00 app[web.1]: Report Load (1.0ms) SELECT "reports".* FROM "reports"
2017-01-13T15:34:41.049807+00:00 app[web.1]: Rendered maps/index.html.erb within layouts/application (4.9ms)
2017-01-13T15:34:41.051861+00:00 app[web.1]: Rendered layouts/_navbar.html.erb (1.1ms)
2017-01-13T15:34:41.052294+00:00 app[web.1]: Completed 200 OK in 18ms (Views: 12.8ms | ActiveRecord: 1.8ms)
2017-01-13T15:34:41.220850+00:00 app[web.1]: Started GET "/species_filter?target_species=Any" for 199.253.243.3 at 2017-01-13 15:34:41 +0000
2017-01-13T15:34:41.224007+00:00 app[web.1]: Processing by MapsController#filter_by_species as */*
2017-01-13T15:34:41.224055+00:00 app[web.1]: Parameters: {"target_species"=>"Any"}
2017-01-13T15:34:41.239336+00:00 app[web.1]: User Load (13.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["id", 3]]
2017-01-13T15:34:41.244027+00:00 app[web.1]: Location Load (1.2ms) SELECT "locations".* FROM "locations"
2017-01-13T15:34:41.255948+00:00 app[web.1]: (1.0ms) SELECT AVG("reports"."catch_keepers") AS average_catch_keepers, date AS date FROM "reports" WHERE "reports"."location_id" = $1 AND (date >= '2017-01-06') AND (date < '2017-01-13') GROUP BY "reports"."date" ORDER BY "reports"."date" DESC [["location_id", 1]]
2017-01-13T15:34:41.258770+00:00 app[web.1]: (0.8ms) SELECT AVG("reports"."catch_keepers") AS average_catch_keepers, date AS date FROM "reports" WHERE "reports"."location_id" = $1 AND (date >= '2017-01-05') AND (date < '2017-01-12') GROUP BY "reports"."date" [["location_id", 1]]
2017-01-13T15:34:41.258905+00:00 app[web.1]: ----moving average
2017-01-13T15:34:41.258927+00:00 app[web.1]: 0.0
2017-01-13T15:34:41.258951+00:00 app[web.1]: 0.0
2017-01-13T15:34:41.258931+00:00 app[web.1]: ----previous moving average
2017-01-13T15:34:41.258969+00:00 app[web.1]: ---movingavg
2017-01-13T15:34:41.258999+00:00 app[web.1]: {:movingavg=>0.0, :color=>"#4562A8"}
2017-01-13T15:34:41.261129+00:00 app[web.1]: Report Load (0.8ms) SELECT "reports".* FROM "reports" WHERE "reports"."location_id" = $1 AND (date >= '2017-01-06') AND (date < '2017-01-13') ORDER BY "reports"."date" DESC [["location_id", 1]]
2017-01-13T15:34:41.266026+00:00 app[web.1]: Completed 500 Internal Server Error in 42ms (ActiveRecord: 17.9ms)
2017-01-13T15:34:41.670858+00:00 heroku[router]: at=info method=GET path="/species_filter?target_species=Any" host=currents.herokuapp.com request_id=51400dbb-d5cb-4eef-a0fd-162e96339a1b fwd="199.253.243.3" dyno=web.1 connect=0ms service=424ms status=500 bytes=1669
2017-01-13T15:34:41.639677+00:00 app[web.1]:
2017-01-13T15:34:41.639685+00:00 app[web.1]: NoMethodError (undefined method `each' for #<ActionDispatch::Request::Session:0x007f05c5a61ae0>):
2017-01-13T15:34:41.639686+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.5.1/lib/action_dispatch/http/parameter_filter.rb:51:in `call'
2017-01-13T15:34:41.639686+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.5.1/lib/action_dispatch/http/parameter_filter.rb:11:in `filter'
2017-01-13T15:34:41.639687+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/party_foul-1.5.5/lib/party_foul/issue_renderers/rails.rb:15:in `session'
2017-01-13T15:34:41.639687+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/party_foul-1.5.5/lib/party_foul/issue_renderers/rack.rb:8:in `comment_options'
2017-01-13T15:34:41.639689+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/party_foul-1.5.5/lib/party_foul/exception_handler.rb:31:in `run'
2017-01-13T15:34:41.639688+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/party_foul-1.5.5/lib/party_foul/issue_renderers/base.rb:46:in `comment'
2017-01-13T15:34:41.639688+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/party_foul-1.5.5/lib/party_foul/exception_handler.rb:67:in `update_issue'
2017-01-13T15:34:41.639689+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/party_foul-1.5.5/lib/party_foul/processors/sync.rb:9:in `handle'
2017-01-13T15:34:41.639689+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/party_foul-1.5.5/lib/party_foul/exception_handler.rb:10:in `handle'
2017-01-13T15:34:41.639690+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/party_foul-1.5.5/lib/party_foul/middleware.rb:11:in `rescue in call'
2017-01-13T15:34:41.639691+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/party_foul-1.5.5/lib/party_foul/middleware.rb:8:in `call'
2017-01-13T15:34:41.639691+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/warden-1.2.6/lib/warden/manager.rb:35:in `block in call'
2017-01-13T15:34:41.639692+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/warden-1.2.6/lib/warden/manager.rb:34:in `catch'
2017-01-13T15:34:41.639692+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/warden-1.2.6/lib/warden/manager.rb:34:in `call'
2017-01-13T15:34:41.639693+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/etag.rb:24:in `call'
2017-01-13T15:34:41.639693+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/conditionalget.rb:25:in `call'
2017-01-13T15:34:41.639694+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/head.rb:13:in `call'
2017-01-13T15:34:41.639694+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.5.1/lib/action_dispatch/middleware/params_parser.rb:27:in `call'
2017-01-13T15:34:41.639694+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.5.1/lib/action_dispatch/middleware/flash.rb:260:in `call'
2017-01-13T15:34:41.639695+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/session/abstract/id.rb:225:in `context'
2017-01-13T15:34:41.639695+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/session/abstract/id.rb:220:in `call'
2017-01-13T15:34:41.639696+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.5.1/lib/action_dispatch/middleware/cookies.rb:560:in `call'
2017-01-13T15:34:41.639696+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/activerecord-4.2.5.1/lib/active_record/query_cache.rb:36:in `call'
2017-01-13T15:34:41.639697+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/activerecord-4.2.5.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:653:in `call'
2017-01-13T15:34:41.639697+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.5.1/lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
2017-01-13T15:34:41.639698+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:81:in `run_callbacks'
2017-01-13T15:34:41.639698+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:88:in `__run_callbacks__'
2017-01-13T15:34:41.639698+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:778:in `_run_call_callbacks'
2017-01-13T15:34:41.639699+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.5.1/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
2017-01-13T15:34:41.639699+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.5.1/lib/action_dispatch/middleware/remote_ip.rb:78:in `call'
2017-01-13T15:34:41.639700+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.5.1/lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
2017-01-13T15:34:41.639700+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.5.1/lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
2017-01-13T15:34:41.639700+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/railties-4.2.5.1/lib/rails/rack/logger.rb:38:in `call_app'
2017-01-13T15:34:41.639701+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/railties-4.2.5.1/lib/rails/rack/logger.rb:20:in `block in call'
2017-01-13T15:34:41.639701+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.5.1/lib/active_support/tagged_logging.rb:68:in `block in tagged'
2017-01-13T15:34:41.639701+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.5.1/lib/active_support/tagged_logging.rb:26:in `tagged'
2017-01-13T15:34:41.639702+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.5.1/lib/active_support/tagged_logging.rb:68:in `tagged'
2017-01-13T15:34:41.639702+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/railties-4.2.5.1/lib/rails/rack/logger.rb:20:in `call'
2017-01-13T15:34:41.639707+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/methodoverride.rb:22:in `call'
2017-01-13T15:34:41.639709+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/railties-4.2.5.1/lib/rails/engine.rb:518:in `call'
2017-01-13T15:34:41.639702+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.5.1/lib/action_dispatch/middleware/request_id.rb:21:in `call'
2017-01-13T15:34:41.639707+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/runtime.rb:18:in `call'
2017-01-13T15:34:41.639708+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/sendfile.rb:113:in `call'
2017-01-13T15:34:41.639708+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.5.1/lib/action_dispatch/middleware/static.rb:116:in `call'
2017-01-13T15:34:41.639709+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/railties-4.2.5.1/lib/rails/application.rb:165:in `call'
2017-01-13T15:34:41.639707+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.5.1/lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
2017-01-13T15:34:41.639709+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/content_length.rb:15:in `call'
2017-01-13T15:34:41.639710+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/puma-3.4.0/lib/puma/configuration.rb:224:in `call'
2017-01-13T15:34:41.639711+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/puma-3.4.0/lib/puma/server.rb:271:in `block in run'
2017-01-13T15:34:41.639710+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/puma-3.4.0/lib/puma/server.rb:569:in `handle_request'
2017-01-13T15:34:41.639711+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/puma-3.4.0/lib/puma/server.rb:406:in `process_client'
2017-01-13T15:34:41.639711+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/puma-3.4.0/lib/puma/thread_pool.rb:114:in `call'
2017-01-13T15:34:41.639712+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/puma-3.4.0/lib/puma/thread_pool.rb:114:in `block in spawn_thread'
2017-01-13T15:34:41.639712+00:00 app[web.1]:
2017-01-13T15:34:41.639712+00:00 app[web.1]:
2017-01-13T16:09:59.608738+00:00 heroku[web.1]: Idling
2017-01-13T16:09:59.609122+00:00 heroku[web.1]: State changed from up to down
2017-01-13T16:10:00.308786+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2017-01-13T16:10:00.324473+00:00 app[web.1]: - Gracefully stopping, waiting for requests to finish
2017-01-13T16:10:00.325921+00:00 app[web.1]: === puma shutdown: 2017-01-13 16:10:00 +0000 ===
2017-01-13T16:10:00.325951+00:00 app[web.1]: - Goodbye!
2017-01-13T16:10:00.325992+00:00 app[web.1]: Exiting
2017-01-13T16:10:00.573756+00:00 heroku[web.1]: Process exited with status 0
2 个解决方案
#1
1
Are any jquery type things loading? bootstrap? turbolinks?, etc?
是否有任何jquery类型的东西加载?引导? turbolinks?等?
I'd try sticking a CDN to generic jquery link in there & see what happens ... if that works can you move your stuff to a CDN host just to see if it's something specific.
我会尝试将CDN粘贴到那里的通用jquery链接,看看会发生什么......如果有效,你可以将你的东西移到CDN主机上,看看它是否是特定的东西。
Also, do you have the log files put out there...
另外,你有没有发布的日志文件......
#2
1
The 404 error is due to the inclusion of this file in the application.js //= require map_theme/vendor/jquery.localize
404错误是由于在application.js // = require map_theme / vendor / jquery.localize中包含此文件
Ultimately the issues/500 error was with a piece of code and incorrectly seeding the production db. I had locations where IDs were not the same as dev environment. So the the code was unable to find the files and jquery failed.
最终问题/ 500错误是一段代码和错误播种生产数据库。我的位置ID与开发环境不同。所以代码无法找到文件,jquery失败了。
#1
1
Are any jquery type things loading? bootstrap? turbolinks?, etc?
是否有任何jquery类型的东西加载?引导? turbolinks?等?
I'd try sticking a CDN to generic jquery link in there & see what happens ... if that works can you move your stuff to a CDN host just to see if it's something specific.
我会尝试将CDN粘贴到那里的通用jquery链接,看看会发生什么......如果有效,你可以将你的东西移到CDN主机上,看看它是否是特定的东西。
Also, do you have the log files put out there...
另外,你有没有发布的日志文件......
#2
1
The 404 error is due to the inclusion of this file in the application.js //= require map_theme/vendor/jquery.localize
404错误是由于在application.js // = require map_theme / vendor / jquery.localize中包含此文件
Ultimately the issues/500 error was with a piece of code and incorrectly seeding the production db. I had locations where IDs were not the same as dev environment. So the the code was unable to find the files and jquery failed.
最终问题/ 500错误是一段代码和错误播种生产数据库。我的位置ID与开发环境不同。所以代码无法找到文件,jquery失败了。