Ruby on Rails
Tuesday, November 4, 2014
On Monday, November 3, 2014 5:46:27 PM UTC, Robert Fitzpatrick wrote:
Frederick Cheung wrote:
> 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
Thanks for the help. It successfully installed the bundle under my user,
but get this error when trying to run 'bundle install':
Fetching source index from https://rubygems.org/
Could not find sprockets-2.2.2.backport2 in any of the sources
But interesting to find those seem to be commented out in the Gemfile:
$ grep sprockets Gemfile
# gem 'sprockets-rails', '=2.0.0.backport1'
# gem 'sprockets', '=2.2.2.backport2'
I found some info about trying 'bundle update' and that gives an error
as well:
$ bundle update
<snip warnings about gems listed more than once in Gemfile>
Updating https://github.com/alicetragedy/pagedown- bootstrap-rails
Updating https://github.com/ruport/ruport.git
error: cannot open .git/FETCH_HEAD: Permission denied
My user owns the app directory I am running this in, is there some other
directory git is trying to use?
Having run bundle as root may well have left some directories owned by root.
Where bundler tries to write files to depends on how its configured - (the .bundle/config file, if it exists may have some of these settings). In a production environment passing --deployment should result in everything being installed in your app's directory (or in whatever --path setting you have previously passed).
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/dc8e7ea7-0e61-459e-af90-8b166c5d5566%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment