adamcooke / staytus

💡 An open source solution for publishing the status of your services
http://staytus.co
MIT License
2.17k stars 284 forks source link

Missing Assets #345

Open ghost opened 3 years ago

ghost commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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