将光标移到/点击文章中的句子上,可以查看译文。      显示繁体中文内容    显示简体中文内容

Ruby command not working after installing Ruby 2.0 through RVM on Linux mint 17.2
在 Linux Mint 17.2上,通过RVM安装 ruby 2.0后 ruby 命令不工作

0 0

I tried to install Ruby 2.0 through RVM. it seems like i installed the Ruby without any problem. However, when i type ruby -v nothing comes out. i think the command ruby is not yet set up.

I want to know how to use" 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>


时间: 原作者:

0 0

You should have something like


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


in your .profile file.

If it's there, you may not have started a new login shell since it was added, so just source it manually.

Then you should see some ruby related paths when you

 
echo $PATH

 

原作者:
...