0

In an .html.erb file, I have <img src=<%= asset_path "logo.png" %> > and it works fine on the page. I have an integration test that renders this ERB file, and when it gets to rendering that line, the test hangs and the processor usage goes to 100% on one core.

Is this a sprockets bug? Is it likely that I have something else out of place?

Edit: Here's my test:

test 'index' do
  log_in_as(@user, 'pass')
  trans = get transactions_path
end
lmat - Reinstate Monica
  • 7,289
  • 6
  • 48
  • 62
  • 1
    Can you please add the test to the question? Does this happen only with this asset? – max Jan 20 '20 at 14:31
  • @max Thanks for asking. I added the test to the question. I have only written two tests: the one above and `test 'create'`. The latter works fine (`post transactions_path params: { transaction: 'hey' }`). – lmat - Reinstate Monica Jan 20 '20 at 14:48

1 Answers1

0

In the Gemfile, don't use sass-rails. Back then it didn't, but now it issues a "deprecated" warning imploring you to use a different sass implementation. I switched to sassc-rails to good effect on my project, but you may have to do some research to find a suitable replacement.

lmat - Reinstate Monica
  • 7,289
  • 6
  • 48
  • 62