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

Missing Assets #345

Open
ghost opened this issue Dec 29, 2020 · 4 comments
Open

Missing Assets #345

ghost opened this issue Dec 29, 2020 · 4 comments

Comments

@ghost
Copy link

ghost commented Dec 29, 2020

Hello, i installed Staytus and it seems like its missing the assets? Whats the way to fix it? I used https://blog.k.io/atech/install-staytus-tutorial to install staytus

image

@CaiusAjiz
Copy link

CaiusAjiz commented Dec 30, 2020

I've just had the same issue when building a new Staytus instance, when running
sudo -u staytus bundle exec rake staytus:build --trace
are you getting:
** Execute assets:precompile rake aborted!
a few lines down? Looks like it's failing to build the assets.

Pastebin here of the whole thing.

@ghost
Copy link
Author

ghost commented Dec 31, 2020

Not sure if i got that, and im not able to check because i deleted everything. But i think it might successfully did that, but no sure :D

@marcelb98
Copy link

You'll see this behaviour if you're running staytus in a subdirectory of your domain.
You can fix this by setting config.relative_url_root in config/environments/production.rb (see here)

But then all links will still be broken (missing the subdirectory).

@svenniuwe
Copy link

I got this fixed by changing this line into:

in environments/production.rb:
config.assets.js_compressor = Uglifier.new(harmony: true)

and building it again:
sudo -u staytus bundle exec rake staytus:build --trace

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

3 participants