我有一个rails应用程序在我以前的机器上运行正常,但在第一次遇到asset_url
或image_tag
时失败并出现无法识别的输入错误(即注释掉一个实例会导致错误进一步向下移动页面)。它似乎适用于涉及资产路径的任何助手。
运行OS X Mountain Lion,我在跟踪下面列出了完整的捆绑包。尝试了几种不同版本的less-rails作为大多数问题的答案,这些问题似乎与我能找到的相似。
应用程序跟踪:
app/helpers/meta_helper.rb:15:in `basic_default_metas'
app/helpers/meta_helper.rb:53:in `meta_helper'
app/views/marketing/index.html.haml:1:in**
完整堆栈跟踪:
less (2.6.0) lib/less/parser.rb:74:in `block (2 levels) in parse'
at finish (less (2.6.0) lib/less/js/lib/less/parser.js:666:28)
at tree.importVisitor.run (less (2.6.0) lib/less/js/lib/less/import-visitor.js:34:22)
at Parser.parser.parse (less (2.6.0) lib/less/js/lib/less/parser.js:675:22)
less (2.6.0) lib/less/parser.rb:64:in `block in parse'
less (2.6.0) lib/less/java_script/v8_context.rb:90:in `block in do_lock'
less (2.6.0) lib/less/java_script/v8_context.rb:88:in `call'
less (2.6.0) lib/less/java_script/v8_context.rb:88:in `Locker'
less (2.6.0) lib/less/java_script/v8_context.rb:88:in `do_lock'
less (2.6.0) lib/less/java_script/v8_context.rb:60:in `lock'
less (2.6.0) lib/less/java_script/v8_context.rb:30:in `exec'
less (2.6.0) lib/less/java_script.rb:26:in `exec'
less (2.6.0) lib/less/parser.rb:63:in `parse'
less-rails (2.7.1) lib/less/rails/template_handlers.rb:18:in `evaluate'
tilt (2.0.2) lib/tilt/template.rb:99:in `render'
sprockets (3.5.2) lib/sprockets/legacy_tilt_processor.rb:25:in `call'
sprockets (3.5.2) lib/sprockets/processor_utils.rb:75:in `call_processor'
sprockets (3.5.2) lib/sprockets/processor_utils.rb:57:in `block in call_processors'
sprockets (3.5.2) lib/sprockets/processor_utils.rb:56:in `reverse_each'
sprockets (3.5.2) lib/sprockets/processor_utils.rb:56:in `call_processors'
sprockets (3.5.2) lib/sprockets/loader.rb:134:in `load_from_unloaded'
sprockets (3.5.2) lib/sprockets/loader.rb:60:in `block in load'
sprockets (3.5.2) lib/sprockets/loader.rb:318:in `fetch_asset_from_dependency_cache'
sprockets (3.5.2) lib/sprockets/loader.rb:44:in `load'
sprockets (3.5.2) lib/sprockets/cached_environment.rb:20:in `block in initialize'
sprockets (3.5.2) lib/sprockets/cached_environment.rb:47:in `yield'
sprockets (3.5.2) lib/sprockets/cached_environment.rb:47:in `load'
sprockets (3.5.2) lib/sprockets/bundle.rb:23:in `block in call'
sprockets (3.5.2) lib/sprockets/utils.rb:183:in `dfs'
sprockets (3.5.2) lib/sprockets/bundle.rb:24:in `call'
sprockets (3.5.2) lib/sprockets/processor_utils.rb:75:in `call_processor'
sprockets (3.5.2) lib/sprockets/processor_utils.rb:57:in `block in call_processors'
sprockets (3.5.2) lib/sprockets/processor_utils.rb:56:in `reverse_each'
sprockets (3.5.2) lib/sprockets/processor_utils.rb:56:in `call_processors'
sprockets (3.5.2) lib/sprockets/loader.rb:134:in `load_from_unloaded'
sprockets (3.5.2) lib/sprockets/loader.rb:60:in `block in load'
sprockets (3.5.2) lib/sprockets/loader.rb:318:in `fetch_asset_from_dependency_cache'
sprockets (3.5.2) lib/sprockets/loader.rb:44:in `load'
sprockets (3.5.2) lib/sprockets/cached_environment.rb:20:in `block in initialize'
sprockets (3.5.2) lib/sprockets/cached_environment.rb:47:in `yield'
sprockets (3.5.2) lib/sprockets/cached_environment.rb:47:in `load'
sprockets (3.5.2) lib/sprockets/base.rb:66:in `find_asset'
sprockets (3.5.2) lib/sprockets/base.rb:73:in `find_all_linked_assets'
sprockets (3.5.2) lib/sprockets/manifest.rb:134:in `block in find'
sprockets (3.5.2) lib/sprockets/manifest.rb:133:in `each'
sprockets (3.5.2) lib/sprockets/manifest.rb:133:in `find'
sprockets-rails (3.0.4) lib/sprockets/railtie.rb:49:in `each'
sprockets-rails (3.0.4) lib/sprockets/railtie.rb:49:in `map'
sprockets-rails (3.0.4) lib/sprockets/railtie.rb:49:in `precompiled_assets'
sprockets-rails (3.0.4) lib/sprockets/railtie.rb:34:in `asset_precompiled?'
sprockets-rails (3.0.4) lib/sprockets/railtie.rb:214:in `block (3 levels) in <class:Railtie>'
sprockets-rails (3.0.4) lib/sprockets/rails/helper.rb:345:in `call'
sprockets-rails (3.0.4) lib/sprockets/rails/helper.rb:345:in `precompiled?'
sprockets-rails (3.0.4) lib/sprockets/rails/helper.rb:349:in `raise_unless_precompiled_asset'
sprockets-rails (3.0.4) lib/sprockets/rails/helper.rb:323:in `digest_path'
sprockets-rails (3.0.4) lib/sprockets/rails/helper.rb:311:in `asset_path'
sprockets-rails (3.0.4) lib/sprockets/rails/helper.rb:89:in `block in resolve_asset_path'
sprockets-rails (3.0.4) lib/sprockets/rails/helper.rb:229:in `block in resolve_asset'
sprockets-rails (3.0.4) lib/sprockets/rails/helper.rb:228:in `each'
sprockets-rails (3.0.4) lib/sprockets/rails/helper.rb:228:in `detect'
sprockets-rails (3.0.4) lib/sprockets/rails/helper.rb:228:in `resolve_asset'
sprockets-rails (3.0.4) lib/sprockets/rails/helper.rb:88:in `resolve_asset_path'
sprockets-rails (3.0.4) lib/sprockets/rails/helper.rb:78:in `compute_asset_path'
actionview (4.2.1) lib/action_view/helpers/asset_url_helper.rb:135:in `asset_path'
cloudinary (1.1.4) lib/cloudinary/helper.rb:327:in `path_to_asset'
actionview (4.2.1) lib/action_view/helpers/asset_url_helper.rb:162:in `asset_url'
app/helpers/meta_helper.rb:15:in `basic_default_metas'
app/helpers/meta_helper.rb:53:in `meta_helper'
app/views/marketing/index.html.haml:1:in `_app_views_marketing_index_html_haml__1772212176049905241_70363648995000'
actionview (4.2.1) lib/action_view/template.rb:145:in `block in render'
activesupport (4.2.1) lib/active_support/notifications.rb:166:in `instrument'
actionview (4.2.1) lib/action_view/template.rb:333:in `instrument'
actionview (4.2.1) lib/action_view/template.rb:143:in `render'
actionview (4.2.1) lib/action_view/renderer/template_renderer.rb:54:in `block (2 levels) in render_template'
actionview (4.2.1) lib/action_view/renderer/abstract_renderer.rb:39:in `block in instrument'
activesupport (4.2.1) lib/active_support/notifications.rb:164:in `block in instrument'
activesupport (4.2.1) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
activesupport (4.2.1) lib/active_support/notifications.rb:164:in `instrument'
actionview (4.2.1) lib/action_view/renderer/abstract_renderer.rb:39:in `instrument'
actionview (4.2.1) lib/action_view/renderer/template_renderer.rb:53:in `block in render_template'
actionview (4.2.1) lib/action_view/renderer/template_renderer.rb:61:in `render_with_layout'
actionview (4.2.1) lib/action_view/renderer/template_renderer.rb:52:in `render_template'
actionview (4.2.1) lib/action_view/renderer/template_renderer.rb:14:in `render'
actionview (4.2.1) lib/action_view/renderer/renderer.rb:42:in `render_template'
actionview (4.2.1) lib/action_view/renderer/renderer.rb:23:in `render'
actionview (4.2.1) lib/action_view/rendering.rb:100:in `_render_template'
actionpack (4.2.1) lib/action_controller/metal/streaming.rb:217:in `_render_template'
actionview (4.2.1) lib/action_view/rendering.rb:83:in `render_to_body'
actionpack (4.2.1) lib/action_controller/metal/rendering.rb:32:in `render_to_body'
actionpack (4.2.1) lib/action_controller/metal/renderers.rb:37:in `render_to_body'
actionpack (4.2.1) lib/abstract_controller/rendering.rb:25:in `render'
actionpack (4.2.1) lib/action_controller/metal/rendering.rb:16:in `render'
actionpack (4.2.1) lib/action_controller/metal/instrumentation.rb:44:in `block (2 levels) in render'
activesupport (4.2.1) lib/active_support/core_ext/benchmark.rb:12:in `block in ms'
/Users/padraigflood/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/benchmark.rb:294:in `realtime'
activesupport (4.2.1) lib/active_support/core_ext/benchmark.rb:12:in `ms'
actionpack (4.2.1) lib/action_controller/metal/instrumentation.rb:44:in `block in render'
actionpack (4.2.1) lib/action_controller/metal/instrumentation.rb:87:in `cleanup_view_runtime'
activerecord (4.2.1) lib/active_record/railties/controller_runtime.rb:25:in `cleanup_view_runtime'
actionpack (4.2.1) lib/action_controller/metal/instrumentation.rb:43:in `render'
actionpack (4.2.1) lib/action_controller/metal/implicit_render.rb:10:in `default_render'
actionpack (4.2.1) lib/action_controller/metal/implicit_render.rb:5:in `send_action'
actionpack (4.2.1) lib/abstract_controller/base.rb:198:in `process_action'
actionpack (4.2.1) lib/action_controller/metal/rendering.rb:10:in `process_action'
actionpack (4.2.1) lib/abstract_controller/callbacks.rb:20:in `block in process_action'
activesupport (4.2.1) lib/active_support/callbacks.rb:117:in `call'
activesupport (4.2.1) lib/active_support/callbacks.rb:117:in `call'
activesupport (4.2.1) lib/active_support/callbacks.rb:555:in `block (2 levels) in compile'
activesupport (4.2.1) lib/active_support/callbacks.rb:505:in `call'
activesupport (4.2.1) lib/active_support/callbacks.rb:505:in `call'
activesupport (4.2.1) lib/active_support/callbacks.rb:92:in `_run_callbacks'
activesupport (4.2.1) lib/active_support/callbacks.rb:776:in `_run_process_action_callbacks'
activesupport (4.2.1) lib/active_support/callbacks.rb:81:in `run_callbacks'
actionpack (4.2.1) lib/abstract_controller/callbacks.rb:19:in `process_action'
actionpack (4.2.1) lib/action_controller/metal/rescue.rb:29:in `process_action'
actionpack (4.2.1) lib/action_controller/metal/instrumentation.rb:32:in `block in process_action'
activesupport (4.2.1) lib/active_support/notifications.rb:164:in `block in instrument'
activesupport (4.2.1) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
activesupport (4.2.1) lib/active_support/notifications.rb:164:in `instrument'
actionpack (4.2.1) lib/action_controller/metal/instrumentation.rb:30:in `process_action'
actionpack (4.2.1) lib/action_controller/metal/params_wrapper.rb:250:in `process_action'
activerecord (4.2.1) lib/active_record/railties/controller_runtime.rb:18:in `process_action'
actionpack (4.2.1) lib/abstract_controller/base.rb:137:in `process'
actionview (4.2.1) lib/action_view/rendering.rb:30:in `process'
actionpack (4.2.1) lib/action_controller/metal.rb:196:in `dispatch'
actionpack (4.2.1) lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'
actionpack (4.2.1) lib/action_controller/metal.rb:237:in `block in action'
actionpack (4.2.1) lib/action_dispatch/routing/route_set.rb:74:in `call'
actionpack (4.2.1) lib/action_dispatch/routing/route_set.rb:74:in `dispatch'
actionpack (4.2.1) lib/action_dispatch/routing/route_set.rb:43:in `serve'
actionpack (4.2.1) lib/action_dispatch/journey/router.rb:43:in `block in serve'
actionpack (4.2.1) lib/action_dispatch/journey/router.rb:30:in `each'
actionpack (4.2.1) lib/action_dispatch/journey/router.rb:30:in `serve'
actionpack (4.2.1) lib/action_dispatch/routing/route_set.rb:819:in `call'
warden (1.2.6) lib/warden/manager.rb:35:in `block in call'
warden (1.2.6) lib/warden/manager.rb:34:in `catch'
warden (1.2.6) lib/warden/manager.rb:34:in `call'
rack (1.6.4) lib/rack/etag.rb:24:in `call'
rack (1.6.4) lib/rack/conditionalget.rb:25:in `call'
rack (1.6.4) lib/rack/head.rb:13:in `call'
actionpack (4.2.1) lib/action_dispatch/middleware/params_parser.rb:27:in `call'
actionpack (4.2.1) lib/action_dispatch/middleware/flash.rb:260:in `call'
rack (1.6.4) lib/rack/session/abstract/id.rb:225:in `context'
rack (1.6.4) lib/rack/session/abstract/id.rb:220:in `call'
actionpack (4.2.1) lib/action_dispatch/middleware/cookies.rb:560:in `call'
activerecord (4.2.1) lib/active_record/query_cache.rb:36:in `call'
activerecord (4.2.1) lib/active_record/connection_adapters/abstract/connection_pool.rb:649:in `call'
activerecord (4.2.1) lib/active_record/migration.rb:378:in `call'
actionpack (4.2.1) lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
activesupport (4.2.1) lib/active_support/callbacks.rb:88:in `call'
activesupport (4.2.1) lib/active_support/callbacks.rb:88:in `_run_callbacks'
activesupport (4.2.1) lib/active_support/callbacks.rb:776:in `_run_call_callbacks'
activesupport (4.2.1) lib/active_support/callbacks.rb:81:in `run_callbacks'
actionpack (4.2.1) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
actionpack (4.2.1) lib/action_dispatch/middleware/reloader.rb:73:in `call'
actionpack (4.2.1) lib/action_dispatch/middleware/remote_ip.rb:78:in `call'
rollbar (2.8.3) lib/rollbar/middleware/rails/rollbar.rb:24:in `block in call'
rollbar (2.8.3) lib/rollbar.rb:948:in `scoped'
rollbar (2.8.3) lib/rollbar/middleware/rails/rollbar.rb:22:in `call'
actionpack (4.2.1) lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
rollbar (2.8.3) lib/rollbar/middleware/rails/show_exceptions.rb:22:in `call_with_rollbar'
web-console (2.3.0) lib/web_console/middleware.rb:28:in `block in call'
web-console (2.3.0) lib/web_console/middleware.rb:18:in `catch'
web-console (2.3.0) lib/web_console/middleware.rb:18:in `call'
actionpack (4.2.1) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
railties (4.2.1) lib/rails/rack/logger.rb:38:in `call_app'
railties (4.2.1) lib/rails/rack/logger.rb:22:in `call'
actionpack (4.2.1) lib/action_dispatch/middleware/request_id.rb:21:in `call'
rack (1.6.4) lib/rack/methodoverride.rb:22:in `call'
rack (1.6.4) lib/rack/runtime.rb:18:in `call'
activesupport (4.2.1) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
rack (1.6.4) lib/rack/lock.rb:17:in `call'
actionpack (4.2.1) lib/action_dispatch/middleware/static.rb:113:in `call'
rack (1.6.4) lib/rack/sendfile.rb:113:in `call'
railties (4.2.1) lib/rails/engine.rb:518:in `call'
railties (4.2.1) lib/rails/application.rb:164:in `call'
puma (3.2.0) lib/puma/configuration.rb:227:in `call'
puma (3.2.0) lib/puma/server.rb:561:in `handle_request'
puma (3.2.0) lib/puma/server.rb:406:in `process_client'
puma (3.2.0) lib/puma/server.rb:271:in `block in run'
puma (3.2.0) lib/puma/thread_pool.rb:111:in `call'
puma (3.2.0) lib/puma/thread_pool.rb:111:in `block in spawn_thread'
软件包:
* CFPropertyList (2.3.2)
* actionmailer (4.2.1)
* actionpack (4.2.1)
* actionview (4.2.1)
* activeadmin (1.0.0.pre2 2f77036)
* activeadmin-select2 (0.1.8 f35b036)
* activejob (4.2.1)
* activemodel (4.2.1)
* activerecord (4.2.1)
* activesupport (4.2.1)
* addressable (2.4.0)
* arbre (1.0.3)
* arel (6.0.3)
* aws_cf_signer (0.1.3)
* babel-source (5.8.35)
* babel-transpiler (0.7.0)
* bcrypt (3.1.11)
* benchmark-ips (2.5.0)
* binding_of_caller (0.7.2)
* bourbon (4.2.6)
* bower-rails (0.10.0 b5367a8)
* builder (3.2.2)
* bundler (1.7.6)
* byebug (8.2.2)
* capybara (2.6.2)
* capybara-screenshot (1.0.12)
* childprocess (0.5.9)
* climate_control (0.0.3)
* cloudinary (1.1.4)
* cocaine (0.5.8)
* coffee-rails (4.1.1)
* coffee-script (2.4.1)
* coffee-script-source (1.10.0)
* commonjs (0.2.7)
* concurrent-ruby (1.0.1)
* connection_pool (2.2.0)
* dalli (2.7.6)
* database_cleaner (1.5.1)
* debug_inspector (0.0.2)
* delayed_job (4.1.1)
* delayed_job_active_record (4.1.0)
* derailed (0.1.0)
* derailed_benchmarks (1.3.1)
* devise (3.5.6)
* diff-lcs (1.2.5)
* dynamic_sitemaps (2.0.0)
* em-websocket (0.5.1)
* erubis (2.7.0)
* es5-shim-rails (4.0.1)
* eventmachine (1.2.0.1)
* excon (0.49.0)
* execjs (2.6.0)
* factory_girl (4.5.0)
* factory_girl_rails (4.6.0)
* faker (1.6.3)
* faraday (0.9.2)
* faraday_middleware (0.10.0)
* feedjira (2.0.0)
* ffi (1.9.10)
* fission (0.5.0)
* fog (1.38.0)
* fog-aliyun (0.1.0)
* fog-atmos (0.1.0)
* fog-aws (0.9.2)
* fog-brightbox (0.10.1)
* fog-cloudatcost (0.1.2)
* fog-core (1.37.0)
* fog-dynect (0.0.3)
* fog-ecloud (0.3.0)
* fog-google (0.1.0)
* fog-json (1.0.2)
* fog-local (0.3.0)
* fog-openstack (0.1.2)
* fog-powerdns (0.1.1)
* fog-profitbricks (0.0.5)
* fog-rackspace (0.1.1)
* fog-radosgw (0.0.5)
* fog-riakcs (0.1.0)
* fog-sakuracloud (1.7.5)
* fog-serverlove (0.1.2)
* fog-softlayer (1.1.0)
* fog-storm_on_demand (0.1.1)
* fog-terremark (0.1.0)
* fog-vmfusion (0.1.0)
* fog-voxel (0.1.0)
* fog-vsphere (0.6.3)
* fog-xenserver (0.2.3)
* fog-xml (0.1.2)
* formatador (0.2.5)
* formtastic (3.1.4)
* formtastic_i18n (0.6.0)
* get_process_mem (0.2.0)
* globalid (0.3.6)
* haml (4.0.7)
* haml-rails (0.9.0)
* has_scope (0.6.0)
* heapy (0.1.2)
* html2haml (2.0.0)
* http_parser.rb (0.6.0)
* httparty (0.13.7)
* i18n (0.7.0)
* icalendar (2.3.0)
* inflecto (0.0.2)
* inherited_resources (1.6.0)
* ipaddress (0.8.3)
* jbuilder (2.4.1)
* jquery-rails (4.1.1)
* jquery-ui-rails (5.0.5)
* json (1.8.3)
* kaminari (0.16.3)
* kiddom_rails_models (0.2.6 8da2a36)
* launchy (2.4.3)
* less (2.6.0)
* less-rails (2.7.1)
* libv8 (3.16.14.13)
* local_time (1.0.3)
* loofah (2.0.3)
* mail (2.6.4)
* markdown-rails (0.2.1)
* memory_profiler (0.9.6)
* metaclass (0.0.4)
* metamagic (3.1.7)
* mime-types (3.0)
* mime-types-data (3.2016.0221)
* mimemagic (0.3.1)
* mini_portile2 (2.0.0)
* minitest (5.8.4)
* mocha (1.1.0)
* modernizr-rails (2.7.1)
* multi_json (1.11.2)
* multi_xml (0.5.5)
* multipart-post (2.0.0)
* mysql2 (0.3.20)
* nokogiri (1.6.7.2)
* non-stupid-digest-assets (1.0.8)
* oj (2.15.0)
* orm_adapter (0.5.0)
* paperclip (5.0.0.beta1)
* pg (0.18.4)
* polyamorous (1.1.0)
* puma (3.2.0)
* puma_worker_killer (0.0.6)
* rack (1.6.4)
* rack-proxy (0.5.17)
* rack-reverse-proxy (0.11.0)
* rack-test (0.6.3)
* rails (4.2.1)
* rails-deprecated_sanitizer (1.0.3)
* rails-dom-testing (1.0.7)
* rails-html-sanitizer (1.0.3)
* rails-jquery-autocomplete (1.0.3)
* rails_12factor (0.0.3)
* rails_serve_static_assets (0.0.5)
* rails_stdout_logging (0.0.5)
* railties (4.2.1)
* rake (11.1.2)
* ransack (1.6.5)
* rbvmomi (1.8.2)
* rdiscount (1.6.8)
* rdoc (4.2.2)
* react-rails (1.6.2)
* react-rails-hot-loader (0.5.0)
* redcarpet (3.3.4)
* ref (2.0.0)
* responders (2.1.2)
* rest-client (1.6.7)
* rollbar (2.8.3)
* rspec-core (3.4.4)
* rspec-expectations (3.4.0)
* rspec-mocks (3.4.1)
* rspec-rails (3.4.2)
* rspec-support (3.4.1)
* rspec_junit_formatter (0.2.2)
* ruby_parser (3.8.1)
* rubykhan (0.1.0)
* rubyzip (1.2.0)
* sass (3.4.22)
* sass-rails (5.0.4)
* sax-machine (1.3.2)
* sdoc (0.4.1)
* select2-rails (4.0.1.1)
* selenium-webdriver (2.53.0)
* sexp_processor (4.7.0)
* spring (1.6.4)
* sprockets (3.5.2)
* sprockets-rails (3.0.4)
* sqlite3 (1.3.11)
* squeel (1.2.3 5542266)
* stackprof (0.2.8)
* stopwords-filter (0.3.1)
* therubyracer (0.12.2)
* thor (0.19.1)
* thread_safe (0.3.5)
* tilt (2.0.2)
* trollop (2.1.2)
* twitter-bootstrap-rails (3.2.2)
* tzinfo (1.2.2)
* uglifier (3.0.0)
* validate_url (1.0.2)
* voight_kampff (1.0.3)
* warden (1.2.6)
* web-console (2.3.0)
* websocket (1.2.2)
* will_paginate (3.0.7)
* xml-simple (1.1.5)
* xpath (2.0.0)
* yui-compressor (0.12.0)
感谢您的帮助!
答案 0 :(得分:0)
这里的问题似乎是由我添加到LESS代码中的两个关键帧动画定义引起的。无论出于何种原因,它都适用于一个但第二个完全抛弃它。
我真的无法弄清楚它是如何造成它的,LESS似乎对一般的关键帧类有点尴尬?