Report this

What is the reason for this report?

Rails droplet permission issues with no reason

Posted on April 5, 2019

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!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

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:

  1. sudo chown -R your_user:your_group public
  2. 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.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.