Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't install bundler #1066

Closed
ghost opened this issue Jan 30, 2018 · 4 comments
Closed

Can't install bundler #1066

ghost opened this issue Jan 30, 2018 · 4 comments

Comments

@ghost
Copy link

ghost commented Jan 30, 2018

> gem install bundler
ERROR:  While executing gem ... (Gem::FilePermissionError)
    You don't have write permissions for the /var/lib/gems/2.3.0 directory.
> cat ~/.bashrc | tail -2
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
> which ruby
/home/gd/.rbenv/shims/ruby

I did rbenv install 2.4.3. I got no errors and I see that's it's there:

> cd ~/.rbenv/versions/
> ls -1
2.4.3

But I can't seem to access it:

> ruby -v
ruby 2.3.3p222 (2016-11-21) [x86_64-linux-gnu]
> which gem
/home/gd/.rbenv/shims/gem
> curl -fsSL https://github.com/rbenv/rbenv-installer/raw/master/bin/rbenv-doctor | bash
Checking for `rbenv' in PATH: /home/gd/.rbenv/bin/rbenv
Checking for rbenv shims in PATH: OK
Checking `rbenv install' support: /home/gd/.rbenv/plugins/ruby-build/bin/rbenv-install (ruby-build 20171226-3-g01e7b7b)
Counting installed Ruby versions: 1 versions
Checking RubyGems settings: OK
Auditing installed plugins: OK

I guess this is the problem:

> gem env home
/var/lib/gems/2.3.0

But I'm not sure how to fix it.

> lsb_release -a
No LSB modules are available.
Distributor ID:	Debian
Description:	Debian GNU/Linux 9.3 (stretch)
Release:	9.3
Codename:	stretch

Any other info I can provide?

@sptndc
Copy link

sptndc commented Jan 31, 2018

try to use with sudo

@hsbt
Copy link
Member

hsbt commented Feb 1, 2018

@gdonald Did you invoke rbenv shell 2.4.3 or rbenv global 2.4.3 ?

@sptndc
Copy link

sptndc commented Feb 1, 2018

Oh yes I forgot. To work with gems, you must invoke rbenv shell 2.4.3 or rbenv global 2.4.3 😅

@ghost
Copy link
Author

ghost commented Feb 1, 2018

Thanks.

@ghost ghost closed this as completed Feb 1, 2018
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants