heroku /雪松JavaScript不工作 [英] heroku/cedar javascript not working

查看:163
本文介绍了heroku /雪松JavaScript不工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

不知何故,无法让JavaScript运行:



我试图使用rails 3.2.2,Heroku,Cedar stack。该应用程序在本地运行良好,似乎正在部署到Heroku,但JavaScript拒绝运行。此线程似乎涵盖了类似的问题,但最终没有一个好的解决方案,所以我想再试一次
javascript没有在rails 3.1上运行heroku



我已经将javascript解析为裸最小值如下所示。虽然我没有显示heroku部署日志,但它看起来很好(预编译通过等)。我留下的最小JavaScript做了两件事:在表单上按下输入时发出警报(想要测试所有javascript而不仅仅是jQuery-UI不工作),而另外两个函数支持jQuery-UI

资产管道编译过程看起来很好,即我的js / css在浏览器html链接中可用,我已经查看了萤火虫,并且当我尝试触发时似乎没有任何事情发生的JavaScript(虽然我不是一个专家萤火虫用户...)

任何想法?



谢谢!

Gem档案:
来源'

  gem'rails ','3.2.2'

gempg

组:资产do
gem'sass-rails','〜> 3.2.3'
gem'咖啡栏','〜> 3.2.1'
gem'uglifier','> = 1.0.3'
end

gem'jquery-rails'
gem'devise'

gem'gravatar_image_tag','1.0.0.pre2'
gem'will_paginate'
gem'omniauth'
gem'omniauth-facebook'
gem' fb_graph'
gem'carrierwave'
gem'fog'
gem'mini_magick'
gem'aws-s3',:require => 'aws / s3'
gemnested_form,:git => 'https://github.com/ryanb/nested_form.git'

group:development do
gem'rspec-rails','2.6.1'
gem'annotate ','2.4.0'
gem'faker','0.3.1'
end

group:test do
gem'rspec-rails',' 2.6.1'
gem'webrat','0.7.1'
gem'spork','0.9.0.rc8'
gem'factory_girl_rails','1.0'
end

group:production do
end

application.css

  / * 
* = require_self
* = require_tree。
* = require_tree ../../../vendor/assets/stylesheets
* /

application.js

  //将您的应用程序特定的JavaScript函数和类放在这里
/ / = require jquery
// = require jquery_ujs
// = require jquery -ui
// = require_tree。

var $ = jQuery.noConflict();

//函数阻止提交表单输入
$(function(){
$(input)。not($(:button))。 (evt){
if(evt.keyCode == 13){
alert(enter pressed);
return false;
}
} );
});

//默认标签选项例如显示菜单
$(function(){
$(#tabs)。tabs()
});

// datepicker添加访问形式
$(function(){
$(#visit_visit_date).datepicker({dateFormat:'yy-mm-dd'} );
});

application.html.erb:

 <%= stylesheet_link_tagapplication%> 
<%= javascript_include_tagapplication%>

heroku日志

  2012-03-26T07:44:37 + 00:00 app [web.1]:[2012-03-26 07:44:37] INFO WEBrick :: HTTPServer#start:pid = 1 port = 34422 
2012-03-26T07:44:39 + 00:00 heroku [web.1]:状态从开始更改为
2012-03-26T07:44:46 + 00:00应用[ web.1]:=> Rails 3.2.2应用程序在http://0.0.0.0:34422
2012-03-26T07:44:46 + 00:00 app [web.1]:=>引导WEBrick
2012-03-26T07:44:46 + 00:00 app [web.1]:=>用-d呼叫以分离
2012-03-26T07:44:46 + 00:00 app [web.1]:=> Ctrl-C关闭服务器
2012-03-26T07:44:46 + 00:00 app [web.1]:
2012-03-26T07:44:46 + 00:00 app [web .1]:
2012-03-26T07:44:46 + 00:00 app [web.1]:开始GET/为86.145.200.112于2012-03-26 07:44:46 +0000
2012-03-26T07:44:46 + 00:00 app [web.1]:通过AuthenticationsController#index处理HTML
2012-03-26T07:44:47 + 00:00 app [ web.1]:呈现的布局/ _main_sidebar.html.erb(3.9ms)
2012-03-26T07:44:47 + 00:00应用[web.1]:呈现的认证/ index.html.erb内布局/应用程序(249.3ms)
2012-03-26T07:44:47 + 00:00 app [web.1]:渲染布局/ _css_and_js.html.erb(0.9ms)
2012-03 -26T07:44:47 + 00:00 app [web.1]:渲染布局/ _header.html.erb(12.1ms)
2012-03-26T07:44:47 + 00:00 app [web。 1]:Rendered shared / _flash_box.html.erb(5.5ms)
2012-03-26T07:44:47 + 00:00 app [web.1]:在866ms内完成200 OK(查看:443.0ms | ActiveRecord:66.1ms)
2012-03-26T07:44:47 + 00:00 app [web.1]:渲染布局/ _footer.html.erb(0.9ms)
2012-03-26T07:44:47 + 00:00 app [web.1]:cache:[GET /] miss
2012-03-26T07:44:47 + 00:00 heroku [router]: GET rlog.herokuapp.com/ dyno = web.1 queue = 0 wait = 0ms service = 6822ms status = 200 bytes = 4194
2012-03-26T07:44:47 + 00:00 app [web.1] :cache:[GET /assets/application-5090c5eabae5ecffdf7ce4cba7884c06.css] miss
2012-03-26T07:44:47 + 00:00 heroku [router]:GET rlog.herokuapp.com/assets/application-5090c5eabae5ecffdf7ce4cba7884c06。 css dyno = web.1 queue = 0 wait = 0ms service = 9ms status = 200 bytes = 29028
2012-03-26T07:44:48 + 00:00 app [web.1]:cache:[GET / assets / application-eed65c1aadddd24237c794c315626b08.js] miss
2012-03-26T07:44:48 + 00:00 app [web.1]:cache:[GET /assets/facebook_32-45445447cea198ebc8cc24ce1a99cddc.png] miss
2012-03-26T07:44:48 + 00:00 heroku [router]:GET rlog.herokuapp.com/assets/facebook_32-45445447cea198ebc8cc24ce1a99cddc.png dyno = web.1 queue = 0 wait = 0ms service = 6ms status = 200 bytes = 1681
2012-03-26T07:44:48 + 00:00 app [web.1]:cache:[GET / assets / facebook_64 -654f0f2c1ba7e19e730d497947534230.png] miss
2012-03-26T07:44:48 + 00:00 heroku [router]:GET rlog.herokuapp.com/assets/facebook_64-654f0f2c1ba7e19e730d497947534230.png dyno = web.1 queue = 0 wait = 0ms service = 68ms status = 200 bytes = 3448
2012-03-26T07:44:48 + 00:00 heroku [路由器]:GET rlog.herokuapp.com/assets/application-eed65c1aadddd24237c794c315626b08.js dyno = web.1 queue = 0 wait = 0ms service = 97ms status = 200 bytes = 455343
2012-03-26T07:44:50 + 00:00 app [web.1]:cache:[GET / assets / images /img02.jpg] miss
2012-03-26T07:44:50 + 00:00 heroku [router]:GET rlog.herokuapp.com/assets/images/img03.jpg dyno = web.1 queue = 0 wait = 0ms service = 42ms status = 200 bytes = 824
2012-03-26T07:44:50 + 00:00 app [web.1]:cache:[GET /assets/images/img03.jpg] miss
2012-03-26T07:44:50 + 00:00 heroku [router]:GET rlog.herokuapp.com/assets/images/img02.jpg dyno = web.1 queue = 0 wait = 0ms service = 56ms status = 200 bytes = 17861
2012-03-26T07:45:30 + 00:00 app [web.1]:
2012-03-26T07:45:30 + 00:00 app [web .1]:
2012-03-26T07:45:30 + 00:00 app [web.1]:开始GET/ stores为86.145.200.112于2012-03-26 07:45:30 +0000
2012- 03-26T07:45:30 + 00:00 app [web.1]:通过StoresController#index处理HTML
2012-03-26T07:45:30 + 00:00 app [web.1]:渲染布局/ _main_sidebar.html.erb(1.9ms)
2012-03-26T07:45:30 + 00:00 heroku [路由器]:GET rlog.herokuapp.com/stores dyno = web.1 queue = 0等待= 0ms service = 117ms status = 200 bytes = 3954
2012-03-26T07:45:30 + 00:00 app [web.1]:在布局/应用程序中渲染stores / index.html.erb(70.8ms )
2012-03-26T07:45:30 + 00:00 app [web.1]:渲染布局/ _css_and_js.html.erb(1.6ms)
2012-03-26T07:45:30 +00:00 app [web.1]:渲染共享/ _flash_box.html.erb(0.1ms)
2012-03-26T07:45:30 + 00:00应用[web.1]:渲染布局/ _header.html.erb(1.3ms)
2012-03-26T07:45:30 + 00:00 app [web.1]:呈现的布局/ _footer.html.erb(0.3ms)
2012 -03-26T07:45:30 + 00:00 app [web.1]:在108ms内完成200行(查看:64.2ms | ActiveRecord:22.5ms)
2012-03-26T07:45:30 + 00:00 app [web.1]:cache:[GET / stores] miss
2012-03-26T07:45:30 +00:00 app [web.1]:cache:[GET /assets/application-eed65c1aadddd24237c794c315626b08.js]错过
2012-03-26T07:45:30 + 00:00 app [web.1]:cache :[GET / assets / application-509
0c5eabae5ecffdf7ce4cba7884c06.css]错过
2012-03-26T07:45:30 + 00:00 heroku [路由器]:GET rlog.herokuapp.com/assets/application -5090c5eabae5ecffdf7ce4cba7884c06.css dyno = web.1 queue = 0 wait = 0ms service = 14ms status = 304 bytes = 0
2012-03-26T07:45:30 + 00:00 heroku [路由器]:GET rlog.herokuapp .com / assets / application-eed65c1aadddd24237c794c315626b08.js dyno = web.1 queue = 0 wait = 0ms service = 17ms status = 304 bytes = 0
2012-03-26T07:45:31 + 00:00 app [web .1]:cache:[GET /assets/images/img03.jpg]错过
2012-03-26T07:45:31 + 00:00 heroku [路由器]:GET rlog.herokuapp.com/assets/images /img03.jpg dyno = web.1 queue = 0 wait = 0ms service = 19ms status = 304 bytes = 0
2012-03-26T07:45:31 + 00:00 app [web.1]:cache: [得到ssets / images / img02.jpg] miss
2012-03-26T07:45:31 + 00:00 heroku [router]:GET rlog.herokuapp.com/assets/images/img02.jpg dyno = web.1 queue = 0 wait = 0ms service = 24ms status = 304 bytes = 0
2012-03-26T07:45:32 + 00:00 app [web.1]:
2012-03-26T07:45 :32 + 00:00 app [web.1]:
2012-03-26T07:45:32 + 00:00 app [web.1]:参数:{id=>2}
2012-03-26T07:45:32 + 00:00 app [web.1]:开始GET/ show_rast?id = 2为86.145.200.112于2012-03-26 07:45:32 + 0000
2012-03-26T07:45:32 + 00:00 app [web.1]:通过StoresController#show_rast处理HTML
2012-03-26T07:45:33 + 00:00应用[web.1]:呈现的布局/ _main_sidebar.html.erb(0.9ms)
2012-03-26T07:45:33 + 00:00应用[web.1]:呈现的商店/ show_rast.html.erb (103.6ms)
2012-03-26T07:45:33 + 00:00 app [web.1]:Re
布局布局/ _css_and_js.html.erb(0.7ms)
2012-03-26T07:45:33 + 00:00 app [web.1]:渲染布局/ _header.html.erb(1.2ms)
2012-03-26T07:45:33 + 00 :00 app [web.1]:Rende red shared / _flash_box.html.erb(0.0ms)
2012-03-26T07:45:33 + 00:00 app [web.1]:渲染布局/ _footer.html.erb(0.3ms)
2012-03-26T07:45:33 + 00:00 app [web.1]:在459ms内完成200行(视图:108.9ms | ActiveRecord:177.3ms)
2012-03-26T07:45:33 + 00:00 app [web.1]:cache:[GET / show_rast?id = 2] miss
2012-03-26T07 :45:33 + 00:00 heroku [router]:GET rlog.herokuapp.com/show_rast dyno = web.1 queue = 0 wait = 0ms service = 474ms status = 200 bytes = 37071
2012-03-26T07 :45:38 + 00:00 app [web.1]:
2012-03-26T07:45:38 + 00:00 app [web.1]:
2012-03-26T07:45 :38 + 00:00 app [web.1]:开始GET/ stores为86.145.200.112于2012-03-26 07:45:38 +0000
2012-03-26T07:45:38+ 00:00 app [web.1]:通过StoresController#index处理HTML
2012-03-26T07:45:38 + 00:00 app [web.1]:渲染布局/ _main_sidebar.html.erb
2012-03-26T07:45:38 + 00:00 app [web.1]:渲染共享/ _flash_box.html.erb(0.0ms)
2012-03-26T07:45 :38 + 00:00 app [web.1]:渲染布局/ _header.html.erb(1.3ms)
2012-03-26T07:45:38 + 00:00 app [web.1]:渲染layouts / _footer.html.erb(0.7ms)
2012-03-26T07:45:38 + 00:00 app [web.1]:在20ms内完成200 OK(查看:12.0ms | ActiveRecord:5.3ms )
2012-03-26T07:45:38 + 00:00 app [web.1]:cache:[GET / stores] miss
2012-03-26T07:45:38 + 00:00 app [web.1 ]:在布局/应用程序中呈现stores / index.html.erb(10.7ms)
2012-03-26T07:45:38 + 00:00 app [web.1]:呈现的布局/ _css_and_js.html.erb (0.7ms)
2012-03-26T07:45:38 + 00:00 heroku [router]:GET rlog.herokuapp.com/stores dyno = web.1 queue = 0 wait = 0ms service = 31ms status = 304字节= 0
2012-03-26T07:45:39 + 00:00 app [web.1]:
2012-03-26T07:45:39 + 00:00 app [web.1 ]:
2012-03-26T07:45:39 + 00:00 app [web.1]:在2012年3月26日开始GET/ visits / new?id = 286.145.200.112 07: 45:39 +0000
2012-03-26T07:45:39 + 00:00 app [web.1]:通过VisitsController处理#new as HTML
2012-03-26T07:45:39+ 00:00 app [web.1]:参数:{id=>2}
2012-03-26T07:45:39 + 00:00 app [web.1] _cart_item.html.erb(1.9ms)
2012-03-26T07:45:39 + 00:00 app [web.1]:呈现的访问次数/ _cart.html.erb(2.7ms)
2012 -03-26T07:45:39 + 00:00 app [web.1]:呈现访问/_cart_sidebar.html.erb(3.7ms)
2012-03-26T07:45:39 + 00:00 app [web.1]:渲染共享/ _error_messages.html.erb(0.4ms)
2012-03-26T07:45:39 + 00:00 app [web.1]:渲染访问/ _fields.html.erb(1.2ms)
2012-03-26T07:45:39 + 00:00 app [web.1]:呈现的访问次数/ _rast_tabs.html.erb(133.6ms)
2012-03-26T07:45:39 + 00:00 app [web.1]:呈现的访问次数/ _dish_review_fields.html。 erb(6.6ms)
2012-03-26T07:45:39 + 00:00 app [web.1]:渲染访问/ _picture_fields.html.erb(0.8ms)
2012-03-26T07 :45:39 + 00:00 app [web.1]:在布局/应用程序中呈现visited / new.html.erb(179.6ms)
2012-03-26T07:45:39 + 00:00 app [ (0.7毫秒)
2012-03-26T07:45:39 + 00:00 app [web.1]:呈现的布局/ _header.html.erb(_1):渲染的布局/ _css_and_js.html.erb
2012-03-26T07:45:39 + 00:00 app [web.1]:渲染共享/ _flash_box.html.erb(0.0ms)
2012-03-26T07:45 :39 + 00:00 app [web.1]:渲染布局/ _footer.html.erb(0.3ms)
2012-03-26T07:45:39 + 00:00 app [web.1]:在251ms内完成200 OK(查看:178.5ms | ActiveRecord:19.6ms)
2012-03-26T07:45:39 + 00:00 app [web.1]:cache:[GET / visits / new?id = 2] miss
2012-03 -26T07:45:39 + 00:00 heroku [router]:GET rlog.herokuapp.com/visits/new dyno = web.1 queue = 0 wait = 0ms service = 284ms status = 200 bytes = 54444


我想出了我的问题。我在app / assets / javascripts /文件夹中有一些其他文件(script.aculo.us文件(controls.js,dragdrop.js,effects.js)和prototype.js(来自以前的程序迭代的剩余部分)通过// = require_tree。调用将它们与application.js一起包含在资产管道中sciprt.aculo.us文件似乎已经搞乱了一切



<我现在设法让我的程序工作,我假设我不再需要script.aculo.us(与jquery-ui类似的东西),也不需要prototype.js(现在使用jquery),我错了



Dogbert thx为您提供帮助。


Somehow can't get javascript to run:

Am trying to use rails 3.2.2, Heroku, Cedar stack. The application works fine locally, and seems to be deploying fine to Heroku, but the javascript refuses to run. this thread seemed to cover a similar question but without a good solution in the end so thought i'd try again javascript not running on heroku with rails 3.1

I've stripped down my javascript to the bare minimum as shown below. While i didn't show the heroku deploy log it looks fine (precompile goes through etc.). The minimum javascript i left in does two things: put out an alert when enter is pressed on a form (wanted to test that all javascript and not just jQuery-UI wasn't working) and the other two functions support jQuery-UI

the asset pipeline compilation process looks fine, i.e. my js/css is available in the browser html link, i've looked through firebug and nothing seems to happen when i try to trigger the javascript (although am not an expert firebug user...)

any ideas?

thanks!

Gem file: source 'https://rubygems.org'

gem 'rails', '3.2.2'

gem "pg" 

group :assets do
  gem 'sass-rails',   '~> 3.2.3'
  gem 'coffee-rails', '~> 3.2.1'
  gem 'uglifier', '>= 1.0.3'
end

gem 'jquery-rails'
gem 'devise'

gem 'gravatar_image_tag', '1.0.0.pre2'
gem 'will_paginate'
gem 'omniauth'
gem 'omniauth-facebook'
gem 'fb_graph'
gem 'carrierwave'
gem 'fog'
gem 'mini_magick'
gem 'aws-s3', :require => 'aws/s3'
gem "nested_form", :git => 'https://github.com/ryanb/nested_form.git'

group :development do
  gem 'rspec-rails', '2.6.1'
  gem 'annotate', '2.4.0'
  gem 'faker', '0.3.1'
end

group :test do
  gem 'rspec-rails', '2.6.1'
  gem 'webrat', '0.7.1'
  gem 'spork', '0.9.0.rc8'
  gem 'factory_girl_rails', '1.0'
end

group :production do
end

application.css

/*
 *= require_self
 *= require_tree .
 *= require_tree ../../../vendor/assets/stylesheets
*/

application.js

// Place your application-specific JavaScript functions and classes here
//= require jquery
//= require jquery_ujs
//= require jquery-ui
//= require_tree .

var $ = jQuery.noConflict();

//function to prevent submission of form on enter
$(function() {
  $("input").not( $(":button") ).keypress(function (evt) {
    if (evt.keyCode == 13) {
      alert("enter pressed");
      return false;
    }
  });
});

// default tab option e.g. to show menu
$(function() {
  $("#tabs").tabs()
});

// datepicker in add visit form
$(function() {
  $( "#visit_visit_date" ).datepicker({ dateFormat: 'yy-mm-dd' });
});

application.html.erb:

<%= stylesheet_link_tag "application" %>
<%= javascript_include_tag "application" %>

heroku logs

2012-03-26T07:44:37+00:00 app[web.1]: [2012-03-26 07:44:37] INFO  WEBrick::HTTPServer#start: pid=1 port=34422
2012-03-26T07:44:39+00:00 heroku[web.1]: State changed from starting to up
2012-03-26T07:44:46+00:00 app[web.1]: => Rails 3.2.2 application starting in production on http://0.0.0.0:34422
2012-03-26T07:44:46+00:00 app[web.1]: => Booting WEBrick
2012-03-26T07:44:46+00:00 app[web.1]: => Call with -d to detach
2012-03-26T07:44:46+00:00 app[web.1]: => Ctrl-C to shutdown server
2012-03-26T07:44:46+00:00 app[web.1]: 
2012-03-26T07:44:46+00:00 app[web.1]: 
2012-03-26T07:44:46+00:00 app[web.1]: Started GET "/" for 86.145.200.112 at 2012-03-26 07:44:46 +0000
2012-03-26T07:44:46+00:00 app[web.1]: Processing by AuthenticationsController#index as HTML
2012-03-26T07:44:47+00:00 app[web.1]:   Rendered layouts/_main_sidebar.html.erb (3.9ms)
2012-03-26T07:44:47+00:00 app[web.1]:   Rendered authentications/index.html.erb within layouts/application (249.3ms)
2012-03-26T07:44:47+00:00 app[web.1]:   Rendered layouts/_css_and_js.html.erb (0.9ms)
2012-03-26T07:44:47+00:00 app[web.1]:   Rendered layouts/_header.html.erb (12.1ms)
2012-03-26T07:44:47+00:00 app[web.1]:   Rendered shared/_flash_box.html.erb (5.5ms)
2012-03-26T07:44:47+00:00 app[web.1]: Completed 200 OK in 866ms (Views: 443.0ms | ActiveRecord: 66.1ms)
2012-03-26T07:44:47+00:00 app[web.1]:   Rendered layouts/_footer.html.erb (0.9ms)
2012-03-26T07:44:47+00:00 app[web.1]: cache: [GET /] miss
2012-03-26T07:44:47+00:00 heroku[router]: GET rlog.herokuapp.com/ dyno=web.1 queue=0 wait=0ms service=6822ms status=200 bytes=4194
2012-03-26T07:44:47+00:00 app[web.1]: cache: [GET /assets/application-5090c5eabae5ecffdf7ce4cba7884c06.css] miss
2012-03-26T07:44:47+00:00 heroku[router]: GET rlog.herokuapp.com/assets/application-5090c5eabae5ecffdf7ce4cba7884c06.css dyno=web.1 queue=0 wait=0ms service=9ms status=200 bytes=29028
2012-03-26T07:44:48+00:00 app[web.1]: cache: [GET /assets/application-eed65c1aadddd24237c794c315626b08.js] miss
2012-03-26T07:44:48+00:00 app[web.1]: cache: [GET /assets/facebook_32-45445447cea198ebc8cc24ce1a99cddc.png] miss
2012-03-26T07:44:48+00:00 heroku[router]: GET rlog.herokuapp.com/assets/facebook_32-45445447cea198ebc8cc24ce1a99cddc.png dyno=web.1 queue=0 wait=0ms service=6ms status=200 bytes=1681
2012-03-26T07:44:48+00:00 app[web.1]: cache: [GET /assets/facebook_64-654f0f2c1ba7e19e730d497947534230.png] miss
2012-03-26T07:44:48+00:00 heroku[router]: GET rlog.herokuapp.com/assets/facebook_64-654f0f2c1ba7e19e730d497947534230.png dyno=web.1 queue=0 wait=0ms service=68ms status=200 bytes=3448
2012-03-26T07:44:48+00:00 heroku[router]: GET rlog.herokuapp.com/assets/application-eed65c1aadddd24237c794c315626b08.js dyno=web.1 queue=0 wait=0ms service=97ms status=200 bytes=455343
2012-03-26T07:44:50+00:00 app[web.1]: cache: [GET /assets/images/img02.jpg] miss
2012-03-26T07:44:50+00:00 heroku[router]: GET rlog.herokuapp.com/assets/images/img03.jpg dyno=web.1 queue=0 wait=0ms service=42ms status=200 bytes=824
2012-03-26T07:44:50+00:00 app[web.1]: cache: [GET /assets/images/img03.jpg] miss
2012-03-26T07:44:50+00:00 heroku[router]: GET rlog.herokuapp.com/assets/images/img02.jpg dyno=web.1 queue=0 wait=0ms service=56ms status=200 bytes=17861
2012-03-26T07:45:30+00:00 app[web.1]: 
2012-03-26T07:45:30+00:00 app[web.1]: 
2012-03-26T07:45:30+00:00 app[web.1]: Started GET "/stores" for 86.145.200.112 at 2012-03-26 07:45:30 +0000
2012-03-26T07:45:30+00:00 app[web.1]: Processing by StoresController#index as HTML
2012-03-26T07:45:30+00:00 app[web.1]:   Rendered layouts/_main_sidebar.html.erb (1.9ms)
2012-03-26T07:45:30+00:00 heroku[router]: GET rlog.herokuapp.com/stores dyno=web.1 queue=0 wait=0ms service=117ms status=200 bytes=3954
2012-03-26T07:45:30+00:00 app[web.1]:   Rendered stores/index.html.erb within layouts/application (70.8ms)
2012-03-26T07:45:30+00:00 app[web.1]:   Rendered layouts/_css_and_js.html.erb (1.6ms)
2012-03-26T07:45:30+00:00 app[web.1]:   Rendered shared/_flash_box.html.erb (0.1ms)
2012-03-26T07:45:30+00:00 app[web.1]:   Rendered layouts/_header.html.erb (1.3ms)
2012-03-26T07:45:30+00:00 app[web.1]:   Rendered layouts/_footer.html.erb (0.3ms)
2012-03-26T07:45:30+00:00 app[web.1]: Completed 200 OK in 108ms (Views: 64.2ms | ActiveRecord: 22.5ms)
2012-03-26T07:45:30+00:00 app[web.1]: cache: [GET /stores] miss
2012-03-26T07:45:30+00:00 app[web.1]: cache: [GET /assets/application-eed65c1aadddd24237c794c315626b08.js] miss
2012-03-26T07:45:30+00:00 app[web.1]: cache: [GET /assets/application-509
0c5eabae5ecffdf7ce4cba7884c06.css] miss
2012-03-26T07:45:30+00:00 heroku[router]: GET rlog.herokuapp.com/assets/application-5090c5eabae5ecffdf7ce4cba7884c06.css dyno=web.1 queue=0 wait=0ms service=14ms status=304 bytes=0
2012-03-26T07:45:30+00:00 heroku[router]: GET rlog.herokuapp.com/assets/application-eed65c1aadddd24237c794c315626b08.js dyno=web.1 queue=0 wait=0ms service=17ms status=304 bytes=0
2012-03-26T07:45:31+00:00 app[web.1]: cache: [GET /assets/images/img03.jpg] miss
2012-03-26T07:45:31+00:00 heroku[router]: GET rlog.herokuapp.com/assets/images/img03.jpg dyno=web.1 queue=0 wait=0ms service=19ms status=304 bytes=0
2012-03-26T07:45:31+00:00 app[web.1]: cache: [GET /assets/images/img02.jpg] miss
2012-03-26T07:45:31+00:00 heroku[router]: GET rlog.herokuapp.com/assets/images/img02.jpg dyno=web.1 queue=0 wait=0ms service=24ms status=304 bytes=0
2012-03-26T07:45:32+00:00 app[web.1]: 
2012-03-26T07:45:32+00:00 app[web.1]: 
2012-03-26T07:45:32+00:00 app[web.1]:   Parameters: {"id"=>"2"}
2012-03-26T07:45:32+00:00 app[web.1]: Started GET "/show_rast?id=2" for 86.145.200.112 at 2012-03-26 07:45:32 +0000
2012-03-26T07:45:32+00:00 app[web.1]: Processing by StoresController#show_rast as HTML
2012-03-26T07:45:33+00:00 app[web.1]:   Rendered layouts/_main_sidebar.html.erb (0.9ms)
2012-03-26T07:45:33+00:00 app[web.1]:   Rendered stores/show_rast.html.erb within layouts/application (103.6ms)
2012-03-26T07:45:33+00:00 app[web.1]:   Re
ndered layouts/_css_and_js.html.erb (0.7ms)
2012-03-26T07:45:33+00:00 app[web.1]:   Rendered layouts/_header.html.erb (1.2ms)
2012-03-26T07:45:33+00:00 app[web.1]:   Rendered shared/_flash_box.html.erb (0.0ms)
2012-03-26T07:45:33+00:00 app[web.1]:   Rendered layouts/_footer.html.erb (0.3ms)
2012-03-26T07:45:33+00:00 app[web.1]: Completed 200 OK in 459ms (Views: 108.9ms | ActiveRecord: 177.3ms)
2012-03-26T07:45:33+00:00 app[web.1]: cache: [GET /show_rast?id=2] miss
2012-03-26T07:45:33+00:00 heroku[router]: GET rlog.herokuapp.com/show_rast dyno=web.1 queue=0 wait=0ms service=474ms status=200 bytes=37071
2012-03-26T07:45:38+00:00 app[web.1]: 
2012-03-26T07:45:38+00:00 app[web.1]: 
2012-03-26T07:45:38+00:00 app[web.1]: Started GET "/stores" for 86.145.200.112 at 2012-03-26 07:45:38 +0000
2012-03-26T07:45:38+00:00 app[web.1]: Processing by StoresController#index as HTML
2012-03-26T07:45:38+00:00 app[web.1]:   Rendered layouts/_main_sidebar.html.erb (0.7ms)
2012-03-26T07:45:38+00:00 app[web.1]:   Rendered shared/_flash_box.html.erb (0.0ms)
2012-03-26T07:45:38+00:00 app[web.1]:   Rendered layouts/_header.html.erb (1.3ms)
2012-03-26T07:45:38+00:00 app[web.1]:   Rendered layouts/_footer.html.erb (0.7ms)
2012-03-26T07:45:38+00:00 app[web.1]: Completed 200 OK in 20ms (Views: 12.0ms | ActiveRecord: 5.3ms)
2012-03-26T07:45:38+00:00 app[web.1]: cache: [GET /stores] miss
2012-03-26T07:45:38+00:00 app[web.1]:   Rendered stores/index.html.erb within layouts/application (10.7ms)
2012-03-26T07:45:38+00:00 app[web.1]:   Rendered layouts/_css_and_js.html.erb (0.7ms)
2012-03-26T07:45:38+00:00 heroku[router]: GET rlog.herokuapp.com/stores dyno=web.1 queue=0 wait=0ms service=31ms status=304 bytes=0
2012-03-26T07:45:39+00:00 app[web.1]: 
2012-03-26T07:45:39+00:00 app[web.1]: 
2012-03-26T07:45:39+00:00 app[web.1]: Started GET "/visits/new?id=2" for 86.145.200.112 at 2012-03-26 07:45:39 +0000
2012-03-26T07:45:39+00:00 app[web.1]: Processing by VisitsController#new as HTML
2012-03-26T07:45:39+00:00 app[web.1]:   Parameters: {"id"=>"2"}
2012-03-26T07:45:39+00:00 app[web.1]:   Rendered visits/_cart_item.html.erb (1.9ms)
2012-03-26T07:45:39+00:00 app[web.1]:   Rendered visits/_cart.html.erb (2.7ms)
2012-03-26T07:45:39+00:00 app[web.1]:   Rendered visits/_cart_sidebar.html.erb (3.7ms)
2012-03-26T07:45:39+00:00 app[web.1]:   Rendered shared/_error_messages.html.erb (0.4ms)
2012-03-26T07:45:39+00:00 app[web.1]:   Rendered visits/_fields.html.erb (1.2ms)
2012-03-26T07:45:39+00:00 app[web.1]:   Rendered visits/_rast_tabs.html.erb (133.6ms)
2012-03-26T07:45:39+00:00 app[web.1]:   Rendered visits/_dish_review_fields.html.erb (6.6ms)
2012-03-26T07:45:39+00:00 app[web.1]:   Rendered visits/_picture_fields.html.erb (0.8ms)
2012-03-26T07:45:39+00:00 app[web.1]:   Rendered visits/new.html.erb within layouts/application (179.6ms)
2012-03-26T07:45:39+00:00 app[web.1]:   Rendered layouts/_css_and_js.html.erb (0.7ms)
2012-03-26T07:45:39+00:00 app[web.1]:   Rendered layouts/_header.html.erb (1.3ms)
2012-03-26T07:45:39+00:00 app[web.1]:   Rendered shared/_flash_box.html.erb (0.0ms)
2012-03-26T07:45:39+00:00 app[web.1]:   Rendered layouts/_footer.html.erb (0.3ms)
2012-03-26T07:45:39+00:00 app[web.1]: Completed 200 OK in 251ms (Views: 178.5ms | ActiveRecord: 19.6ms)
2012-03-26T07:45:39+00:00 app[web.1]: cache: [GET /visits/new?id=2] miss
2012-03-26T07:45:39+00:00 heroku[router]: GET rlog.herokuapp.com/visits/new dyno=web.1 queue=0 wait=0ms service=284ms status=200 bytes=54444

解决方案

i figured out my problem. I had a few other files (the script.aculo.us files (controls.js, dragdrop.js, effects.js) and prototype.js in my app/assets/javascripts/ folder (leftovers from a previous iteration of the program) that were getting included in the asset pipeline together with the application.js through the //= require_tree . call. The sciprt.aculo.us files seem to have been messing up things

I've now managed to get my program to work. I am assuming i don't need script.aculo.us anymore (does similar stuff as jquery-ui) nor prototype.js (jquery used now), am i wrong?

Dogbert thx for your help.

这篇关于heroku /雪松JavaScript不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆