Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sprockets::FileNotFound at / - couldn't find file 'select2' with type 'text/scss' #164

Closed
umeshg opened this issue Aug 9, 2016 · 3 comments

Comments

@umeshg
Copy link

umeshg commented Aug 9, 2016

Ruby: 2.3.1p112
Rails: 5.0.0
Bundler: 1.12.5

After updating to above mentioned environment, app is throwing following exception.

Sprockets::FileNotFound - couldn't find file 'select2' with type 'text/scss':

Full Stack trace:
Sprockets::FileNotFound - couldn't find file 'select2' with type 'text/scss': sprockets (4.0.0.beta2) lib/sprockets/directive_processor.rb:178:inrescue in block in process_directives'
sprockets (4.0.0.beta2) lib/sprockets/directive_processor.rb:175:in block in process_directives' sprockets (4.0.0.beta2) lib/sprockets/directive_processor.rb:174:inprocess_directives'
sprockets (4.0.0.beta2) lib/sprockets/directive_processor.rb:79:in _call' sprockets (4.0.0.beta2) lib/sprockets/directive_processor.rb:64:incall'
sprockets (4.0.0.beta2) lib/sprockets/processor_utils.rb:83:in call_processor' sprockets (4.0.0.beta2) lib/sprockets/processor_utils.rb:65:inblock in call_processors'
sprockets (4.0.0.beta2) lib/sprockets/processor_utils.rb:64:in call_processors' sprockets (4.0.0.beta2) lib/sprockets/loader.rb:147:inload_from_unloaded'
sprockets (4.0.0.beta2) lib/sprockets/loader.rb:58:in block in load' sprockets (4.0.0.beta2) lib/sprockets/loader.rb:323:infetch_asset_from_dependency_cache'
sprockets (4.0.0.beta2) lib/sprockets/loader.rb:42:in load' sprockets (4.0.0.beta2) lib/sprockets/cached_environment.rb:20:inblock in initialize'
sprockets (4.0.0.beta2) lib/sprockets/cached_environment.rb:47:in load' sprockets (4.0.0.beta2) lib/sprockets/source_map_processor.rb:32:inblock in call'
sprockets (4.0.0.beta2) lib/sprockets/source_map_processor.rb:23:in call' sprockets (4.0.0.beta2) lib/sprockets/processor_utils.rb:83:incall_processor'
sprockets (4.0.0.beta2) lib/sprockets/processor_utils.rb:65:in block in call_processors' sprockets (4.0.0.beta2) lib/sprockets/processor_utils.rb:64:incall_processors'
sprockets (4.0.0.beta2) lib/sprockets/loader.rb:147:in load_from_unloaded' sprockets (4.0.0.beta2) lib/sprockets/loader.rb:58:inblock in load'
sprockets (4.0.0.beta2) lib/sprockets/loader.rb:323:in fetch_asset_from_dependency_cache' sprockets (4.0.0.beta2) lib/sprockets/loader.rb:42:inload'
sprockets (4.0.0.beta2) lib/sprockets/cached_environment.rb:20:in block in initialize' sprockets (4.0.0.beta2) lib/sprockets/cached_environment.rb:47:inload'
sprockets (4.0.0.beta2) lib/sprockets/source_map_comment_processor.rb:21:in call' sprockets (4.0.0.beta2) lib/sprockets/processor_utils.rb:83:incall_processor'
sprockets (4.0.0.beta2) lib/sprockets/processor_utils.rb:65:in block in call_processors' sprockets (4.0.0.beta2) lib/sprockets/processor_utils.rb:64:incall_processors'
sprockets (4.0.0.beta2) lib/sprockets/loader.rb:147:in load_from_unloaded' sprockets (4.0.0.beta2) lib/sprockets/loader.rb:58:inblock in load'
sprockets (4.0.0.beta2) lib/sprockets/loader.rb:323:in fetch_asset_from_dependency_cache' sprockets (4.0.0.beta2) lib/sprockets/loader.rb:42:inload'
sprockets (4.0.0.beta2) lib/sprockets/cached_environment.rb:20:in block in initialize' sprockets (4.0.0.beta2) lib/sprockets/cached_environment.rb:47:inload'
sprockets (4.0.0.beta2) lib/sprockets/base.rb:66:in find_asset' sprockets (4.0.0.beta2) lib/sprockets/base.rb:92:in[]'
sprockets-rails (3.1.1) lib/sprockets/rails/helper.rb:338:in find_asset' sprockets-rails (3.1.1) lib/sprockets/rails/helper.rb:330:infind_debug_asset'
sprockets-rails (3.1.1) lib/sprockets/rails/helper.rb:212:in block in lookup_debug_asset' sprockets-rails (3.1.1) lib/sprockets/rails/helper.rb:225:inblock in resolve_asset'
sprockets-rails (3.1.1) lib/sprockets/rails/helper.rb:224:in resolve_asset' sprockets-rails (3.1.1) lib/sprockets/rails/helper.rb:211:inlookup_debug_asset'
sprockets-rails (3.1.1) lib/sprockets/rails/helper.rb:153:in block in stylesheet_link_tag' sprockets-rails (3.1.1) lib/sprockets/rails/helper.rb:152:instylesheet_link_tag'
app/views/site/home.html.erb:2:in block in _app_views_site_home_html_erb___4049320098311539870_70249673506360' actionview (5.0.0) lib/action_view/helpers/capture_helper.rb:39:inblock in capture'
actionview (5.0.0) lib/action_view/helpers/capture_helper.rb:203:in with_output_buffer' actionview (5.0.0) lib/action_view/helpers/capture_helper.rb:39:incapture'
actionview (5.0.0) lib/action_view/helpers/capture_helper.rb:153:in content_for' app/views/site/home.html.erb:1:in_app_views_site_home_html_erb___4049320098311539870_70249673506360'
actionview (5.0.0) lib/action_view/template.rb:158:in block in render' activesupport (5.0.0) lib/active_support/notifications.rb:166:ininstrument'
actionview (5.0.0) lib/action_view/template.rb:348:in instrument' actionview (5.0.0) lib/action_view/template.rb:156:inrender'
actionview (5.0.0) lib/action_view/renderer/template_renderer.rb:54:in block (2 levels) in render_template' actionview (5.0.0) lib/action_view/renderer/abstract_renderer.rb:42:inblock in instrument'
activesupport (5.0.0) lib/active_support/notifications.rb:164:in block in instrument' activesupport (5.0.0) lib/active_support/notifications/instrumenter.rb:21:ininstrument'
activesupport (5.0.0) lib/active_support/notifications.rb:164:in instrument' actionview (5.0.0) lib/action_view/renderer/abstract_renderer.rb:41:ininstrument'
actionview (5.0.0) lib/action_view/renderer/template_renderer.rb:53:in block in render_template' actionview (5.0.0) lib/action_view/renderer/template_renderer.rb:61:inrender_with_layout'
actionview (5.0.0) lib/action_view/renderer/template_renderer.rb:52:in render_template' actionview (5.0.0) lib/action_view/renderer/template_renderer.rb:14:inrender'
actionview (5.0.0) lib/action_view/renderer/renderer.rb:42:in render_template' actionview (5.0.0) lib/action_view/renderer/renderer.rb:23:inrender'
actionview (5.0.0) lib/action_view/rendering.rb:103:in _render_template' actionpack (5.0.0) lib/action_controller/metal/streaming.rb:217:in_render_template'
actionview (5.0.0) lib/action_view/rendering.rb:83:in render_to_body' actionpack (5.0.0) lib/action_controller/metal/rendering.rb:52:inrender_to_body'
actionpack (5.0.0) lib/action_controller/metal/renderers.rb:144:in render_to_body' actionpack (5.0.0) lib/abstract_controller/rendering.rb:26:inrender'
actionpack (5.0.0) lib/action_controller/metal/rendering.rb:36:in render' actionpack (5.0.0) lib/action_controller/metal/instrumentation.rb:44:inblock (2 levels) in render'
activesupport (5.0.0) lib/active_support/core_ext/benchmark.rb:12:in block in ms' /Users/umesh/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/benchmark.rb:308:inrealtime'
activesupport (5.0.0) lib/active_support/core_ext/benchmark.rb:12:in ms' actionpack (5.0.0) lib/action_controller/metal/instrumentation.rb:44:inblock in render'
actionpack (5.0.0) lib/action_controller/metal/instrumentation.rb:87:in cleanup_view_runtime' activerecord (5.0.0) lib/active_record/railties/controller_runtime.rb:25:incleanup_view_runtime'
actionpack (5.0.0) lib/action_controller/metal/instrumentation.rb:43:in render' wicked_pdf (1.0.6) lib/wicked_pdf/pdf_helper.rb:22:inrender_with_wicked_pdf'
actionpack (5.0.0) lib/action_controller/metal/implicit_render.rb:36:in default_render' actionpack (5.0.0) lib/action_controller/metal/basic_implicit_render.rb:4:inblock in send_action'
actionpack (5.0.0) lib/action_controller/metal/basic_implicit_render.rb:4:in send_action' actionpack (5.0.0) lib/abstract_controller/base.rb:188:inprocess_action'
actionpack (5.0.0) lib/action_controller/metal/rendering.rb:30:in process_action' actionpack (5.0.0) lib/abstract_controller/callbacks.rb:20:inblock in process_action'
activesupport (5.0.0) lib/active_support/callbacks.rb:126:in call' activesupport (5.0.0) lib/active_support/callbacks.rb:506:inblock (2 levels) in compile'
activesupport (5.0.0) lib/active_support/callbacks.rb:455:in call' activesupport (5.0.0) lib/active_support/callbacks.rb:101:inrun_callbacks'
activesupport (5.0.0) lib/active_support/callbacks.rb:750:in _run_process_action_callbacks' activesupport (5.0.0) lib/active_support/callbacks.rb:90:inrun_callbacks'
actionpack (5.0.0) lib/abstract_controller/callbacks.rb:19:in process_action' actionpack (5.0.0) lib/action_controller/metal/rescue.rb:20:inprocess_action'
actionpack (5.0.0) lib/action_controller/metal/instrumentation.rb:32:in block in process_action' activesupport (5.0.0) lib/active_support/notifications.rb:164:inblock in instrument'
activesupport (5.0.0) lib/active_support/notifications/instrumenter.rb:21:in instrument' activesupport (5.0.0) lib/active_support/notifications.rb:164:ininstrument'
actionpack (5.0.0) lib/action_controller/metal/instrumentation.rb:30:in process_action' actionpack (5.0.0) lib/action_controller/metal/params_wrapper.rb:248:inprocess_action'
activerecord (5.0.0) lib/active_record/railties/controller_runtime.rb:18:in process_action' actionpack (5.0.0) lib/abstract_controller/base.rb:126:inprocess'
actionview (5.0.0) lib/action_view/rendering.rb:30:in process' actionpack (5.0.0) lib/action_controller/metal.rb:190:indispatch'
actionpack (5.0.0) lib/action_controller/metal.rb:262:in dispatch' actionpack (5.0.0) lib/action_dispatch/routing/route_set.rb:50:indispatch'
actionpack (5.0.0) lib/action_dispatch/routing/route_set.rb:32:in serve' actionpack (5.0.0) lib/action_dispatch/journey/router.rb:39:inblock in serve'
actionpack (5.0.0) lib/action_dispatch/journey/router.rb:26:in serve' actionpack (5.0.0) lib/action_dispatch/routing/route_set.rb:725:incall'
warden (1.2.6) lib/warden/manager.rb:35:in block in call' warden (1.2.6) lib/warden/manager.rb:34:incall'
rack (2.0.1) lib/rack/etag.rb:25:in call' rack (2.0.1) lib/rack/conditional_get.rb:25:incall'
rack (2.0.1) lib/rack/head.rb:12:in call' rack (2.0.1) lib/rack/session/abstract/id.rb:222:incontext'
rack (2.0.1) lib/rack/session/abstract/id.rb:216:in call' actionpack (5.0.0) lib/action_dispatch/middleware/cookies.rb:613:incall'
activerecord (5.0.0) lib/active_record/migration.rb:552:in call' actionpack (5.0.0) lib/action_dispatch/middleware/callbacks.rb:38:inblock in call'
activesupport (5.0.0) lib/active_support/callbacks.rb:97:in __run_callbacks__' activesupport (5.0.0) lib/active_support/callbacks.rb:750:in_run_call_callbacks'
activesupport (5.0.0) lib/active_support/callbacks.rb:90:in run_callbacks' actionpack (5.0.0) lib/action_dispatch/middleware/callbacks.rb:36:incall'
actionpack (5.0.0) lib/action_dispatch/middleware/executor.rb:12:in call' actionpack (5.0.0) lib/action_dispatch/middleware/remote_ip.rb:79:incall'
better_errors (2.1.1) lib/better_errors/middleware.rb:84:in protected_app_call' better_errors (2.1.1) lib/better_errors/middleware.rb:79:inbetter_errors_call'
better_errors (2.1.1) lib/better_errors/middleware.rb:57:in call' actionpack (5.0.0) lib/action_dispatch/middleware/debug_exceptions.rb:49:incall'
actionpack (5.0.0) lib/action_dispatch/middleware/show_exceptions.rb:31:in call' railties (5.0.0) lib/rails/rack/logger.rb:36:incall_app'
railties (5.0.0) lib/rails/rack/logger.rb:24:in block in call' activesupport (5.0.0) lib/active_support/tagged_logging.rb:70:inblock in tagged'
activesupport (5.0.0) lib/active_support/tagged_logging.rb:26:in tagged' activesupport (5.0.0) lib/active_support/tagged_logging.rb:70:intagged'
railties (5.0.0) lib/rails/rack/logger.rb:24:in call' request_store (1.3.1) lib/request_store/middleware.rb:9:incall'
actionpack (5.0.0) lib/action_dispatch/middleware/request_id.rb:24:in call' rack (2.0.1) lib/rack/method_override.rb:22:incall'
rack (2.0.1) lib/rack/runtime.rb:22:in call' activesupport (5.0.0) lib/active_support/cache/strategy/local_cache_middleware.rb:28:incall'
actionpack (5.0.0) lib/action_dispatch/middleware/executor.rb:12:in call' actionpack (5.0.0) lib/action_dispatch/middleware/static.rb:136:incall'
rack (2.0.1) lib/rack/sendfile.rb:111:in call' railties (5.0.0) lib/rails/engine.rb:522:incall'
puma (3.6.0) lib/puma/configuration.rb:225:in call' puma (3.6.0) lib/puma/server.rb:578:inhandle_request'
puma (3.6.0) lib/puma/server.rb:415:in process_client' puma (3.6.0) lib/puma/server.rb:275:inblock in run'
puma (3.6.0) lib/puma/thread_pool.rb:116:in block in spawn_thread'

@pudiva
Copy link

pudiva commented Oct 2, 2016

I'm getting this too, for both scss and js

pudiva added a commit to pudiva/select2-rails that referenced this issue Oct 2, 2016
pudiva added a commit to pudiva/select2-rails that referenced this issue Oct 2, 2016
Looks like a similar change was done and undone several tiems in teh
past...
lesm pushed a commit to lesm/select2-rails that referenced this issue Sep 26, 2017
Looks like a similar change was done and undone several tiems in teh
past...
@javiguajardo
Copy link

Hi there,

I'm running a project that uses:

  • Ruby 2.3.0
  • Rails 5.0.1
  • Bundler 1.16.1
  • select2-rails 4.0.3

I'm not having that issue.

Have you added *= require select2 in the app/assets/stylesheets/application.scss file?

Most of the time, when I've encountered File not found errors in Rails, they have been fixed by restarting the server. Let me know if that fixes the issue.

Regards.

@umeshg
Copy link
Author

umeshg commented Jul 9, 2018

Hey thanks.

Filed this issue long back. Have done so many changes post that, including version upgrades. Looks like one of the upgrades fixed the issue.

Closing this issue as I can see some commits regarding this issue and most people would have upgraded versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants