I ran Bundle Install as Root. How can I fix this?

I ran Bundle install as root while setting up a droplet. I think it broke the installation as the message said it would. How can I fix this? I believe it might be with a chown to the rails user but I’m not sure about that.


Submit an answer

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!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.


The information provided is a big vague so it’s hard to say exactly what you need to do to fix it. What exactly did you run? If you accidentally ran something like sudo bundle install gems then this can generally be fixed with sudo bundle install --system.

The second command will place the system gems back in their proper location.

If you instead installed a local bundle intended for your software with root permission, you can just delete the bundle directory in your project directory and run the command again (just not as root) to rebuild and re-install the gems.

With a bit more information on what exactly you did though; there might be more specific information available to provide.