rvm не работает при указании пути…?

2

при вводе пути к rvm это не работает

$which rvm 
/usr/local/bin/rvm
$ruby -v
ruby 1.9.2p0 (2010-08-18 revision 29036) [i686-linux]
$/usr/local/bin/rvm use 1.8.7
Using /usr/local/rvm/gems/ruby-1.8.7-p302
$ruby -v
ruby 1.9.2p0 (2010-08-18 revision 29036) [i686-linux]
#now w/o the path
$rvm use 1.8.7
Using /usr/local/rvm/gems/ruby-1.8.7-p302
$ruby -v 
ruby 1.8.7 (2010-08-16 patchlevel 302) [i686-linux]

$whereis rvm
rvm: /usr/local/bin/rvm /usr/local/lib/rvm /usr/local/rvm

....
/etc/bash.bashrc 
....
if [[ -n "$PS1" ]]; then
...
[[ -s "/usr/local/rvm/scripts/rvm" ]] && . "/usr/local/rvm/scripts/rvm"

кто-нибудь видел это?

ОБНОВИТЬ:

$type -a rvm
rvm is a function
rvm () 
{ 
    local result;
    __rvm_setup;
    case $- in 
        *i*)
            rvm_interactive_flag=1
        ;;
        *)
            rvm_interactive_flag=0
        ;;
    esac;
    export rvm_interactive_flag;
    if [[ -z "${ZSH_VERSION:-""}" ]]; then
        trap '\rm -rf "${rvm_tmp_path:-"$rvm_path/tmp"}/$$" >/dev/null 2>&1' 0 1 2 3 15;
    fi;
    disk_version="$(awk '/:/{printf $NF"."}' "$rvm_path/lib/VERSION.yml")";
    disk_version="${disk_version/%.}";
    if [[ $# -gt 0 ]]; then
        next_token="$1";
        shift;
    else
        next_token="";
    fi;
    if [[ -n "${rvm_version:-""}" && "${rvm_version:-""}" != "${disk_version:-""}" && "reload" != "${next_token:-""}" ]]; then
        printf "\nA RVM version ${disk_version} is installed yet ${rvm_version} is loaded.\n Please do one of the following:\n  * 'rvm reload'\n  * open a new shell\n  * source your shell init scripts";
        return 1;
    fi;
    __rvm_cleanse_variables;
    __rvm_load_rvmrc;
    __rvm_initialize;
    __rvm_parse_args "$@";
    if [[ $? -gt 0 ]]; then
        result=$?;
        return $result;
    fi;
    rvm_action="${rvm_action:-usage}";
    export GEM_HOME GEM_PATH rvm_action rvm_archflags rvm_bin_flag rvm_bin_path rvm_clang_flag rvm_configure_flags rvm_debug_flag rvm_delete_flag rvm_docs_type rvm_dump_environment_flag rvm_error_message rvm_file_name rvm_gemdir_flag rvm_gemset_name rvm_head_flag rvm_install_arguments rvm_install_on_use_flag rvm_interactive_flag rvm_llvm_flag rvm_loaded_flag rvm_make_flags rvm_niceness rvm_only_path_flag rvm_parse_break rvm_patch_names rvm_patch_original_pwd rvm_pretty_print_flag rvm_prior_cc rvm_proxy rvm_quiet_flag rvm_ree_options rvm_reload_flag rvm_remove_flag rvm_ruby_alias rvm_ruby_aliases rvm_ruby_args rvm_ruby_file rvm_ruby_gem_home rvm_ruby_interpreter rvm_ruby_load_path rvm_ruby_make rvm_ruby_make_install rvm_ruby_patch_level rvm_ruby_repo_url rvm_ruby_repo_branch rvm_ruby_require rvm_ruby_string rvm_ruby_strings rvm_ruby_version rvm_script_name rvm_sdk rvm_silent_flag rvm_system_flag rvm_token rvm_trace_flag rvm_use_flag rvm_user_flag rvm_verbose_flag rvm_wrapper_name rvm_version rvm_static_flag;
    case "$rvm_action" in 
        use)
            __rvm_use
        ;;
        srcdir)
            __rvm_source_dir
        ;;
        strings)
            __rvm_strings
        ;;
        version)
            __rvm_version
        ;;
        reset)
            __rvm_reset
        ;;
        update)
            __rvm_update
        ;;
        reboot)
            __rvm_reboot
        ;;
        usage)
            __rvm_usage
        ;;
        benchmark)
            __rvm_benchmark
        ;;
        inspect)
            __rvm_inspect
        ;;
        implode | seppuku)
            __rvm_implode
        ;;
        list)
            "$rvm_path/scripts"/list $rvm_ruby_args
        ;;
        debug)
            "$rvm_path/scripts/info" '' debug
        ;;
        help)
            "$rvm_path/scripts/help" $rvm_ruby_args
        ;;
        env)
            "$rvm_path/scripts/env" "$rvm_ruby_string"
        ;;
        info)
            if [[ $# -gt 0 ]]; then
                next_token="$1";
                shift;
            else
                next_token="";
            fi;
            if [[ "$next_token" = "info" ]]; then
                shift;
            fi;
            "$rvm_path/scripts/info" $rvm_ruby_args
        ;;
        answer)
            __rvm_Answer_to_the_Ultimate_Question_of_Life_the_Universe_and_Everything;
            result=42
        ;;
        question)
            __rvm_ultimate_question;
            result=42
        ;;
        wrapper)
            "$rvm_path/scripts/wrapper" "$rvm_ruby_string" "$rvm_wrapper_name" $rvm_ruby_args;
            unset rvm_wrapper_name
        ;;
        gemdir | gemhome | gempath)
            "$rvm_path/scripts/gemsets" "$rvm_action"
        ;;
        ruby | gem | rake | exec)
            old_rvm_ruby_string=${rvm_ruby_string:-""};
            unset rvm_ruby_string;
            export rvm_ruby_strings;
            "$rvm_path/scripts/set" "$rvm_action" $rvm_ruby_args;
            result=$?;
            [[ -n "$old_rvm_ruby_string" ]] && rvm_ruby_string=$old_rvm_ruby_string;
            unset old_rvm_ruby_string
        ;;
        cleanup | tools | snapshot | disk-usage | repair | alias | docs | rubygems | migrate | upgrade)
            __rvm_run_script "$rvm_action"
        ;;
        rvmrc)
            eval "__rvm_rvmrc_tools $rvm_ruby_args"
        ;;
        gemset)
            if [[ ${rvm_use_flag:-0} -eq 1 ]]; then
                __rvm_gemset_select && __rvm_gemset_use;
            else
                export rvm_ruby_strings;
                "$rvm_path/scripts/gemsets" $rvm_ruby_args;
                result=$?;
                rvm_ruby_strings="";
                if [[ ${rvm_delete_flag:-0} -eq 1 ]]; then
                    gem_prefix="$(echo "${GEM_HOME:-""}" | \sed 's/'${rvm_gemset_separator:-"@"}'.*$//')";
                    if [[ "${GEM_HOME:-""}" = "${gem_prefix}${rvm_gemset_separator:-"@"}${rvm_gemset_name}" ]]; then
                        rvm_ruby_gem_home="$gem_prefix";
                        GEM_HOME="$rvm_ruby_gem_home";
                        GEM_PATH="$rvm_ruby_gem_home:$rvm_ruby_gem_home${rvm_gemset_separator:-"@"}global";
                        export rvm_ruby_gem_home GEM_HOME GEM_PATH;
                    fi;
                    unset gem_prefix;
                fi;
            fi
        ;;
        monitor)
            export rvm_ruby_strings rvm_ruby_string;
            "$rvm_path/scripts/monitor"
        ;;
        notes)
            "$rvm_path/scripts/notes"
        ;;
        get)
            "$rvm_path/scripts/get" $rvm_ruby_args
        ;;
        reload)
            rvm_reload_flag=1
        ;;
        tests | specs)
            rvm_action="rake";
            __rvm_do
        ;;
        package)
            "$rvm_path/scripts/package" $rvm_ruby_args
        ;;
        fetch | install | uninstall | remove)
            if [[ -n "$rvm_ruby_strings" ]]; then
                "$rvm_path/scripts"/manage "$rvm_action" "$rvm_ruby_strings";
            else
                "$rvm_path/scripts"/manage "$rvm_action";
            fi
        ;;
        error)
            false
        ;;
        *)
            if [[ -n "${rvm_action:-""}" ]]; then
                "$rvm_path/scripts/log" "fail" "unknown action '$rvm_action'";
            else
                __rvm_usage;
            fi;
            false
        ;;
    esac;
    result=${result:-$?};
    if [[ ${rvm_reload_flag:-0} -eq 1 ]]; then
        rvm_loaded_flag=0;
        source "$rvm_path/scripts/rvm";
        __rvm_project_rvmrc;
    fi;
    if [[ ${rvm_trace_flag:-0} -eq 1 ]]; then
        rvm_trace_flag=0;
        set +o verbose;
        set +o noclobber;
        set +o nounset;
        set +o xtrace;
        if [[ -z "${ZSH_VERSION:-""}" ]]; then
            set +o errtrace;
        fi;
    fi;
    __rvm_teardown;
    return ${result:-0}
}
rvm is /usr/local/bin/rvm
rvm is /usr/local/bin/rvm
jtzero
источник
Что значит type -a rvm сказать?
Dennis Williamson

Ответы:

1

RVM должен быть получен ... вот почему он не работает

jtzero
источник
что это значит?
Arron
скрипт должен быть запущен следующим образом: source / usr / local / bin / rvm OR. / usr / local / bin / rvm, который помещает все переменные в текущий терминал / «сессию» вместо открытия новой, которая является поведением терминала по умолчанию. При необходимости я могу привести пример
jtzero