2

所以我刚刚升级到 FontAwesome 4.0。此更改的一部分是引用图标的方式。

你不能再这样做了:<i class="icon-beer"></i>

现在......你必须用 替换iconfa-所以上面现在看起来像这样: <i class="fa fa-beer"></i>

因此,我灵机一动,决定将icon-我项目中对的所有引用替换为fa fa-.

这包括缓存文件、转储文件以及所有样式表、视图等。

现在......当我尝试加载任何页面时,我收到此错误:

ArgumentError at /
dump format error for symbol(0x69)

日志如下所示:

Completed 500 Internal Server Error in 1060ms

ArgumentError - dump format error for symbol(0x69):
  activesupport (3.2.14) lib/active_support/cache.rb:587:in `value'
  activesupport (3.2.14) lib/active_support/cache.rb:324:in `block in read'
  activesupport (3.2.14) lib/active_support/cache.rb:520:in `instrument'
  activesupport (3.2.14) lib/active_support/cache.rb:315:in `read'
  sprockets (2.2.2) lib/sprockets/caching.rb:70:in `cache_get'
  sprockets (2.2.2) lib/sprockets/caching.rb:45:in `cache_get_hash'
  sprockets (2.2.2) lib/sprockets/caching.rb:15:in `cache_asset'
  sprockets (2.2.2) lib/sprockets/index.rb:92:in `build_asset'
  sprockets (2.2.2) lib/sprockets/base.rb:169:in `find_asset'
  sprockets (2.2.2) lib/sprockets/index.rb:60:in `find_asset'
  sprockets (2.2.2) lib/sprockets/environment.rb:78:in `find_asset'
  sprockets (2.2.2) lib/sprockets/base.rb:177:in `[]'
  actionpack (3.2.14) lib/sprockets/helpers/rails_helper.rb:126:in `asset_for'
  actionpack (3.2.14) lib/sprockets/helpers/rails_helper.rb:44:in `block in stylesheet_link_tag'
  actionpack (3.2.14) lib/sprockets/helpers/rails_helper.rb:43:in `stylesheet_link_tag'
  app/views/layouts/application.html.erb:7:in `_app_views_layouts_application_html_erb___3926009726657617670_70158405610280'
  actionpack (3.2.14) lib/action_view/template.rb:145:in `block in render'
  activesupport (3.2.14) lib/active_support/notifications.rb:125:in `instrument'
  actionpack (3.2.14) lib/action_view/template.rb:143:in `render'
  rack-mini-profiler (0.1.31) Ruby/lib/mini_profiler/profiling_methods.rb:108:in `block in profile_method'
  actionpack (3.2.14) lib/action_view/renderer/template_renderer.rb:60:in `render_with_layout'
  actionpack (3.2.14) lib/action_view/renderer/template_renderer.rb:46:in `render_template'
  actionpack (3.2.14) lib/action_view/renderer/template_renderer.rb:19:in `render'
  newrelic_rpm (3.6.8.168) lib/new_relic/agent/instrumentation/rails3/action_controller.rb:160:in `block in render_with_newrelic'
  newrelic_rpm (3.6.8.168) lib/new_relic/agent/method_tracer.rb:259:in `trace_execution_scoped'
  newrelic_rpm (3.6.8.168) lib/new_relic/agent/instrumentation/rails3/action_controller.rb:159:in `render_with_newrelic'
  actionpack (3.2.14) lib/action_view/renderer/renderer.rb:36:in `render_template'
  actionpack (3.2.14) lib/action_view/renderer/renderer.rb:17:in `render'
  actionpack (3.2.14) lib/abstract_controller/rendering.rb:110:in `_render_template'
  actionpack (3.2.14) lib/action_controller/metal/streaming.rb:225:in `_render_template'
  actionpack (3.2.14) lib/abstract_controller/rendering.rb:103:in `render_to_body'
  actionpack (3.2.14) lib/action_controller/metal/renderers.rb:28:in `render_to_body'
  actionpack (3.2.14) lib/action_controller/metal/compatibility.rb:50:in `render_to_body'
  actionpack (3.2.14) lib/abstract_controller/rendering.rb:88:in `render'
  actionpack (3.2.14) lib/action_controller/metal/rendering.rb:16:in `render'
  actionpack (3.2.14) lib/action_controller/metal/instrumentation.rb:40:in `block (2 levels) in render'
  activesupport (3.2.14) lib/active_support/core_ext/benchmark.rb:5:in `block in ms'
  /me/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/benchmark.rb:296:in `realtime'
  activesupport (3.2.14) lib/active_support/core_ext/benchmark.rb:5:in `ms'
  actionpack (3.2.14) lib/action_controller/metal/instrumentation.rb:40:in `block in render'
  actionpack (3.2.14) lib/action_controller/metal/instrumentation.rb:83:in `cleanup_view_runtime'
  activerecord (3.2.14) lib/active_record/railties/controller_runtime.rb:24:in `cleanup_view_runtime'
  actionpack (3.2.14) lib/action_controller/metal/instrumentation.rb:39:in `render'
  remotipart (1.2.1) lib/remotipart/render_overrides.rb:14:in `render_with_remotipart'
  actionpack (3.2.14) lib/action_controller/metal/implicit_render.rb:10:in `default_render'
  actionpack (3.2.14) lib/action_controller/metal/implicit_render.rb:5:in `send_action'
  actionpack (3.2.14) lib/abstract_controller/base.rb:167:in `process_action'
  actionpack (3.2.14) lib/action_controller/metal/rendering.rb:10:in `process_action'
  actionpack (3.2.14) lib/abstract_controller/callbacks.rb:18:in `block in process_action'
  activesupport (3.2.14) lib/active_support/callbacks.rb:436:in `_run__3106556048525796011__process_action__1470226244061007336__callbacks'
  activesupport (3.2.14) lib/active_support/callbacks.rb:405:in `__run_callback'
  activesupport (3.2.14) lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks'
  activesupport (3.2.14) lib/active_support/callbacks.rb:81:in `run_callbacks'
  actionpack (3.2.14) lib/abstract_controller/callbacks.rb:17:in `process_action'
  actionpack (3.2.14) lib/action_controller/metal/rescue.rb:29:in `process_action'
  actionpack (3.2.14) lib/action_controller/metal/instrumentation.rb:30:in `block in process_action'
  activesupport (3.2.14) lib/active_support/notifications.rb:123:in `block in instrument'
  activesupport (3.2.14) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
  activesupport (3.2.14) lib/active_support/notifications.rb:123:in `instrument'
  actionpack (3.2.14) lib/action_controller/metal/instrumentation.rb:29:in `process_action'
  actionpack (3.2.14) lib/action_controller/metal/params_wrapper.rb:207:in `process_action'
  activerecord (3.2.14) lib/active_record/railties/controller_runtime.rb:18:in `process_action'
  newrelic_rpm (3.6.8.168) lib/new_relic/agent/instrumentation/rails3/action_controller.rb:38:in `block in process_action'
  newrelic_rpm (3.6.8.168) lib/new_relic/agent/instrumentation/controller_instrumentation.rb:324:in `perform_action_with_newrelic_trace'
  newrelic_rpm (3.6.8.168) lib/new_relic/agent/instrumentation/rails3/action_controller.rb:37:in `process_action'
  actionpack (3.2.14) lib/abstract_controller/base.rb:121:in `process'
  actionpack (3.2.14) lib/abstract_controller/rendering.rb:45:in `process'
  rack-mini-profiler (0.1.31) Ruby/lib/mini_profiler/profiling_methods.rb:108:in `block in profile_method'
  actionpack (3.2.14) lib/action_controller/metal.rb:203:in `dispatch'
  actionpack (3.2.14) lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'
  actionpack (3.2.14) lib/action_controller/metal.rb:246:in `block in action'
  actionpack (3.2.14) lib/action_dispatch/routing/route_set.rb:73:in `dispatch'
  actionpack (3.2.14) lib/action_dispatch/routing/route_set.rb:36:in `call'
  journey (1.0.4) lib/journey/router.rb:68:in `block in call'
  journey (1.0.4) lib/journey/router.rb:56:in `call'
  actionpack (3.2.14) lib/action_dispatch/routing/route_set.rb:608:in `call'
  rack-pjax (0.7.0) lib/rack/pjax.rb:12:in `call'
  newrelic_rpm (3.6.8.168) lib/new_relic/rack/error_collector.rb:43:in `call'
  newrelic_rpm (3.6.8.168) lib/new_relic/rack/agent_hooks.rb:22:in `call'
  newrelic_rpm (3.6.8.168) lib/new_relic/rack/browser_monitoring.rb:16:in `call'
  bullet (4.6.0) lib/bullet/rack.rb:10:in `call'
  meta_request (0.2.8) lib/meta_request/middlewares/app_request_handler.rb:13:in `call'
  rack-contrib (1.1.0) lib/rack/contrib/response_headers.rb:17:in `call'
  meta_request (0.2.8) lib/meta_request/middlewares/headers.rb:16:in `call'
  meta_request (0.2.8) lib/meta_request/middlewares/meta_request_handler.rb:13:in `call'
  warden (1.2.3) lib/warden/manager.rb:35:in `block in call'
  warden (1.2.3) lib/warden/manager.rb:34:in `call'
  actionpack (3.2.14) lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
  rack (1.4.5) lib/rack/etag.rb:23:in `call'
  rack (1.4.5) lib/rack/conditionalget.rb:25:in `call'
  actionpack (3.2.14) lib/action_dispatch/middleware/head.rb:14:in `call'
  remotipart (1.2.1) lib/remotipart/middleware.rb:27:in `call'
  actionpack (3.2.14) lib/action_dispatch/middleware/params_parser.rb:21:in `call'
  actionpack (3.2.14) lib/action_dispatch/middleware/flash.rb:242:in `call'
  rack (1.4.5) lib/rack/session/abstract/id.rb:210:in `context'
  rack (1.4.5) lib/rack/session/abstract/id.rb:205:in `call'
  actionpack (3.2.14) lib/action_dispatch/middleware/cookies.rb:341:in `call'
  activerecord (3.2.14) lib/active_record/query_cache.rb:64:in `call'
  activerecord (3.2.14) lib/active_record/connection_adapters/abstract/connection_pool.rb:479:in `call'
  actionpack (3.2.14) lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
  activesupport (3.2.14) lib/active_support/callbacks.rb:405:in `_run__1838779961944472927__call__2777002074146462717__callbacks'
  activesupport (3.2.14) lib/active_support/callbacks.rb:405:in `__run_callback'
  activesupport (3.2.14) lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
  activesupport (3.2.14) lib/active_support/callbacks.rb:81:in `run_callbacks'
  actionpack (3.2.14) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
  actionpack (3.2.14) lib/action_dispatch/middleware/reloader.rb:65:in `call'
  actionpack (3.2.14) lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
  better_errors (1.0.1) lib/better_errors/middleware.rb:84:in `protected_app_call'
  better_errors (1.0.1) lib/better_errors/middleware.rb:79:in `better_errors_call'
  better_errors (1.0.1) lib/better_errors/middleware.rb:56:in `call'
  actionpack (3.2.14) lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
  actionpack (3.2.14) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
  railties (3.2.14) lib/rails/rack/logger.rb:32:in `call_app'
  railties (3.2.14) lib/rails/rack/logger.rb:16:in `block in call'
  activesupport (3.2.14) lib/active_support/tagged_logging.rb:22:in `tagged'
  railties (3.2.14) lib/rails/rack/logger.rb:16:in `call'
  quiet_assets (1.0.2) lib/quiet_assets.rb:18:in `call_with_quiet_assets'
  actionpack (3.2.14) lib/action_dispatch/middleware/request_id.rb:22:in `call'
  rack (1.4.5) lib/rack/methodoverride.rb:21:in `call'
  rack (1.4.5) lib/rack/runtime.rb:17:in `call'
  activesupport (3.2.14) lib/active_support/cache/strategy/local_cache.rb:72:in `call'
  rack (1.4.5) lib/rack/lock.rb:15:in `call'
  actionpack (3.2.14) lib/action_dispatch/middleware/static.rb:63:in `call'
  rack-mini-profiler (0.1.31) Ruby/lib/mini_profiler/profiler.rb:278:in `call'
  railties (3.2.14) lib/rails/engine.rb:484:in `call'
  railties (3.2.14) lib/rails/application.rb:231:in `call'
  rack (1.4.5) lib/rack/content_length.rb:14:in `call'
  railties (3.2.14) lib/rails/rack/log_tailer.rb:17:in `call'
  thin (1.5.1) lib/thin/connection.rb:81:in `block in pre_process'
  thin (1.5.1) lib/thin/connection.rb:79:in `pre_process'
  thin (1.5.1) lib/thin/connection.rb:54:in `process'
  thin (1.5.1) lib/thin/connection.rb:39:in `receive_data'
  eventmachine (1.0.3) lib/eventmachine.rb:187:in `run'
  thin (1.5.1) lib/thin/backends/base.rb:63:in `start'
  thin (1.5.1) lib/thin/server.rb:159:in `start'
  rack (1.4.5) lib/rack/handler/thin.rb:13:in `run'
  rack (1.4.5) lib/rack/server.rb:268:in `start'
  railties (3.2.14) lib/rails/commands/server.rb:70:in `start'
  railties (3.2.14) lib/rails/commands.rb:55:in `block in <top (required)>'
  railties (3.2.14) lib/rails/commands.rb:50:in `<top (required)>'
  script/rails:6:in `<main>'

关于如何解决这个问题的想法?

4

3 回答 3

12

这发生在我身上,我猜原因是全局查找和替换在 tmp 目录中乱七八糟,这导致了一些资产编译问题

所以我跑了

rake tmp:clear

问题就消失了。也许这对某人有帮助。

于 2013-11-15T02:45:55.333 回答
1

您应该首先尝试反转该过程,再次替换fa fa-every icon-

之后,您可以尝试再次进行替换,但只能使用您的视图文件夹,该文件夹应包含所有图标标记。

于 2013-10-25T00:04:16.580 回答
0

我遇到了类似的问题,运行 perl -pi -e 用其他东西替换对目录的引用:

 dump format error for symbol(0x73).

在我的情况下,问题原来是我拥有的一些 SASS 变量的文件后缀为“.css.scss”而不是“.scss”,这出于某种原因破坏了整个应用程序。

于 2015-01-14T00:56:55.997 回答