makaleler / Diğer Konular / RVM üzerinden eski Ruby Versiyonlarının Kurulması

RVM üzerinden eski Ruby Versiyonlarının Kurulması

06.08.2018 18:33:42

Eski projelerinizi yeni sistemlere taşıma işlemleri.

Yapılacak işlem adımları nı root kullanıcısı olarak yada sudo komutu ile normal kullanıcının yetkilendirimlesi yapılması gerekmektedir. Ubuntu kullanıcıları sudo'yu tecih edebilir.


Root olalım
su -

Gerekli paketler
apt-get install -y curl gnupg2 dirmngr

RVM Kurulması

RVM, Ruby Version Manager'ın kısaltmasıdır. Bağımlılıklarını otomatik olarak kaldırmak ve yönetmek için kurulur.

Genel anahtar sistemi aktarımı.


### Debian ###

gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 

### Ubuntu ###

gpg2 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3

Sisteminizde RVM'yi kurmak için curl komutunu kullanın.


curl -sSL [url]https://get.rvm.io[/url] | bash -s stable

Çıktı
Downloading [url]https://github.com/rvm/rvm/archive/1.29.4.tar.gz[/url]
Downloading [url]https://github.com/rvm/rvm/releases/download/1.29.4/1.29.4.tar.gz.asc[/url]
gpg: Signature made Sun 01 Jul 2018 10:41:26 PM +03
gpg:                using RSA key 62C9E5F4DA300D94AC36166BE206C29FBF04FF17
gpg: Good signature from "Michal Papis (RVM signing) <mpapis@gmail.com>" [unknown]
gpg:                 aka "Michal Papis <michal.papis@toptal.com>" [unknown]
gpg:                 aka "[jpeg image of size 5015]" [unknown]
gpg: WARNING: This key is not certified with a trusted signature!
gpg:          There is no indication that the signature belongs to the owner.
Primary key fingerprint: 409B 6B17 96C2 7546 2A17  0311 3804 BB82 D39D C0E3
     Subkey fingerprint: 62C9 E5F4 DA30 0D94 AC36  166B E206 C29F BF04 FF17
GPG verified '/usr/local/rvm/archives/rvm-1.29.4.tgz'
Upgrading the RVM installation in /usr/local/rvm/
Upgrade of RVM in /usr/local/rvm/ is complete.
  * Please do NOT forget to add your users to the rvm group.
     The installer no longer auto-adds root or users to the rvm group. Admins must do this.
     Also, please note that group memberships are ONLY evaluated at login time.
     This means that users must log out then back in before group membership takes effect!
  * No new notes to display.


Gereksinimler
/usr/local/rvm/bin/rvm requirements
Checking requirements for debian.
Installing requirements for debian.
Updating system..
Installing required packages: autoconf, automake, bison, libffi-dev, libgdbm-dev, libncurses5-dev, libtool, libyaml-dev, pkg-config, libreadline-dev, libssl-dev...........
Requirements installation successful.

Ruby Versiyonları
/usr/local/rvm/bin/rvm list known
# MRI Rubies
[ruby-]1.8.6[-p420]
[ruby-]1.8.7[-head] # security released on head
[ruby-]1.9.1[-p431]
[ruby-]1.9.2[-p330]
[ruby-]1.9.3[-p551]
[ruby-]2.0.0[-p648]
[ruby-]2.1[.10]
[ruby-]2.2[.10]
[ruby-]2.3[.7]
[ruby-]2.4[.4]
[ruby-]2.5[.1]
[ruby-]2.6[.0-preview2]
ruby-head

# for forks use: rvm install ruby-head-<name> --url [url]https://github.com/github/ruby.git[/url] --branch 2.2


Eski bir versiyonun kurulumu
# /usr/local/rvm/bin/rvm install 2.2.10
Searching for binary rubies, this might take some time.
No binary rubies available for: debian/9/x86_64/ruby-2.2.10.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for debian.
Removing undesired packages: libssl-dev..
Installing requirements for debian.
Updating system..
Installing required packages: libssl1.0-dev...
Requirements installation successful.
Installing Ruby from source to: /usr/local/rvm/rubies/ruby-2.2.10, this may take a while depending on your cpu(s)...
ruby-2.2.10 - #downloading ruby-2.2.10, 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 12.7M  100 12.7M    0     0  5755k      0  0:00:02  0:00:02 --:--:-- 5757k
ruby-2.2.10 - #extracting ruby-2.2.10 to /usr/local/rvm/src/ruby-2.2.10.....
ruby-2.2.10 - #applying patch /usr/local/rvm/patches/ruby/2.2.10/fix_installing_bundled_gems.patch.
ruby-2.2.10 - #configuring.........................................................
ruby-2.2.10 - #post-configuration..
ruby-2.2.10 - #compiling..................................................................................
ruby-2.2.10 - #installing.................
ruby-2.2.10 - #making binaries executable..
ruby-2.2.10 - #downloading rubygems-2.7.7
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  894k  100  894k    0     0  1423k      0 --:--:-- --:--:-- --:--:-- 1421k
No checksum for downloaded archive, recording checksum in user configuration.
ruby-2.2.10 - #extracting rubygems-2.7.7...........................................................................................................................................................................-
ruby-2.2.10 - #removing old rubygems........


Ruby versiyonunu default olarak eski bir versiyon yapalım.
# /bin/bash --login
# /usr/local/rvm/bin/rvm use 2.2.10 --default

RVM is not a function, selecting rubies with 'rvm use ...' will not work.

You need to change your terminal emulator preferences to allow login shell.
Sometimes it is required to use `/bin/bash --login` as the command.
Please visit [url]https://rvm.io/integration/gnome-terminal/[/url] for an example.

Versiyon Kontrolü Yapalım
ruby -v
ruby 2.3.3p222 (2016-11-21) [x86_64-linux-gnu]
yazar husonet

Yorumlar

Bu içerik için sizde yorum yapabilirsiniz!
anasayfa | makaleler | haberler | dosyalar | linkler | hakkımızda