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

AbsoluteAssetPathError - Asset names passed to helpers should not include the "/assets/" prefix. #163

Closed gregors closed 9 years ago

gregors commented 9 years ago
1440 Compiling jasmine.self.css to /Users/gregoryostermayr/c5/projects/xxxxxxxxx
1441 Completed 500 Internal Server Error in 259ms (ActiveRecord: 0.0ms)
1442 
1443 Sprockets::Rails::Helper::AbsoluteAssetPathError - Asset names passed to helpers should not include the "/assets/" prefix. Instead of "/assets/jasmine.self.css", use "jasmine.self.css":
1444   sprockets-rails (2.2.4) lib/sprockets/rails/helper.rb:200:in `check_errors_for'
1445   sprockets-rails (2.2.4) lib/sprockets/rails/helper.rb:89:in `asset_path'
1446   actionview (4.2.1) lib/action_view/helpers/asset_url_helper.rb:267:in `stylesheet_path'
1447   actionview (4.2.1) lib/action_view/helpers/asset_tag_helper.rb:100:in `block in stylesheet_link_tag'
1448   actionview (4.2.1) lib/action_view/helpers/asset_tag_helper.rb:96:in `stylesheet_link_tag'
1449   sprockets-rails (2.2.4) lib/sprockets/rails/helper.rb:162:in `block (2 levels) in stylesheet_link_tag'
1450   sprockets-rails (2.2.4) lib/sprockets/rails/helper.rb:161:in `block in stylesheet_link_tag'
1451   sprockets-rails (2.2.4) lib/sprockets/rails/helper.rb:158:in `stylesheet_link_tag'
1452   jasmine-rails (0.10.8) app/views/layouts/jasmine_rails/spec_runner.html.erb:7

Seeing this blow up when run with rails 4.2.1

squaresurf commented 9 years ago

I'm also getting that with rails 4.2.1.

searls commented 9 years ago

Is this possibly due to recent sprockets releases? If you try downgrading sprockets-rails in your gemfile, does that fix it? (thinking of this b/c of #159)

squaresurf commented 9 years ago

@searls I'm using the sprockets gem that is included via my other gems. Do you have a version that is known to work?

searls commented 9 years ago

Try specifying 'sprockets' at '2.12.3' in your Gemfile and see if that fixes it. Wouldn't be surprised if you're pulling in sprockets 3+ and that's what triggered the break.

On Thu, May 28, 2015 at 9:44 AM, Daniel Searles notifications@github.com wrote:

@searls I'm using the sprockets gem that is included via my other gems. Do you have a version that is known to work?

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

squaresurf commented 9 years ago

I'll try that. It is currently locked at 2.3.1.

squaresurf commented 9 years ago

I was wrong, sprockets-rails is locked at 2.3.1. sprockets is locked at 3.1.0. I'll try going backwards.

squaresurf commented 9 years ago

It was all user error on my part. It all works if I make sure to set RAILS_ENV=test