Report this

What is the reason for this report?

Problem with Bundle Install - Rails on Ubuntu

Posted on December 18, 2014

I have a problem with bundle install. I have a fresh droplet with Rails and Ubuntu. If I run as root:

bundle install

I get the following message and my application breaks, start getting “Bad Gateway” errors from Nginx:

Don't run Bundler as root. Bundler can ask for sudo if it is needed, and
installing your bundle as root will break this application for all non-root
users on this machine.

If I run bundle install as the rails user:

su rails
bundle install

then I get this error:

sh: 1: bundle: not found

What am I missing? I’ve scoured the internet and tried every solution I can find and can’t get it working quite right.

Thanks for your help,

The developer cloud

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

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.