我尝试通过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>
答案 0 :(得分:0)
你应该有像
这样的东西[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
在.profile
文件中。
如果它在那里,你可能没有启动新的登录shell,因为它已被添加,所以只需手动获取它。
然后你应该看到一些红宝石相关的路径
echo $PATH