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

ruby -v: always display system ruby #40

Closed
rusllonrails opened this issue Apr 20, 2015 · 2 comments
Closed

ruby -v: always display system ruby #40

rusllonrails opened this issue Apr 20, 2015 · 2 comments

Comments

@rusllonrails
Copy link

Hey Guys,

I use:


---
  - name: Configure Server
    hosts: <MY SERVER IP>
    user: ubuntu
    sudo: True

   vars:
      rbenv:
        env: user
        version: v0.4.0
        ruby_version: 2.1.5
   roles:
      - role: zzet.rbenv
        rbenv_users:
          - qae

All works fine, but when I ssh to server after provisioning:

$ rbenv versions
  system
* 2.1.5 (set by /home/qae/.rbenv/version)

$ rbenv version
2.1.5 (set by /home/qae/.rbenv/version)

$ ruby -v
ruby 1.9.3p484 (2013-11-22 revision 43786) [x86_64-linux]

So, looks like it still uses system ruby
Not sure if' it's bug, just decided to ask.
Maybe someone had same issue?

Some info:

  1. I use latest version,
    Before provision I did:
$ ansible-galaxy remove zzet.rbenv
$ ansible-galaxy install zzet.rbenv
  1. in my /home/qae/.bashrc
export PATH=$GEM_HOME/bin:$PATH
export GEM_HOME=/home/qae/.gem

if [ -d "$HOME/.rbenv" ]; then
  export PATH=$HOME/.rbenv/bin:$PATH;
  export RBENV_ROOT=$HOME/.rbenv;
  eval "$(rbenv init -)";
fi

# If not running interactively, don't do anything
[ -z "$PS1" ] && return

if [ -f ~/.bash_aliases ]; then
    . ~/.bash_aliases
fi

if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
    . /etc/bash_completion
fi
  1. which ruby
$ which ruby
/usr/bin/ruby

Thanks 🍻

@zzet
Copy link
Owner

zzet commented Apr 28, 2015

@RuslanHamidullin can you try run rbenv shell 2.1.5 ?

@rusllonrails
Copy link
Author

@zzet sorry guys, forgot to post, looks like issue was on my side.
After installing on clean ubuntu - all fine.
Thanks 🍻

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