下拉切换不适用于 heroku。不知道为什么
dropdown-toggle not working on heroku. Not sure why
我遇到了下拉菜单和 flash[:notices] 没有响应点击的问题。尝试了此处 Why does dropdown-toggle (bootstrap) not work on heroku? 的解决方案及其其他变体。即移动需要 bootstrap 向上但它不起作用。
但是,当我尝试 运行 在本地和 heroku 应用程序中 assets:reset rake 时。 rake 中止,因为不知道如何构建任务 'assets:reset'。
然后我在本地预编译了一个镜头,没有反应,然后我尝试为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)
当我通过这个 How can I reset my asset pipeline in Rails? 挖掘更多信息时,我意识到这是一个陌生的领域。需要建议。
谢谢。
捆绑执行耙assets:precompile
解决了我的问题。
我遇到了下拉菜单和 flash[:notices] 没有响应点击的问题。尝试了此处 Why does dropdown-toggle (bootstrap) not work on heroku? 的解决方案及其其他变体。即移动需要 bootstrap 向上但它不起作用。
但是,当我尝试 运行 在本地和 heroku 应用程序中 assets:reset rake 时。 rake 中止,因为不知道如何构建任务 'assets:reset'。
然后我在本地预编译了一个镜头,没有反应,然后我尝试为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)
当我通过这个 How can I reset my asset pipeline in Rails? 挖掘更多信息时,我意识到这是一个陌生的领域。需要建议。
谢谢。
捆绑执行耙assets:precompile
解决了我的问题。