Ruby on Rails
Monday, November 3, 2014
On Monday, November 3, 2014 3:46:07 PM UTC, Robert Fitzpatrick wrote:
When I try to to run as root, it warns that I should not run Bundler as
root and that the Gemfile lists several gems more than once. I tried
running bundle install on the production server, which was setup using a
sudo user, it finishes successfully as complete with no warnings. When I
try to run as my own sudo user on the development server I'm trying to
copy to, it errors...
"The program 'bundle' is currently not installed. To run 'bundle'
please ask your administrator to install the package 'ruby-bundler'"
I did install ruby via rvm as root, so I do not have an .rvm directory
under my home directory as the sudo user. I have /usr/local/share/rvm,
but can't find any bundle or gem command in the bin directory under that
location. Should I have installed something as a sudo user or should I
continue to run the bundle install as root?
Thanks in advance for any help.
You should never run bundle as root (or using sudo). When deploying, all the gems get installed to <yourapp>/vendor so there should not be any need for elevated permissions. I don't recall off the top of my head whether rvm installs bundler by default - it doesn't then you do need to install the bundler gem (which for a systemwide rvm install does require running as root.
rvmsudo gem install bundler
will use sudo to do this, while preserving the environment variables RVM needs
Fred
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/805ce41a-ec31-47b0-8674-46200fb3468c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment