在 Linux mint 17.2 上通过 RVM 安装 Ruby 2.0 后,Ruby 命令不工作
Ruby command not working after installing Ruby 2.0 through RVM on Linux mint 17.2
我尝试通过 RVM 安装 Ruby 2.0。看来我安装 Ruby 没有任何问题。但是,当我键入 ruby -v
时,没有任何结果。我认为命令 ruby 尚未设置。
我想知道如何使用"ruby -v"。
<blink>
kyu@kyu-Latitude-D430 ~ $ rvm install ruby 2.0.0 Searching for binary rubies, this might take some time.
No binary rubies available for: mint/17.2/x86_64/ruby-2.0.0-p643.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for mint.
Installing requirements for mint.
Updating system............
Installing required packages: g++, libreadline6-dev, zlib1g-dev, libssl-dev, libyaml-dev, libsqlite3-dev, sqlite3, autoconf, libgdbm-dev, libncurses5-dev, automake, libtool, libffi-dev..............
Requirements installation successful.
Installing Ruby from source to: /home/kyu/.rvm/rubies/ruby-2.0.0-p643, this may take a while depending on your cpu(s)...
ruby-2.0.0-p643 - #downloading ruby-2.0.0-p643, this may take a while depending on your connection...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 10.2M 100 10.2M 0 0 1139k 0 0:00:09 0:00:09 --:--:-- 1473k
ruby-2.0.0-p643 - #extracting ruby-2.0.0-p643 to /home/kyu/.rvm/src/ruby-2.0.0-p643....
ruby-2.0.0-p643 - #configuring..................................................
ruby-2.0.0-p643 - #post-configuration..
ruby-2.0.0-p643 - #compiling................................................................................
ruby-2.0.0-p643 - #installing..............................
ruby-2.0.0-p643 - #making binaries executable..
ruby-2.0.0-p643 - #downloading rubygems-2.4.8
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 437k 100 437k 0 0 225k 0 0:00:01 0:00:01 --:--:-- 225k
No checksum for downloaded archive, recording checksum in user configuration.
ruby-2.0.0-p643 - #extracting rubygems-2.4.8....
ruby-2.0.0-p643 - #removing old rubygems.........
ruby-2.0.0-p643 - #installing rubygems-2.4.8......................
ruby-2.0.0-p643 - #gemset created /home/kyu/.rvm/gems/ruby-2.0.0-p643@global
ruby-2.0.0-p643 - #importing gemset /home/kyu/.rvm/gemsets/global.gems...............................................
ruby-2.0.0-p643 - #generating global wrappers........
ruby-2.0.0-p643 - #gemset created /home/kyu/.rvm/gems/ruby-2.0.0-p643
ruby-2.0.0-p643 - #importing gemsetfile /home/kyu/.rvm/gemsets/default.gems evaluated to empty gem list
ruby-2.0.0-p643 - #generating default wrappers........
ruby-2.0.0-p643 - #adjusting #shebangs for (gem irb erb ri rdoc testrb rake).
Install of ruby-2.0.0-p643 - #complete
Ruby was built without documentation, to build it run: rvm docs generate-ri
kyu@kyu-Latitude-D430 ~ $ ruby -v
bash: /usr/bin/ruby: No such file or directory <code>
<blink>
你应该有类似
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
在您的 .profile
文件中。
如果它在那里,您可能还没有开始新的登录 shell 因为它被添加了,所以只需手动获取它。
那么当你
时你应该会看到一些ruby相关的路径
echo $PATH
我尝试通过 RVM 安装 Ruby 2.0。看来我安装 Ruby 没有任何问题。但是,当我键入 ruby -v
时,没有任何结果。我认为命令 ruby 尚未设置。
我想知道如何使用"ruby -v"。
<blink>
kyu@kyu-Latitude-D430 ~ $ rvm install ruby 2.0.0 Searching for binary rubies, this might take some time.
No binary rubies available for: mint/17.2/x86_64/ruby-2.0.0-p643.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for mint.
Installing requirements for mint.
Updating system............
Installing required packages: g++, libreadline6-dev, zlib1g-dev, libssl-dev, libyaml-dev, libsqlite3-dev, sqlite3, autoconf, libgdbm-dev, libncurses5-dev, automake, libtool, libffi-dev..............
Requirements installation successful.
Installing Ruby from source to: /home/kyu/.rvm/rubies/ruby-2.0.0-p643, this may take a while depending on your cpu(s)...
ruby-2.0.0-p643 - #downloading ruby-2.0.0-p643, this may take a while depending on your connection...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 10.2M 100 10.2M 0 0 1139k 0 0:00:09 0:00:09 --:--:-- 1473k
ruby-2.0.0-p643 - #extracting ruby-2.0.0-p643 to /home/kyu/.rvm/src/ruby-2.0.0-p643....
ruby-2.0.0-p643 - #configuring..................................................
ruby-2.0.0-p643 - #post-configuration..
ruby-2.0.0-p643 - #compiling................................................................................
ruby-2.0.0-p643 - #installing..............................
ruby-2.0.0-p643 - #making binaries executable..
ruby-2.0.0-p643 - #downloading rubygems-2.4.8
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 437k 100 437k 0 0 225k 0 0:00:01 0:00:01 --:--:-- 225k
No checksum for downloaded archive, recording checksum in user configuration.
ruby-2.0.0-p643 - #extracting rubygems-2.4.8....
ruby-2.0.0-p643 - #removing old rubygems.........
ruby-2.0.0-p643 - #installing rubygems-2.4.8......................
ruby-2.0.0-p643 - #gemset created /home/kyu/.rvm/gems/ruby-2.0.0-p643@global
ruby-2.0.0-p643 - #importing gemset /home/kyu/.rvm/gemsets/global.gems...............................................
ruby-2.0.0-p643 - #generating global wrappers........
ruby-2.0.0-p643 - #gemset created /home/kyu/.rvm/gems/ruby-2.0.0-p643
ruby-2.0.0-p643 - #importing gemsetfile /home/kyu/.rvm/gemsets/default.gems evaluated to empty gem list
ruby-2.0.0-p643 - #generating default wrappers........
ruby-2.0.0-p643 - #adjusting #shebangs for (gem irb erb ri rdoc testrb rake).
Install of ruby-2.0.0-p643 - #complete
Ruby was built without documentation, to build it run: rvm docs generate-ri
kyu@kyu-Latitude-D430 ~ $ ruby -v
bash: /usr/bin/ruby: No such file or directory <code>
<blink>
你应该有类似
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
在您的 .profile
文件中。
如果它在那里,您可能还没有开始新的登录 shell 因为它被添加了,所以只需手动获取它。
那么当你
时你应该会看到一些ruby相关的路径echo $PATH