This repository has been archived by the owner. It is now read-only.

Tell users to install bundle locally without sudo. #79

Merged
merged 1 commit into from Mar 27, 2014

Conversation

4 participants
@cirosantilli
Contributor

cirosantilli commented Mar 7, 2014

On the current README install procedure, the command bundle install fails because it tries to install gems to a shared location and that requires sudo.

I think the best thing to do is to do a local install with --path vendor/bundle.

Alternatives:

  • RVM install for gitlab_ci_runner user. Downside: one extra complexity layer by RVM where multiple rubies are probably not needed?

  • change back into the main user who has sudo, cd /home/gitlab_ci_runner/gitlab-ci-runner and bundle install.

    Explicit sudo should not be used as explained by bundle help install: it is automatically used where needed.

    Downside: may fail because the main user does not have write permission to Gemfile.lock.

    Works if you are deving with bindfs (probably the best option) as suggested at: https://gitlab.com/gitlab-org/cookbook-gitlab/blob/master/doc/development_metal.md

  • add the user to the sudo group. Downside: gives more destructive powers to the gitlab_ci_runner user.

@lazypower

This comment has been minimized.

lazypower commented Mar 7, 2014

Good catch!

@cborgia

This comment has been minimized.

cborgia commented Mar 11, 2014

+1
Just spent 20 min trying to figure out the best way to address the issue...

@dzaporozhets

This comment has been minimized.

Member

dzaporozhets commented Mar 26, 2014

@cirosantilli maybe use --deployment solution from #72?

@cirosantilli

This comment has been minimized.

Contributor

cirosantilli commented Mar 26, 2014

Agreed. But still needs to update the .gitignore with /.bundle and /vendor/bundle in that case. Done it here.

dzaporozhets added a commit that referenced this pull request Mar 27, 2014

Merge pull request #79 from cirosantilli/install-bundle-locally
Tell users to install bundle locally without sudo.

@dzaporozhets dzaporozhets merged commit 4bf5f5b into gitlabhq:master Mar 27, 2014

1 check passed

default The Travis CI build passed
Details
@dzaporozhets

This comment has been minimized.

Member

dzaporozhets commented Mar 27, 2014

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.