{"action":"created","issue":{"url":"https://api.github.com/repos/middleman/middleman/issues/1908","repository_url":"https://api.github.com/repos/middleman/middleman","labels_url":"https://api.github.com/repos/middleman/middleman/issues/1908/labels{/name}","comments_url":"https://api.github.com/repos/middleman/middleman/issues/1908/comments","events_url":"https://api.github.com/repos/middleman/middleman/issues/1908/events","html_url":"https://github.com/middleman/middleman/issues/1908","id":153814831,"number":1908,"title":"Middleman fails with error when adding bower_components folder inside source/assets/vendor","user":{"login":"rubytastic","id":189632,"avatar_url":"https://avatars.githubusercontent.com/u/189632?v=3","gravatar_id":"","url":"https://api.github.com/users/rubytastic","html_url":"https://github.com/rubytastic","followers_url":"https://api.github.com/users/rubytastic/followers","following_url":"https://api.github.com/users/rubytastic/following{/other_user}","gists_url":"https://api.github.com/users/rubytastic/gists{/gist_id}","starred_url":"https://api.github.com/users/rubytastic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rubytastic/subscriptions","organizations_url":"https://api.github.com/users/rubytastic/orgs","repos_url":"https://api.github.com/users/rubytastic/repos","events_url":"https://api.github.com/users/rubytastic/events{/privacy}","received_events_url":"https://api.github.com/users/rubytastic/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-05-09T16:21:57Z","updated_at":"2016-05-09T16:26:54Z","closed_at":null,"body":"\r\nWhen adding a bower_components folder with serveral assets like bootstrap, font-awesome middleman crashes..\r\n\r\n/sites/gems/tilt-1.4.1/lib/tilt/template.rb:144:in `require': cannot load such file -- less (LoadError)\r\n\r\nI have rebuild a complete site adding and removing files untill this cause showed up.\r\nWhy is it not possible to store bower_components inside the source folder, its the ideal way to manage external dependencies. I use middleman 4 latest version in a clean rvm bundle and did a clean middleman init.\r\n\r\nFull trace\r\n```\r\nfrom /Users/me2/.rvm/gems/ruby-2.3.1@sites/gems/tilt-1.4.1/lib/tilt/template.rb:144:in `require_template_library'\r\n\tfrom /Users/me2/.rvm/gems/ruby-2.3.1@sites/gems/tilt-1.4.1/lib/tilt/css.rb:59:in `initialize_engine'\r\n\tfrom /Users/me2/.rvm/gems/ruby-2.3.1@sites/gems/tilt-1.4.1/lib/tilt/template.rb:56:in `initialize'\r\n\tfrom /Users/me2/.rvm/gems/ruby-2.3.1@sites/gems/tilt-1.4.1/lib/tilt.rb:98:in `new'\r\n\tfrom /Users/me2/.rvm/gems/ruby-2.3.1@sites/gems/tilt-1.4.1/lib/tilt.rb:98:in `block in []'\r\n\tfrom /Users/me2/.rvm/gems/ruby-2.3.1@sites/gems/tilt-1.4.1/lib/tilt.rb:96:in `each'\r\n\tfrom /Users/me2/.rvm/gems/ruby-2.3.1@sites/gems/tilt-1.4.1/lib/tilt.rb:96:in `[]'\r\n\tfrom /Users/me2/.rvm/gems/ruby-2.3.1@sites/gems/middleman-core-4.1.7/lib/middleman-core/sources/source_watcher.rb:322:in `strip_extensions'\r\n\tfrom /Users/me2/.rvm/gems/ruby-2.3.1@sites/gems/contracts-0.13.0/lib/contracts/method_reference.rb:43:in `send_to'\r\n\tfrom /Users/me2/.rvm/gems/ruby-2.3.1@sites/gems/contracts-0.13.0/lib/contracts/call_with.rb:76:in `call_with'\r\n\tfrom /Users/me2/.rvm/gems/ruby-2.3.1@sites/gems/contracts-0.13.0/lib/contracts/method_handler.rb:138:in `block in redefine_method'\r\n\tfrom /Users/me2/.rvm/gems/ruby-2.3.1@sites/gems/middleman-core-4.1.7/lib/middleman-core/sources/source_watcher.rb:310:in `record_file_change'\r\n\tfrom /Users/me2/.rvm/gems/ruby-2.3.1@sites/gems/contracts-0.13.0/lib/contracts/method_reference.rb:43:in `send_to'\r\n\tfrom /Users/me2/.rvm/gems/ruby-2.3.1@sites/gems/contracts-0.13.0/lib/contracts/call_with.rb:76:in `call_with'\r\n\tfrom /Users/me2/.rvm/gems/ruby-2.3.1@sites/gems/contracts-0.13.0/lib/contracts/method_handler.rb:138:in `block in redefine_method'\r\n\tfrom /Users/me2/.rvm/gems/ruby-2.3.1@sites/gems/middleman-core-4.1.7/lib/middleman-core/sources/source_watcher.rb:257:in `block in update'\r\n\tfrom /Users/me2/.rvm/gems/ruby-2.3.1@sites/gems/middleman-core-4.1.7/lib/middleman-core/sources/source_watcher.rb:256:in `each'\r\n\tfrom /Users/me2/.rvm/gems/ruby-2.3.1@sites/gems/middleman-core-4.1.7/lib/middleman-core/sources/source_watcher.rb:256:in `update'\r\n\tfrom /Users/me2/.rvm/gems/ruby-2.3.1@sites/gems/contracts-0.13.0/lib/contracts/method_reference.rb:43:in `send_to'\r\n\tfrom /Users/me2/.rvm/gems/ruby-2.3.1@sites/gems/contracts-0.13.0/lib/contracts/call_with.rb:76:in `call_with'\r\n\tfrom /Users/me2/.rvm/gems/ruby-2.3.1@sites/gems/contracts-0.13.0/lib/contracts/method_handler.rb:138:in `block in redefine_method'\r\n\tfrom /Users/me2/.rvm/gems/ruby-2.3.1@sites/gems/middleman-core-4.1.7/lib/middleman-core/sources/source_watcher.rb:204:in `poll_once!'\r\n\tfrom /Users/me2/.rvm/gems/ruby-2.3.1@sites/gems/contracts-0.13.0/lib/contracts/method_reference.rb:43:in `send_to'\r\n\tfrom /Users/me2/.rvm/gems/ruby-2.3.1@sites/gems/contracts-0.13.0/lib/contracts/call_with.rb:76:in `call_with'\r\n\tfrom /Users/me2/.rvm/gems/ruby-2.3.1@sites/gems/contracts-0.13.0/lib/contracts/method_handler.rb:138:in `block in redefine_method'\r\n\tfrom /Users/me2/.rvm/gems/ruby-2.3.1@sites/gems/middleman-core-4.1.7/lib/middleman-core/sources.rb:239:in `block in poll_once!'\r\n\tfrom /Users/me2/.rvm/gems/ruby-2.3.1@sites/gems/middleman-core-4.1.7/lib/middleman-core/sources.rb:239:in `each'\r\n\tfrom /Users/me2/.rvm/gems/ruby-2.3.1@sites/gems/middleman-core-4.1.7/lib/middleman-core/sources.rb:239:in `reduce'\r\n\tfrom /Users/me2/.rvm/gems/ruby-2.3.1@sites/gems/middleman-core-4.1.7/lib/middleman-core/sources.rb:239:in `poll_once!'\r\n\tfrom /Users/me2/.rvm/gems/ruby-2.3.1@sites/gems/contracts-0.13.0/lib/contracts/method_reference.rb:43:in `send_to'\r\n\tfrom /Users/me2/.rvm/gems/ruby-2.3.1@sites/gems/contracts-0.13.0/lib/contracts/call_with.rb:76:in `call_with'\r\n\tfrom /Users/me2/.rvm/gems/ruby-2.3.1@sites/gems/contracts-0.13.0/lib/contracts/method_handler.rb:138:in `block in redefine_method'\r\n\tfrom /Users/me2/.rvm/gems/ruby-2.3.1@sites/gems/middleman-core-4.1.7/lib/middleman-core/core_extensions/file_watcher.rb:50:in `before_configuration'\r\n\tfrom /Users/me2/.rvm/gems/ruby-2.3.1@sites/gems/contracts-0.13.0/lib/contracts/method_reference.rb:43:in `send_to'\r\n\tfrom /Users/me2/.rvm/gems/ruby-2.3.1@sites/gems/contracts-0.13.0/lib/contracts/call_with.rb:76:in `call_with'\r\n\tfrom /Users/me2/.rvm/gems/ruby-2.3.1@sites/gems/contracts-0.13.0/lib/contracts/method_handler.rb:138:in `block in redefine_method'\r\n\tfrom /Users/me2/.rvm/gems/ruby-2.3.1@sites/gems/middleman-core-4.1.7/lib/middleman-core/callback_manager.rb:57:in `instance_exec'\r\n\tfrom /Users/me2/.rvm/gems/ruby-2.3.1@sites/gems/middleman-core-4.1.7/lib/middleman-core/callback_manager.rb:57:in `block in execute'\r\n\tfrom /Users/me2/.rvm/gems/ruby-2.3.1@sites/gems/hamster-3.0.0/lib/hamster/vector.rb:1316:in `each'\r\n\tfrom /Users/me2/.rvm/gems/ruby-2.3.1@sites/gems/hamster-3.0.0/lib/hamster/vector.rb:1316:in `traverse_depth_first'\r\n\tfrom /Users/me2/.rvm/gems/ruby-2.3.1@sites/gems/hamster-3.0.0/lib/hamster/vector.rb:431:in `each'\r\n\tfrom /Users/me2/.rvm/gems/ruby-2.3.1@sites/gems/middleman-core-4.1.7/lib/middleman-core/callback_manager.rb:57:in `execute'\r\n\tfrom /Users/me2/.rvm/gems/ruby-2.3.1@sites/gems/contracts-0.13.0/lib/contracts/method_reference.rb:43:in `send_to'\r\n\tfrom /Users/me2/.rvm/gems/ruby-2.3.1@sites/gems/contracts-0.13.0/lib/contracts/call_with.rb:76:in `call_with'\r\n\tfrom /Users/me2/.rvm/gems/ruby-2.3.1@sites/gems/contracts-0.13.0/lib/contracts/method_handler.rb:138:in `block in redefine_method'\r\n\tfrom /Users/me2/.rvm/gems/ruby-2.3.1@sites/gems/middleman-core-4.1.7/lib/middleman-core/callback_manager.rb:28:in `block in install_methods!'\r\n\tfrom /Users/me2/.rvm/gems/ruby-2.3.1@sites/gems/middleman-core-4.1.7/lib/middleman-core/application.rb:282:in `initialize'\r\n\tfrom /Users/me2/.rvm/gems/ruby-2.3.1@sites/gems/middleman-cli-4.1.7/bin/middleman:48:in `new'\r\n\tfrom /Users/me2/.rvm/gems/ruby-2.3.1@sites/gems/middleman-cli-4.1.7/bin/middleman:48:in `<top (required)>'\r\n\tfrom /Users/me2/.rvm/gems/ruby-2.3.1@sites/bin/middleman:23:in `load'\r\n\tfrom /Users/me2/.rvm/gems/ruby-2.3.1@sites/bin/middleman:23:in `<main>'\r\n\tfrom /Users/me2/.rvm/gems/ruby-2.3.1@sites/bin/ruby_executable_hooks:15:in `eval'\r\n\tfrom /Users/me2/.rvm/gems/ruby-2.3.1@sites/bin/ruby_executable_hooks:15:in `<main>'\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/middleman/middleman/issues/comments/217914890","html_url":"https://github.com/middleman/middleman/issues/1908#issuecomment-217914890","issue_url":"https://api.github.com/repos/middleman/middleman/issues/1908","id":217914890,"user":{"login":"tdreyno","id":233,"avatar_url":"https://avatars.githubusercontent.com/u/233?v=3","gravatar_id":"","url":"https://api.github.com/users/tdreyno","html_url":"https://github.com/tdreyno","followers_url":"https://api.github.com/users/tdreyno/followers","following_url":"https://api.github.com/users/tdreyno/following{/other_user}","gists_url":"https://api.github.com/users/tdreyno/gists{/gist_id}","starred_url":"https://api.github.com/users/tdreyno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tdreyno/subscriptions","organizations_url":"https://api.github.com/users/tdreyno/orgs","repos_url":"https://api.github.com/users/tdreyno/repos","events_url":"https://api.github.com/users/tdreyno/events{/privacy}","received_events_url":"https://api.github.com/users/tdreyno/received_events","type":"User","site_admin":false},"created_at":"2016-05-09T16:26:54Z","updated_at":"2016-05-09T16:26:54Z","body":"`bower_components` simply has too many files for Middleman to watch. It also, often, includes files you don't want to compile, like your dependencies' source files in `.less`.\r\n\r\n`bower_components` and `node_modules` belong in the root of the project. Use either `middleman-sprockets` or the `import_path` command to integrate these files with your project.\r\n\r\nSprockets will allow you to `require` whichever components you need into JS and CSS.\r\n\r\n`import_path` will simply make those files available as if they were in your source folder, but, without watching the files for changes."}}