1

I know it's related to assets, I do precompile the assets with

bundle exec rake assets:precompile

But the browser gives me 404 for only one javascript (jquery.formalize.min.js) file, which is not generated for some reason. There is however the code for jquery.formalize.min.js inside the precompiled application-xxxxxx.js.

I'm including it with:

<%= javascript_include_tag "formalize/jquery.formalize.min", "main" %>  

And the error message in Chrome looks like:

GET http://example.com/assets/jquery.formalize.min-724f21bf646762e539aa18c8db1d4d43.js 404 (Not Found)

Full path to the formalize js file is app/assets/formalize/jquery.formalize.min.js.

Of course, application.js is loading fine.

<%= javascript_include_tag "application", "main" %>

How do I load the formalize/jquery.formalize.min.js? Thanks.

1
  • I also found the plugin for formalize, but now i'm only curious what I did wrong. Commented Apr 16, 2012 at 21:19

2 Answers 2

1

Check your manifest file, which is app/assets/javascript/application.js by default. The //= entries control what files get pre-processed into the combined file.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks for the tip. I added the formalize in there. re-ran bundle exec rake assets:precompile, still problematic. I'm going to re-read the manual :)
0

This was due to another fact, that Rails above v3 doesn't have somtething like:

config.assets.precompile += %w( *.js *.css )

See this issue for more.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.