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

April 11, 2016 9.1k views
Ruby on Rails

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.


1 Answer


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.

Have another answer? Share your knowledge.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!