简体   繁体   English

dropdown-toggle在heroku上不起作用。 不知道为什么

[英]dropdown-toggle not working on heroku. Not sure why

I am facing a problem whereby the dropdown menu and also flash[:notices] are not responding to clicks. 我遇到一个问题,即下拉菜单和flash [:notices]均未响应点击。 Tried the solution here Why does dropdown-toggle (bootstrap) not work on heroku? 在此处尝试了解决方案为什么在heroku上下拉下拉菜单(引导程序)不起作用? and other variants of it. 及其其他变体。 ie moving require bootstrap up but it doesnt work. 即移动需要引导,但它不起作用。

However, when I tried to run rake assets:reset locally and in the heroku app. 但是,当我尝试运行rake asset:reset在本地和heroku应用程序中。 The rake is aborted, cause dont know how to build task 'assets:reset'. 耙被中止,导致不知道如何构建任务“ assets:reset”。

Then I gave precompile a shot locally, and there is no response, then I tried doing this for heroku and get the error below. 然后我在本地进行了预编译,没有任何响应,然后我尝试对heroku进行此操作并得到以下错误。

ChickenSmitten:fundspace shengyeong$ heroku run rake assets:reset --app fundspace-session-staging
Running `rake assets:reset` attached to terminal... up, run.4723
rake aborted!
Don't know how to build task 'assets:reset'

(See full trace by running task with --trace)
ChickenSmitten:fundspace shengyeong$ heroku run rake assets:precompile --app fundspace-session-staging
Running `rake assets:precompile` attached to terminal... up, run.6653
DEPRECATION WARNING: The configuration option `config.serve_static_assets` has been renamed to `config.serve_static_files` to clarify its role (it merely enables serving everything in the `public` folder and is unrelated to the asset pipeline). The `serve_static_assets` alias will be removed in Rails 5.0. Please migrate your configuration files accordingly. (called from block in <top (required)> at /app/config/environments/staging.rb:23)
I, [2015-01-16T01:54:48.053698 #3]  INFO -- : Writing /app/public/assets/header-bg-cd982ce270a498410ab553c88745e3ed.jpg
rake aborted!
ExecJS::ProgramError: Unexpected token: punc ({) (line: 15915, col: 8, pos: 458835)

Error
    at new JS_Parse_Error (/tmp/execjs20150116-3-vcxs4ojs:2359:10623)
    at js_error (/tmp/execjs20150116-3-vcxs4ojs:2359:10842)
    at croak (/tmp/execjs20150116-3-vcxs4ojs:2359:19086)
    at token_error (/tmp/execjs20150116-3-vcxs4ojs:2359:19223)
    at unexpected (/tmp/execjs20150116-3-vcxs4ojs:2359:19311)
    at semicolon (/tmp/execjs20150116-3-vcxs4ojs:2359:19784)
    at simple_statement (/tmp/execjs20150116-3-vcxs4ojs:2359:22580)
    at /tmp/execjs20150116-3-vcxs4ojs:2359:20553
    at /tmp/execjs20150116-3-vcxs4ojs:2359:19957
    at /tmp/execjs20150116-3-vcxs4ojs:2359:31968
    at Object.parse (/tmp/execjs20150116-3-vcxs4ojs:2360:152)
    at print (/tmp/execjs20150116-3-vcxs4ojs:2632:24)
  (in /app/app/assets/javascripts/application.js)/app/vendor/bundle/ruby/2.0.0/gems/execjs-2.2.2/lib/execjs/external_runtime.rb:64:in `extract_result'
/app/vendor/bundle/ruby/2.0.0/gems/execjs-2.2.2/lib/execjs/external_runtime.rb:29:in `exec'
/app/vendor/bundle/ruby/2.0.0/gems/uglifier-2.6.1/lib/uglifier.rb:200:in `run_uglifyjs'
/app/vendor/bundle/ruby/2.0.0/gems/uglifier-2.6.1/lib/uglifier.rb:178:in `compile'
/app/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.3/lib/sprockets/uglifier_compressor.rb:25:in `evaluate'
/app/vendor/bundle/ruby/2.0.0/gems/tilt-1.4.1/lib/tilt/template.rb:103:in `render'
/app/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.3/lib/sprockets/context.rb:197:in `block in evaluate'
/app/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.3/lib/sprockets/context.rb:194:in `each'
/app/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.3/lib/sprockets/context.rb:194:in `evaluate'
/app/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.3/lib/sprockets/bundled_asset.rb:25:in `initialize'
/app/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.3/lib/sprockets/base.rb:377:in `new'
/app/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.3/lib/sprockets/base.rb:377:in `build_asset'
/app/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.3/lib/sprockets/index.rb:94:in `block in build_asset'
/app/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.3/lib/sprockets/caching.rb:58:in `cache_asset'
/app/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.3/lib/sprockets/index.rb:93:in `build_asset'
/app/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.3/lib/sprockets/base.rb:287:in `find_asset'
/app/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.3/lib/sprockets/index.rb:61:in `find_asset'
/app/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.3/lib/sprockets/manifest.rb:211:in `block in find_asset'
/app/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.3/lib/sprockets/manifest.rb:257:in `benchmark'
/app/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.3/lib/sprockets/manifest.rb:210:in `find_asset'
/app/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.3/lib/sprockets/manifest.rb:119:in `block in compile'
/app/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.3/lib/sprockets/manifest.rb:118:in `each'
/app/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.3/lib/sprockets/manifest.rb:118:in `compile'
/app/vendor/bundle/ruby/2.0.0/gems/sprockets-rails-2.2.2/lib/sprockets/rails/task.rb:70:in `block (3 levels) in define'
/app/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.3/lib/rake/sprocketstask.rb:146:in `with_logger'
/app/vendor/bundle/ruby/2.0.0/gems/sprockets-rails-2.2.2/lib/sprockets/rails/task.rb:69:in `block (2 levels) in define'
Tasks: TOP => assets:precompile
(See full trace by running task with --trace)
ChickenSmitten:fundspace shengyeong$ rake assets:reset
rake aborted!
Don't know how to build task 'assets:reset'
/Users/shengyeong/.rvm/gems/ruby-2.1.3/bin/ruby_executable_hooks:15:in `eval'
/Users/shengyeong/.rvm/gems/ruby-2.1.3/bin/ruby_executable_hooks:15:in `<main>'
(See full trace by running task with --trace)

When I dig more info like going through this How can I reset my asset pipeline in Rails? 当我像这样深入挖掘更多信息时, 如何在Rails中重置资产管道? , I realized that this is unfamiliar territory. ,我意识到这是陌生的领域。 Need advise. 需要咨询。

Thanks. 谢谢。

bundle exec rake assets:precompile 捆绑执行耙资产:预编译

solved my problem. 解决了我的问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM