staytus icon indicating copy to clipboard operation
staytus copied to clipboard

Missing Assets

Open ghost opened this issue 3 years ago • 4 comments

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

ghost avatar Dec 29 '20 13:12 ghost

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.

CaiusAjiz avatar Dec 30 '20 19:12 CaiusAjiz

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

ghost avatar Dec 31 '20 13:12 ghost

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).

marcelb98 avatar Jan 18 '21 22:01 marcelb98

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

svenniuwe avatar Jan 20 '21 11:01 svenniuwe