testdouble / jasmine-rails

A Jasmine runner for rails projects that's got you covered in both the terminal and the browser
http://rubygems.org/gems/jasmine-rails
MIT License
378 stars 154 forks source link

Could not find file spec/javascripts - Sprockets 3.0.0.beta8 #159

Closed radar closed 9 years ago

radar commented 9 years ago

I have a proof of concept app here: https://github.com/radar/bad-sprockets-bad

Steps to reproduce

  1. Run rake assets:precompile

Expected behaviour

  1. Assets are compiled.
  2. Happiness. May even include actual smiling.

Actual behaviour

  1. It can't find spec/javascripts
  2. Sadness. Definitely includes frowning.

Here's the stacktrace:

Sprockets::FileNotFound: couldn't find file '/Users/ryanbigg/Projects/ntg/bad-sprockets-bad/spec/javascripts'
/Users/ryanbigg/.gem/ruby/2.1.5/gems/sprockets-3.0.0.beta.8/lib/sprockets/resolve.rb:48:in `resolve!'
/Users/ryanbigg/.gem/ruby/2.1.5/gems/sprockets-3.0.0.beta.8/lib/sprockets/context.rb:88:in `resolve'
/Users/ryanbigg/.gem/ruby/2.1.5/gems/sprockets-3.0.0.beta.8/lib/sprockets/legacy.rb:252:in `resolve_with_compat'
/Users/ryanbigg/.gem/ruby/2.1.5/gems/sprockets-3.0.0.beta.8/lib/sprockets/context.rb:111:in `depend_on'
/Users/ryanbigg/.gem/ruby/2.1.5/gems/jasmine-rails-0.10.7/lib/assets/javascripts/jasmine-specs.js.erb:5:in `block in _evaluate_template'
/Users/ryanbigg/.gem/ruby/2.1.5/gems/jasmine-rails-0.10.7/lib/jasmine-rails.rb:122:in `each_dir'
/Users/ryanbigg/.gem/ruby/2.1.5/gems/jasmine-rails-0.10.7/lib/jasmine-rails.rb:76:in `block in each_spec_dir'
/Users/ryanbigg/.gem/ruby/2.1.5/gems/jasmine-rails-0.10.7/lib/jasmine-rails.rb:75:in `each'
/Users/ryanbigg/.gem/ruby/2.1.5/gems/jasmine-rails-0.10.7/lib/jasmine-rails.rb:75:in `each_spec_dir'
/Users/ryanbigg/.gem/ruby/2.1.5/gems/jasmine-rails-0.10.7/lib/assets/javascripts/jasmine-specs.js.erb:4:in `_evaluate_template'
/Users/ryanbigg/.gem/ruby/2.1.5/gems/sprockets-3.0.0.beta.8/lib/sprockets/erb_processor.rb:26:in `call'
/Users/ryanbigg/.gem/ruby/2.1.5/gems/sprockets-3.0.0.beta.8/lib/sprockets/erb_processor.rb:13:in `call'
/Users/ryanbigg/.gem/ruby/2.1.5/gems/sprockets-3.0.0.beta.8/lib/sprockets/autoload_processor.rb:40:in `call'
/Users/ryanbigg/.gem/ruby/2.1.5/gems/sprockets-3.0.0.beta.8/lib/sprockets/processor_utils.rb:63:in `block in call_processors'
/Users/ryanbigg/.gem/ruby/2.1.5/gems/sprockets-3.0.0.beta.8/lib/sprockets/processor_utils.rb:62:in `reverse_each'
/Users/ryanbigg/.gem/ruby/2.1.5/gems/sprockets-3.0.0.beta.8/lib/sprockets/processor_utils.rb:62:in `call_processors'
/Users/ryanbigg/.gem/ruby/2.1.5/gems/sprockets-3.0.0.beta.8/lib/sprockets/loader.rb:100:in `load_asset_by_uri'
/Users/ryanbigg/.gem/ruby/2.1.5/gems/sprockets-3.0.0.beta.8/lib/sprockets/loader.rb:40:in `block in load'
/Users/ryanbigg/.gem/ruby/2.1.5/gems/sprockets-3.0.0.beta.8/lib/sprockets/loader.rb:167:in `fetch_asset_from_dependency_cache'
/Users/ryanbigg/.gem/ruby/2.1.5/gems/sprockets-3.0.0.beta.8/lib/sprockets/loader.rb:33:in `load'
/Users/ryanbigg/.gem/ruby/2.1.5/gems/sprockets-3.0.0.beta.8/lib/sprockets/cached_environment.rb:20:in `block in initialize'
/Users/ryanbigg/.gem/ruby/2.1.5/gems/sprockets-3.0.0.beta.8/lib/sprockets/cached_environment.rb:47:in `yield'
/Users/ryanbigg/.gem/ruby/2.1.5/gems/sprockets-3.0.0.beta.8/lib/sprockets/cached_environment.rb:47:in `load'
/Users/ryanbigg/.gem/ruby/2.1.5/gems/sprockets-3.0.0.beta.8/lib/sprockets/bundle.rb:21:in `block in call'
/Users/ryanbigg/.gem/ruby/2.1.5/gems/sprockets-3.0.0.beta.8/lib/sprockets/utils.rb:183:in `dfs'
/Users/ryanbigg/.gem/ruby/2.1.5/gems/sprockets-3.0.0.beta.8/lib/sprockets/bundle.rb:22:in `call'
/Users/ryanbigg/.gem/ruby/2.1.5/gems/sprockets-3.0.0.beta.8/lib/sprockets/processor_utils.rb:63:in `block in call_processors'
/Users/ryanbigg/.gem/ruby/2.1.5/gems/sprockets-3.0.0.beta.8/lib/sprockets/processor_utils.rb:62:in `reverse_each'
/Users/ryanbigg/.gem/ruby/2.1.5/gems/sprockets-3.0.0.beta.8/lib/sprockets/processor_utils.rb:62:in `call_processors'
/Users/ryanbigg/.gem/ruby/2.1.5/gems/sprockets-3.0.0.beta.8/lib/sprockets/loader.rb:100:in `load_asset_by_uri'
/Users/ryanbigg/.gem/ruby/2.1.5/gems/sprockets-3.0.0.beta.8/lib/sprockets/loader.rb:40:in `block in load'
/Users/ryanbigg/.gem/ruby/2.1.5/gems/sprockets-3.0.0.beta.8/lib/sprockets/loader.rb:167:in `fetch_asset_from_dependency_cache'
/Users/ryanbigg/.gem/ruby/2.1.5/gems/sprockets-3.0.0.beta.8/lib/sprockets/loader.rb:33:in `load'
/Users/ryanbigg/.gem/ruby/2.1.5/gems/sprockets-3.0.0.beta.8/lib/sprockets/cached_environment.rb:20:in `block in initialize'
/Users/ryanbigg/.gem/ruby/2.1.5/gems/sprockets-3.0.0.beta.8/lib/sprockets/cached_environment.rb:47:in `yield'
/Users/ryanbigg/.gem/ruby/2.1.5/gems/sprockets-3.0.0.beta.8/lib/sprockets/cached_environment.rb:47:in `load'
/Users/ryanbigg/.gem/ruby/2.1.5/gems/sprockets-3.0.0.beta.8/lib/sprockets/base.rb:63:in `find_asset'
/Users/ryanbigg/.gem/ruby/2.1.5/gems/sprockets-3.0.0.beta.8/lib/sprockets/base.rb:70:in `find_all_linked_assets'
/Users/ryanbigg/.gem/ruby/2.1.5/gems/sprockets-3.0.0.beta.8/lib/sprockets/manifest.rb:124:in `block in find'
/Users/ryanbigg/.gem/ruby/2.1.5/gems/sprockets-3.0.0.beta.8/lib/sprockets/legacy.rb:113:in `block (2 levels) in logical_paths'
/Users/ryanbigg/.gem/ruby/2.1.5/gems/sprockets-3.0.0.beta.8/lib/sprockets/path_utils.rb:208:in `block in stat_tree'
/Users/ryanbigg/.gem/ruby/2.1.5/gems/sprockets-3.0.0.beta.8/lib/sprockets/path_utils.rb:192:in `block in stat_directory'
/Users/ryanbigg/.gem/ruby/2.1.5/gems/sprockets-3.0.0.beta.8/lib/sprockets/path_utils.rb:189:in `each'
/Users/ryanbigg/.gem/ruby/2.1.5/gems/sprockets-3.0.0.beta.8/lib/sprockets/path_utils.rb:189:in `stat_directory'
/Users/ryanbigg/.gem/ruby/2.1.5/gems/sprockets-3.0.0.beta.8/lib/sprockets/path_utils.rb:207:in `stat_tree'
/Users/ryanbigg/.gem/ruby/2.1.5/gems/sprockets-3.0.0.beta.8/lib/sprockets/legacy.rb:104:in `each'
/Users/ryanbigg/.gem/ruby/2.1.5/gems/sprockets-3.0.0.beta.8/lib/sprockets/legacy.rb:104:in `block in logical_paths'
/Users/ryanbigg/.gem/ruby/2.1.5/gems/sprockets-3.0.0.beta.8/lib/sprockets/legacy.rb:103:in `each'
/Users/ryanbigg/.gem/ruby/2.1.5/gems/sprockets-3.0.0.beta.8/lib/sprockets/legacy.rb:103:in `logical_paths'
/Users/ryanbigg/.gem/ruby/2.1.5/gems/sprockets-3.0.0.beta.8/lib/sprockets/manifest.rb:122:in `find'
/Users/ryanbigg/.gem/ruby/2.1.5/gems/sprockets-3.0.0.beta.8/lib/sprockets/manifest.rb:147:in `compile'
/Users/ryanbigg/.gem/ruby/2.1.5/gems/sprockets-rails-2.2.4/lib/sprockets/rails/task.rb:70:in `block (3 levels) in define'
/Users/ryanbigg/.gem/ruby/2.1.5/gems/sprockets-3.0.0.beta.8/lib/rake/sprocketstask.rb:147:in `with_logger'
/Users/ryanbigg/.gem/ruby/2.1.5/gems/sprockets-rails-2.2.4/lib/sprockets/rails/task.rb:69:in `block (2 levels) in define'
searls commented 9 years ago

Hey Ryan, I'm just about to leave for the airport for vacation for a week so I won't have time to look at this :( :( :(

radar commented 9 years ago

Oh no and I expected you to work strenuously/tirelessly on this until it was fixed ASAP. Actually, no I didn't because I'm not an asshole.

Dude it's open source!! If you've got a vacation to and enjoy your vacation! You deserve it.

<3

On 21 Mar 2015, at 00:06, Justin Searls notifications@github.com wrote:

Hey Ryan, I'm just about to leave for the airport for vacation for a week so I won't have time to look at this :( :( :(

— Reply to this email directly or view it on GitHub.

searls commented 9 years ago

Hey @radar I somehow misread this issue initially; seems like things work fine under Sprockets@2.x ,but this issue is opened just to point out that it doesn't work under Sprockets@3.x?

Sigh.

radar commented 9 years ago

That is correct.

On 9 Apr 2015, at 00:45, Justin Searls notifications@github.com wrote:

Hey @radar I somehow misread this issue initially; seems like things work fine under Sprockets@2.x ,but this issue is opened just to point out that it doesn't work under Sprockets@3.x?

Sigh.

— Reply to this email directly or view it on GitHub.

searls commented 9 years ago

Were you doing a favor and testing sprockets for us or is it coming soon / coupled to Rails 5 maybe?

Curious how much time I should invest in debugging this.

On Mon, Apr 13, 2015 at 12:15 AM, Ryan Bigg notifications@github.com wrote:

That is correct.

On 9 Apr 2015, at 00:45, Justin Searls notifications@github.com wrote:

Hey @radar I somehow misread this issue initially; seems like things work fine under Sprockets@2.x ,but this issue is opened just to point out that it doesn't work under Sprockets@3.x?

Sigh.

— Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub: https://github.com/searls/jasmine-rails/issues/159#issuecomment-92142913

radar commented 9 years ago

I was attempting to use the new version of Sprockets to see if it fixed an issue that I had at the time. (It didn't.) This error popped up in the meantime and I thought to raise an issue to alert you to possible problems with Sprockets 3.

Sprockets 3.0.0 was released two days ago and is now the default in any new Rails application.

searls commented 9 years ago

Heh, well thanks for the heads up even though I squandered it.

On Wed, Apr 15, 2015 at 12:20 AM, Ryan Bigg notifications@github.com wrote:

I was attempting to use the new version of Sprockets to see if it fixed an issue that I had at the time. (It didn't.) This error popped up in the meantime and I thought to raise an issue to alert you to possible problems with Sprockets 3.

Sprockets 3.0.0 was released two days ago and is now the default in any new Rails application.

Reply to this email directly or view it on GitHub: https://github.com/searls/jasmine-rails/issues/159#issuecomment-93183303

arthurnn commented 9 years ago

I just updated to latest sprockets 3.0.2, and it worked:

[arthurnn@ralph bad-sprockets-bad]$ bin/rake assets:precompile
I, [2015-04-27T15:59:41.331971 #27608]  INFO -- : Writing /Users/arthurnn/dev/bad-sprockets-bad/public/assets/jasmine-6d8420ac17d03d520e8e3b737e184ae2f7dddbaeb307311439ba129c21ddda29.css
I, [2015-04-27T15:59:41.341528 #27608]  INFO -- : Writing /Users/arthurnn/dev/bad-sprockets-bad/public/assets/boot-61490ea53568f244f820be0968f7887a199034e14bd42292012b1388b26eccb5.js
I, [2015-04-27T15:59:41.400489 #27608]  INFO -- : Writing /Users/arthurnn/dev/bad-sprockets-bad/public/assets/json2-925947d3d711c4441a9db20f51215fbf5c119d2a3b51cadb2c9031907d8014b5.js
I, [2015-04-27T15:59:41.429016 #27608]  INFO -- : Writing /Users/arthurnn/dev/bad-sprockets-bad/public/assets/jasmine-36ccb16d3b8cb028dbb4ba8678e420e521189afd8d74fe536f6f321c86afeb59.js
I, [2015-04-27T15:59:41.478933 #27608]  INFO -- : Writing /Users/arthurnn/dev/bad-sprockets-bad/public/assets/jasmine-html-049b99fd00a85bdc3b8269b56be1f7e9d1f1cc816c51aeb8f55fce59937ff7bf.js
I, [2015-04-27T15:59:41.730104 #27608]  INFO -- : Writing /Users/arthurnn/dev/bad-sprockets-bad/public/assets/jasmine-specs-6a73f68bbcb6b2f72f30b15933d6a8a314dc84516ab01ed1e970aff74d10e96e.js
I, [2015-04-27T15:59:41.740461 #27608]  INFO -- : Writing /Users/arthurnn/dev/bad-sprockets-bad/public/assets/jasmine-specs-01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b.css

doing more further investigation. seems like version 3.0.0.beta.10 fixed the problem. To be more precise, my guess is that https://github.com/rails/sprockets/commit/896f93c79a024ff70e307c84c49aba227f7f7b87 was the fix for this problem. Anyhow, this can be closed, as it is already fixed in sprockets 3. cc @josh

searls commented 9 years ago

Wow @arthurnn thanks for taking some time out of your day to clear this for us. Truly!

radar commented 9 years ago

Thanks @arthurnn!