Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't Load Stylesheet twitter/bootstrap/bootstrap.less - Caching problem? #560

Open
seyonv opened this issue Mar 8, 2017 · 4 comments
Open

Comments

@seyonv
Copy link

seyonv commented Mar 8, 2017

I'm having a problem with loading a stylesheet when using parallel_tests.

I get

Less::Error at /login 'twitter/bootstrap/bootstrap.less' wasn't found

Specifically, there's a problem with the line
@import "twitter/bootstrap/bootstrap" present in my bootstrap_and_overrides.css file.

There's no problem in either my development server or when I simply run tests without parallel_tests. Not entirely sure what the problem could be.

Adding the following line to test.rb( to make sure that each process accesses its own cache), doesn't seem to help
config.cache_store = :file_store, Rails.root.join("tmp","cache","paralleltests_#{Process.pid}_#{ENV['TEST_ENV_NUMBER']}")

@grosser
Copy link
Owner

grosser commented Mar 9, 2017

{Process.pid}_#{ENV['TEST_ENV_NUMBER']} is overkill either one will work ...
must be some kind of shared data store ... run with --verbose and see if the individual commands fail too ...

@seyonv
Copy link
Author

seyonv commented Mar 9, 2017

Yeah I agree you don't need both. Doing either one still fails. Thanks, I'll try with verbose and report back

@seyonv
Copy link
Author

seyonv commented Apr 4, 2017

The solution to this problem of not being able to load LESS stylesheets
$RAILS_ENV=test bundle exec rake assets:precompile

Strangely enough there's no need to run this command if just running rspec, as it will check the asset pipeline if it can't find files in public. But it IS necessary when using parallel specs.

Any idea why this is the case?

@grosser
Copy link
Owner

grosser commented Apr 5, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants