Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9230033
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T05:43:16+00:00 2026-06-18T05:43:16+00:00

I have RVM and Ruby installed on OS X. I set the default version

  • 0

I have RVM and Ruby installed on OS X. I set the default version using:

rvm use 1.9.3-p194 --default

But this works only for the current terminal session. When I start a new session, ruby -v returns my System’s Ruby version.

Any hints?

UPD

macbook:~ mighter$ rvm info

ruby-1.9.3-p194:

  system:
    uname:       "Darwin macbook.local 12.2.0 Darwin Kernel Version 12.2.0: Sat Aug 25 00:48:52 PDT 2012; root:xnu-2050.18.24~1/RELEASE_X86_64 x86_64"
    system:      "osx/10.8/x86_64"
    bash:        "/bin/bash => GNU bash, version 3.2.48(1)-release (x86_64-apple-darwin12)"
    zsh:         "/bin/zsh => zsh 4.3.11 (i386-apple-darwin12.0)"

  rvm:
    version:      "rvm 1.18.5 (stable) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/]"
    updated:      "1 hour 22 minutes 16 seconds ago"

  ruby:
    interpreter:  "ruby"
    version:      "1.9.3p194"
    date:         "2012-04-20"
    platform:     "x86_64-darwin12.2.0"
    patchlevel:   "2012-04-20 revision 35410"
    full_version: "ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-darwin12.2.0]"

  homes:
    gem:          "/usr/local/rvm/gems/ruby-1.9.3-p194"
    ruby:         "/usr/local/rvm/rubies/ruby-1.9.3-p194"

  binaries:
    ruby:         "/usr/local/rvm/rubies/ruby-1.9.3-p194/bin/ruby"
    irb:          "/usr/local/rvm/rubies/ruby-1.9.3-p194/bin/irb"
    gem:          "/usr/local/rvm/rubies/ruby-1.9.3-p194/bin/gem"
    rake:         "/usr/local/rvm/gems/ruby-1.9.3-p194@global/bin/rake"

  environment:
    PATH:         "/usr/local/rvm/gems/ruby-1.9.3-p194/bin:/usr/local/rvm/gems/ruby-1.9.3-p194@global/bin:/usr/local/rvm/rubies/ruby-1.9.3-p194/bin:/usr/local/rvm/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/usr/local/git/bin"
    GEM_HOME:     "/usr/local/rvm/gems/ruby-1.9.3-p194"
    GEM_PATH:     "/usr/local/rvm/gems/ruby-1.9.3-p194:/usr/local/rvm/gems/ruby-1.9.3-p194@global"
    MY_RUBY_HOME: "/usr/local/rvm/rubies/ruby-1.9.3-p194"
    IRBRC:        "/usr/local/rvm/rubies/ruby-1.9.3-p194/.irbrc"
    RUBYOPT:      ""
    gemset:       ""

After logging in:

macbook:~ mighter$ rvm info

system:

  system:
    uname:       "Darwin macbook.local 12.2.0 Darwin Kernel Version 12.2.0: Sat Aug 25 00:48:52 PDT 2012; root:xnu-2050.18.24~1/RELEASE_X86_64 x86_64"
    system:      "osx/10.8/x86_64"
    bash:        "/bin/bash => GNU bash, version 3.2.48(1)-release (x86_64-apple-darwin12)"
    zsh:         "/bin/zsh => zsh 4.3.11 (i386-apple-darwin12.0)"

  rvm:
    version:      "rvm 1.18.5 (stable) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/]"
    updated:      "1 hour 21 minutes 18 seconds ago"

  homes:
    gem:          "not set"
    ruby:         "not set"

  binaries:
    ruby:         "/usr/bin/ruby"
    irb:          "/usr/bin/irb"
    gem:          "/usr/bin/gem"
    rake:         "/usr/bin/rake"

  environment:
    PATH:         "/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/usr/local/git/bin:/usr/local/rvm/bin"
    GEM_HOME:     ""
    GEM_PATH:     ""
    MY_RUBY_HOME: ""
    IRBRC:        ""
    RUBYOPT:      ""
    gemset:       ""

UPD2

macbook:~ mighter$ cat .bashrc 

PATH=$PATH:/usr/local/rvm/bin # Add RVM to PATH for scripting
macbook:~ mighter$ cat .bash_profile 

[[ -s "/usr/local/rvm/scripts/rvm" ]] && source "/usr/local/rvm/scripts/rvm" # Load RVM into a shell session *as a function*

UPD3

/usr/local/rvm/scripts/rvm
#!/usr/bin/env bash

# rvm : Ruby enVironment Manager
# https://rvm.io
# https://github.com/wayneeseguin/rvm

# also duplicated in scripts/base
__rvm_has_opt()
{
  {
    [[ -n "${ZSH_VERSION}"  ]] && setopt | grep "^${1}$" >/dev/null 2>&1
  } ||
  {
    [[ -n "${BASH_VERSION}" ]] && [[ ":$SHELLOPTS:" =~ ":${1}:" ]]
  } ||
  return 1
}

# Do not allow sourcing RVM in `sh` - it's not supported
# return 0 to exit from sourcing this script without breaking sh
if __rvm_has_opt "posix"
then return 0
fi

# TODO: Alter the variable names to make sense
\export HOME rvm_prefix rvm_user_install_flag rvm_path
HOME="${HOME%%+(\/)}" # Remove trailing slashes if they exist on HOME

[[ -n "${rvm_stored_umask:-}" ]] || export rvm_stored_umask=$(umask)
if (( ${rvm_ignore_rvmrc:=0} == 0 ))
then
  rvm_rvmrc_files=("/etc/rvmrc" "$HOME/.rvmrc")
  if [[ -n "${rvm_prefix:-}" ]] && ! [[ "$HOME/.rvmrc" -ef "${rvm_prefix}/.rvmrc" ]]
     then rvm_rvmrc_files+=( "${rvm_prefix}/.rvmrc" )
  fi

  for rvmrc in "${rvm_rvmrc_files[@]}"
  do
    if [[ -f "$rvmrc" ]]
    then
      if GREP_OPTIONS="" \grep '^\s*rvm .*$' "$rvmrc" >/dev/null 2>&1
      then
        printf "%b" "
Error:
        $rvmrc is for rvm settings only.
        rvm CLI may NOT be called from within $rvmrc.
        Skipping the loading of $rvmrc"
        return 1
      else
        source "$rvmrc"
      fi
    fi
  done
  unset rvm_rvmrc_files
fi

# detect rvm_path if not set
if [[ -z "${rvm_path:-}" ]]
then
  if (( UID == 0 ))
  then
    if (( ${rvm_user_install_flag:-0} == 0 ))
    then
      rvm_user_install_flag=0
      rvm_prefix="/usr/local"
      rvm_path="${rvm_prefix}/rvm"
    else
      rvm_user_install_flag=1
      rvm_prefix="$HOME"
      rvm_path="${rvm_prefix}/.rvm"
    fi
  else
    if [[ -d "$HOME/.rvm" && -s "$HOME/.rvm/scripts/rvm" ]]
    then
      rvm_user_install_flag=1
      rvm_prefix="$HOME"
      rvm_path="${rvm_prefix}/.rvm"
    else
      rvm_user_install_flag=0
      rvm_prefix="/usr/local"
      rvm_path="${rvm_prefix}/rvm"
    fi
  fi
else
  # remove trailing slashes, btw. %%/ <- does not work as expected
  rvm_path="${rvm_path%%+(\/)}"
fi

# guess rvm_prefix if not set
if [[ -z "${rvm_prefix}" ]]
then
  rvm_prefix=$( dirname $rvm_path )
fi

# guess rvm_user_install_flag if not set
if [[ -z "${rvm_user_install_flag}" ]]
then
  if [[ "${rvm_prefix}" == "${HOME}" ]]
  then
    rvm_user_install_flag=1
  else
    rvm_user_install_flag=0
  fi
fi

export rvm_loaded_flag
if [[ -n "${BASH_VERSION:-}" || -n "${ZSH_VERSION:-}" ]] &&
  typeset -f rvm >/dev/null 2>&1
then
  rvm_loaded_flag=1
else
  rvm_loaded_flag=0
fi

if (( ${rvm_loaded_flag:=0} == 0 )) || (( ${rvm_reload_flag:=0} == 1 ))
then
  if [[ -n "${rvm_path}" && -d "$rvm_path" ]]
  then
    true ${rvm_scripts_path:="$rvm_path/scripts"}

    if [[ -f "$rvm_scripts_path/base" ]]
    then
      source "$rvm_scripts_path/base"
    else
      printf "%b" "WARNING:
      Could not source '$rvm_scripts_path/base' as file does not exist.
      RVM will likely not work as expected.\n"
    fi

    __rvm_ensure_is_a_function
    __rvm_setup

    export rvm_version
    rvm_version="$(cat "$rvm_path/VERSION") ($(cat "$rvm_path/RELEASE" 2>/dev/null))"

    alias rvm-restart="rvm_reload_flag=1 source '${rvm_scripts_path:-${rvm_path}/scripts}/rvm'"

    if ! builtin command -v ruby >/dev/null 2>&1 ||
      builtin command -v ruby | GREP_OPTIONS="" \grep -v "${rvm_path}" >/dev/null ||
      builtin command -v ruby | GREP_OPTIONS="" \grep "${rvm_path}/bin/ruby$" >/dev/null
    then
      if [[ -s "$rvm_environments_path/default" && "${rvm_action}" != "switch" ]]
      then
        source "$rvm_environments_path/default"
      elif [[ -s "$rvm_path/environments/default" ]]
      then
        source "$rvm_path/environments/default"
      fi
    fi

    # Makes sure rvm_bin_path is in PATH atleast once.
    __rvm_conditionally_add_bin_path

    if (( ${rvm_reload_flag:=0} == 1 ))
    then
      [[ "${rvm_auto_reload_flag:-0}" == 2 ]] || printf "%b" 'RVM reloaded!\n'
      # make sure we clean env on reload
      __rvm_env_loaded=1
      unset __rvm_project_rvmrc_lock
    fi

    rvm_loaded_flag=1
  else
    printf "%b" "\n\$rvm_path ($rvm_path) does not exist."
  fi
  unset rvm_prefix_needs_trailing_slash rvm_gems_cache_path \
    rvm_gems_path rvm_project_rvmrc_default rvm_gemset_separator rvm_reload_flag
else
  source "${rvm_scripts_path:="$rvm_path/scripts"}/initialize"
  __rvm_setup
fi

if [[ -t 0 && ${rvm_project_rvmrc:-1} -gt 0 ]] &&
  rvm_is_a_shell_function no_warning &&
  ! __function_on_stack __rvm_project_rvmrc &&
  typeset -f __rvm_project_rvmrc >/dev/null 2>&1
then
  # Reload the rvmrc, use promptless ensuring shell processes does not
  # prompt if .rvmrc trust value is not stored.
  rvm_promptless=1 __rvm_project_rvmrc
  rvm_hook=after_cd
  source "${rvm_scripts_path:-${rvm_path}/scripts}/hook"
fi

__rvm_teardown
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T05:43:17+00:00Added an answer on June 18, 2026 at 5:43 am

    You’re probably not including the rvm script in your profile. If you have a previous installation of rvm it might be loading the wrong files, the location of them has shifted slightly but in important ways from historical versions.

    The installation documentation recommends:

    echo "source $HOME/.rvm/scripts/rvm" >> ~/.bash_profile
    

    Of course if you’re not using bash or your .bash_profile is not being loaded for some reason, this could be the cause of your problem.

    If you’ve done a root install of rvm then you’ll need to adjust that line to include /usr/local/scripts/rvm, or wherever it installed, and alter /etc/bash_profile instead.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been using rvm and when I installed ruby 1.9.2, it installed ruby-1.9.2-p290
I currently have Ruby on Rails installed via RVM in Ubuntu 12.04. The default
I use ubuntu 11.10 and I have installed rvm and have installed ruby 1.9.3
I have ruby 1.8.7 and 1.9.3 installed by rvm. For each ruby version, I'd
I previously had ruby 1.9.3-p286 installed with rvm (set as --default ). I had
I have setup Rails 3.0.3 and installed Ruby 1.9.2 with rvm and set rvm
I have rvm, passenger, ruby 1.9.3, nginx but I now get this error Cannot
I have rvm and ruby version 1.9.2 installed. I have Mac OS X 10.7.
I have to type rvm use ruby-1.9.3 every time I login to my server.
These are the rubies I have installed with RVM rvm rubies ruby-1.8.7-head [ x86_64

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.