Question

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

Posted April 11, 2016 10.7k 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.

thanks

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.

×
1 answer

Hello,

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.

Submit an Answer