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.