Hello,
I’m using a Ruby on Rails droplet for a few weeks. Since yesterday, for no reason, my project has no assets (JS/CSS) anymore… Apparently, it could be related to permission issues on the public folder, but I can’t figure out how to access to server logs :/ Is there a way to confirm this problem, and to fix it? Thank you in advance
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Heya,
You’ll need to access your server logs. Rails logs are usually stored in the log/ directory of your application.
To check these logs, you can access your droplet via SSH and navigate to your Rails application directory. Once there, you can use commands like tail -n 100 log/production.log to view the logs.
If the issue is with file permissions, you can fix it by ensuring that the owner/group of the public folder and its content are correct, and that they have the appropriate read/write permissions. To do this, run the following commands in your application directory:
- sudo chown -R your_user:your_group public
- sudo chmod -R 755 public
Replace your_user and your_group with your appropriate username and group on the droplet.
For more information, please refer to the How To Deploy a Rails App with Puma and Nginx on Ubuntu 18.04 tutorial.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.