Как удалить rbenv ubuntu

Обновлено: 30.06.2024

We recommend upgrading to a more modern version. Read upgrade instructions.

Introduction

Ruby on Rails is an extremely popular open-source web framework that provides a great way to write web applications with Ruby.

This tutorial will show you how to install Ruby on Rails on Ubuntu 14.04, using rbenv. This will provide you with a solid environment for developing your Ruby on Rails applications. rbenv provides an easy way to install and manage various versions of Ruby, and it is simpler and less intrusive than RVM. This will help you ensure that the Ruby version you are developing against matches your production environment.

Prerequisites

Before installing rbenv, you must have access to a superuser account on an Ubuntu 14.04 server. Follow steps 1-3 of this tutorial, if you need help setting this up: Initial Server Setup on Ubuntu 14.04

When you have the prerequisites out of the way, let’s move on to installing rbenv.

Install rbenv

Let’s install rbenv, which we will use to install and manage our Ruby installation.

First, update apt-get:

Install the rbenv and Ruby dependencies with apt-get:

Now we are ready to install rbenv. The easiest way to do that is to run these commands, as the user that will be using Ruby:

Note: On Ubuntu Desktop, replace all occurrences .bash_profile in the above code block with .bashrc .

This installs rbenv into your home directory, and sets the appropriate environment variables that will allow rbenv to the active version of Ruby.

Now we’re ready to install Ruby.

Install Ruby

Before using rbenv, determine which version of Ruby that you want to install. We will install the latest version, at the time of this writing, Ruby 2.2.3. You can look up the latest version of Ruby by going to the Ruby Downloads page.

As the user that will be using Ruby, install it with these commands:

The global sub-command sets the default version of Ruby that all of your shells will use. If you want to install and use a different version, simply run the rbenv commands with a different version number.

Verify that Ruby was installed properly with this command:

It is likely that you will not want Rubygems to generate local documentation for each gem that you install, as this process can be lengthy. To disable this, run this command:

You will also want to install the bundler gem, to manage your application dependencies:

Now that Ruby is installed, let’s install Rails.

Install Rails

As the same user, install Rails with this command (you may specify a specific version with the -v option):

Whenever you install a new version of Ruby or a gem that provides commands, you should run the rehash sub-command. This will install shims for all Ruby executables known to rbenv, which will allow you to use the executables:

Verify that Rails has been installed properly by printing its version, with this command:

If it installed properly, you will see the version of Rails that was installed.

Install Javascript Runtime

A few Rails features, such as the Asset Pipeline, depend on a Javascript runtime. We will install Node.js to provide this functionality.

Add the Node.js PPA to apt-get:

Then update apt-get and install the Node.js package:

Congratulations! Ruby on Rails is now installed on your system.

Optional Steps

If you’re looking to improve your setup, here are a few suggestions:

Configure Git

A good version control system is essential when coding applications. Follow the How To Set Up Git section of the How To Install Git tutorial.

Install a Database

Rails uses sqlite3 as its default database, which may not meet the requirements of your application. You may want to install an RDBMS, such as MySQL or PostgreSQL, for this purpose.

For example, if you want to use MySQL as your database, install MySQL with apt-get:

Then install the mysql2 gem, like this:

Now you can use MySQL with your Rails application. Be sure to configure MySQL and your Rails application properly.

Create a Test Application (Optional)

If you want to make sure that your Ruby on Rails installation went smoothly, you can quickly create a test application to test it out. For simplicity, our test application will use sqlite3 for its database.

Create a new Rails application in your home directory:

Then move into the application’s directory:

Create the sqlite3 database:

If you don’t already know the public IP address of your server, look it up with this command:

Copy the IPv4 address to your clipboard, then use it with this command to start your Rails application (substitute the highlighted part with the IP address):

If it is working properly, your Rails application should be running on port 3000 of the public IP address of your server. Visit your Rails application by going there in a web browser:

If you see the Rails “Welcome aboard” page, your Ruby on Rails installation is working properly!

Conclusion

You’re now ready to start developing your new Ruby on Rails application. Good luck!

This command should do the trick (provided that you installed it using a dpkg-based packet manager):

29.3k 4 4 gold badges 62 62 silver badges 69 69 bronze badges $ sudo aptitude purge ruby No packages will be installed, upgraded, or removed. 0 packages upgraded, 0 newly installed, 0 to remove and 1 not upgraded. Need to get 0B of archives. After unpacking 0B will be used. $ruby -v ruby 1.8.7 (2010-04-19 patchlevel 253) [i686-linux], MBARI 0x8770, Ruby Enterprise Edition 2010.02 It seems like aptitude did not find the package ruby on your system. Execute dpkg -l | grep ruby for a list of installed ruby-related packages. For example ruby1.8 . Then simply execute aptitude purge ruby1.8 to remove that package.

Run the following command from your terminal:

sudo apt-get purge ruby

Usually works well for me.


3,414 2 2 gold badges 31 31 silver badges 51 51 bronze badges sudo apt-get purge ruby* will remove grub! Be careful. Ok, I have never seen that happen. I will look out for that :) I did sudo apt-get purge ruby* but when I type ruby -v it shows ruby 1.9.2 @Francois I think you should use sudo apt-get remove ruby1.9.2 ? I have 1.9.1 installed and it works yea seemed to do the trick, thanks, I keep tryping uninstall instead of remove :)

At first find out where ruby is? then

735 2 2 gold badges 14 14 silver badges 39 39 bronze badges

I have tried many include sudo apt-get purge ruby , sudo apt-get remove ruby and sudo aptitude purpe ruby , both with and without '*' at the end. But none of them worked, it's may be I've installed more than one version ruby.

Finally, when I tried sudo apt-get purge ruby1.9 (with the version), then it works.


4,034 2 2 gold badges 27 27 silver badges 41 41 bronze badges

Run the following command on the terminal:


9,319 15 15 gold badges 28 28 silver badges 40 40 bronze badges 401 1 1 gold badge 5 5 silver badges 12 12 bronze badges

Here is what sudo apt-get purge ruby* removed relating to GRUB for me:


4,609 39 39 gold badges 52 52 silver badges 68 68 bronze badges


On Lubuntu, I just tried apt-get purge ruby* and as well as removing ruby, it looks like this command tried to remove various things to do with GRUB, which is a bit worrying for next time I want to reboot my computer. I can't yet say if any damage has really been done.

If you used rbenv to install it, you can use

to see which versions you have installed.

Then, use the uninstall command:

If you installed Rails, it will be removed, too.


Why you are removing old version of the ruby?

rvm install 2.4.2 // version of ruby u need to insatll rvm use 2.4.2 --default // set ruby version you want use by default

The text was updated successfully, but these errors were encountered:

arena commented Sep 27, 2014

How do you delete things from your shell's start-up files?

mislav commented Sep 28, 2014

@arena: Delete anything matching "rbenv" in these files:

jareks commented Oct 14, 2014

I think you are missing /etc/profile:

/.zshrc /etc/profile /etc/profile.d/*

arena commented Oct 16, 2014

Thank you @jareks! I decided not to uninstall. I was trying to uninstall so that I could reinstall clean, but then @mislav helped me fix my install. :)

dannyboone commented Dec 2, 2014

When i run this command:

i get this response:

How do i remove all of these things from the startup files?

mislav commented Dec 2, 2014

Some script must have kept adding them to your .bash_profile , resulting in duplicates. To fix this, open

/.bash_profile in your editor, remove all rbenv-related lines, and just keep this:

dannyboone commented Dec 2, 2014

-bash: rbenv: command not found

I attempted to paste the code multiple times and ended up with this result. I decided to try and delete rbenv and all shell startup files and i ended up here in this thread. Please forgive me as Im a bit new to the console so i dont know what commands to type into the terminal to actually remove these lines.

dannyboone commented Dec 2, 2014

I did it! Nevermind. This is how i did it:
touch .bash_profile

open -a TextEdit.app .bash_profile

TextEdit will show you a blank page which you can fill in.

jluria commented Dec 5, 2014

@mislav I recently had a problem with my ruby build, chruby wasn't working to rebuild my install, so I temporarily used rbenv and ruby-build to rebuild my ruby. Now I'm uninstalling ruby-build and rbenv, and I removed all rbenv references in my bash profile. Why should I leave this:

in my bash profile?

mislav commented Dec 6, 2014

@jluria Apologies, when I said to leave those in I meant for people who want to have rbenv, but are confused by duplicates.

However since this thread is about uninstallation of rbenv, then of course, remove every line that references rbenv and you'll be good to go.

jluria commented Dec 6, 2014

Ah, ok. Now I see what you were saying. My fault.

willvlad commented Oct 22, 2015

@mislav I kept on getting the error that rbenv no such command init whenever I started bash until I deleted export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)" from the .bash_profile. Now bash starts cleanly. I'm new to this so may be not understanding something, but why are you saying that those who want rbenv should have these lines in the bash_profile? They seem to be causing an error for me.

mislav commented Oct 22, 2015

@willvlad I don't understand whether you want to have rbenv on your system or not?

  1. If you want rbenv on your system, then you should have these lines in .bash_profile
  2. If you don't want rbenv, i.e. uninstall rbenv, then you should remove these lines from .bash_profile . It's not complicated.

willvlad commented Oct 22, 2015

@mislav I do want to keep it on my system. If I follow your number 1, my git bash throws an error that there is no such command. If I delete it from the bash_profile, I don't get any errors. Does this clarify?

Seamlessly manage your app’s Ruby environment with rbenv.

Use rbenv to pick a Ruby version for your application and guarantee that your development environment matches production. Put rbenv to work with Bundler for painless Ruby upgrades and bulletproof deployments.

Powerful in development. Specify your app's Ruby version once, in a single file. Keep all your teammates on the same page. No headaches running apps on different versions of Ruby. Just Works™ from the command line and with app servers like Pow. Override the Ruby version anytime: just set an environment variable.

Rock-solid in production. Your application's executables are its interface with ops. With rbenv and Bundler binstubs you'll never again need to cd in a cron job or Chef recipe to ensure you've selected the right runtime. The Ruby version dependency lives in one place—your app—so upgrades and rollbacks are atomic, even when you switch versions.

One thing well. rbenv is concerned solely with switching Ruby versions. It's simple and predictable. A rich plugin ecosystem lets you tailor it to suit your needs. Compile your own Ruby versions, or use the ruby-build plugin to automate the process. Specify per-application environment variables with rbenv-vars. See more plugins on the wiki.

At a high level, rbenv intercepts Ruby commands using shim executables injected into your PATH , determines which Ruby version has been specified by your application, and passes your commands along to the correct Ruby installation.

When you run a command like ruby or rake , your operating system searches through a list of directories to find an executable file with that name. This list of directories lives in an environment variable called PATH , with each directory in the list separated by a colon:

Directories in PATH are searched from left to right, so a matching executable in a directory at the beginning of the list takes precedence over another one at the end. In this example, the /usr/local/bin directory will be searched first, then /usr/bin , then /bin .

rbenv works by inserting a directory of shims at the front of your PATH :

Through a process called rehashing, rbenv maintains shims in that directory to match every Ruby command across every installed version of Ruby— irb , gem , rake , rails , ruby , and so on.

Shims are lightweight executables that simply pass your command along to rbenv. So with rbenv installed, when you run, say, rake , your operating system will do the following:

  • Search your PATH for an executable file named rake
  • Find the rbenv shim named rake at the beginning of your PATH
  • Run the shim named rake , which in turn passes the command along to rbenv

Choosing the Ruby Version

When you execute a shim, rbenv determines which Ruby version to use by reading it from the following sources, in this order:

The RBENV_VERSION environment variable, if specified. You can use the rbenv shell command to set this environment variable in your current shell session.

/.rbenv/version file. You can modify this file using the rbenv global command. If the global version file is not present, rbenv assumes you want to use the "system" Ruby—i.e. whatever version would be run if rbenv weren't in your path.

Locating the Ruby Installation

Once rbenv has determined which version of Ruby your application has specified, it passes the command along to the corresponding Ruby installation.

Each Ruby version is installed into its own directory under

/.rbenv/versions . For example, you might have these versions installed:

Version names to rbenv are simply the names of the directories in

Compatibility note: rbenv is incompatible with RVM. Please make sure to fully uninstall RVM and remove any references to it from your shell initialization files before installing rbenv.

Using Package Managers

macOS If you're on macOS, we recommend installing rbenv with Homebrew.

Note that this also installs ruby-build , so you'll be ready to install other Ruby versions out of the box.

Upgrading with Homebrew

To upgrade to the latest rbenv and update ruby-build with newly released Ruby versions, upgrade the Homebrew packages:

Debian, Ubuntu and their derivatives

Arch Linux and it's derivatives

Archlinux has an AUR Package for rbenv and you can install it from the AUR using the instructions from this wiki page.

Set up rbenv in your shell.

Follow the printed instructions to set up rbenv shell integration.

Close your Terminal window and open a new one so your changes take effect.

Verify that rbenv is properly set up using this rbenv-doctor script:

That's it! Installing rbenv includes ruby-build, so now you're ready to install some other Ruby versions using rbenv install .

Basic GitHub Checkout

For a more automated install, you can use rbenv-installer. If you prefer a manual approach, follow the steps below.

This will get you going with the latest version of rbenv without needing a systemwide install.

Clone rbenv into

Optionally, try to compile dynamic bash extension to speed up rbenv. Don't worry if it fails; rbenv will still work normally:

/.rbenv/bin to your $PATH for access to the rbenv command-line utility.

For bash:

Ubuntu Desktop users should configure

On other platforms, bash is usually configured via

For Zsh:

For Fish shell:

Set up rbenv in your shell.

Follow the printed instructions to set up rbenv shell integration.

Restart your shell so that PATH changes take effect. (Opening a new terminal tab will usually do it.)

Verify that rbenv is properly set up using this rbenv-doctor script:

(Optional) Install ruby-build, which provides the rbenv install command that simplifies the process of installing new Ruby versions.

Upgrading with Git

If you've installed rbenv manually using Git, you can upgrade to the latest version by pulling from GitHub:

Updating the list of available Ruby versions

If you're using the rbenv install command, then the list of available Ruby versions is not automatically updated when pulling from the rbenv repo. To do this manually:

How rbenv hooks into your shell

Skip this section unless you must know what every line in your shell profile is doing.

rbenv init is the only command that crosses the line of loading extra commands into your shell. Coming from RVM, some of you might be opposed to this idea. Here's what rbenv init actually does:

Sets up your shims path. This is the only requirement for rbenv to function properly. You can do this by hand by prepending

/.rbenv/shims to your $PATH .

Installs autocompletion. This is entirely optional but pretty useful. Sourcing

/.rbenv/completions/rbenv.bash will set that up. There is also a

/.rbenv/completions/rbenv.zsh for Zsh users.

Rehashes shims. From time to time you'll need to rebuild your shim files. Doing this automatically makes sure everything is up to date. You can always run rbenv rehash manually.

Installs the sh dispatcher. This bit is also optional, but allows rbenv and plugins to change variables in your current shell, making commands like rbenv shell possible. The sh dispatcher doesn't do anything invasive like override cd or hack your shell prompt, but if for some reason you need rbenv to be a real script rather than a shell function, you can safely skip it.

Run rbenv init - for yourself to see exactly what happens under the hood.

Installing Ruby versions

The rbenv install command doesn't ship with rbenv out of the box, but is provided by the ruby-build project. If you installed it either as part of GitHub checkout process outlined above or via Homebrew, you should be able to:

Set a Ruby version to finish installation and start using commands rbenv global 2.0.0-p247 or rbenv local 2.0.0-p247

Alternatively to the install command, you can download and compile Ruby manually as a subdirectory of

/.rbenv/versions/ . An entry in that directory can also be a symlink to a Ruby version installed elsewhere on the filesystem. rbenv doesn't care; it will simply treat any entry in the versions/ directory as a separate Ruby version.

Installing Ruby gems

Once you've installed some Ruby versions, you'll want to install gems. First, ensure that the target version for your project is the one you want by checking rbenv version (see Command Reference). Select another version using rbenv local 2.0.0-p247 , for example. Then, proceed to install gems as you normally would:

You don't need sudo to install gems. Typically, the Ruby versions will be installed and writeable by your user. No extra privileges are required to install gems.

Check the location where gems are being installed with gem env :

Uninstalling Ruby versions

As time goes on, Ruby versions you install will accumulate in your

To remove old Ruby versions, simply rm -rf the directory of the version you want to remove. You can find the directory of a particular Ruby version with the rbenv prefix command, e.g. rbenv prefix 1.8.7-p357 .

The ruby-build plugin provides an rbenv uninstall command to automate the removal process.

The simplicity of rbenv makes it easy to temporarily disable it, or uninstall from the system.

To disable rbenv managing your Ruby versions, simply remove the rbenv init line from your shell startup configuration. This will remove rbenv shims directory from PATH, and future invocations like ruby will execute the system Ruby version, as before rbenv.

While disabled, rbenv will still be accessible on the command line, but your Ruby apps won't be affected by version switching.

To completely uninstall rbenv, perform step (1) and then remove its root directory. This will delete all Ruby versions that were installed under `rbenv root`/versions/ directory:

If you've installed rbenv using a package manager, as a final step perform the rbenv package removal:

  • Homebrew: brew uninstall rbenv
  • Debian, Ubuntu, and their derivatives: sudo apt purge rbenv
  • Archlinux and its derivatives: sudo pacman -R rbenv

When run without a version number, rbenv local reports the currently configured local version. You can also unset the local version:

Sets the global version of Ruby to be used in all shells by writing the version name to the

The special version name system tells rbenv to use the system Ruby (detected by searching your $PATH ).

When run without a version number, rbenv global reports the currently configured global version.

Sets a shell-specific Ruby version by setting the RBENV_VERSION environment variable in your shell. This version overrides application-specific versions and the global version.

When run without a version number, rbenv shell reports the current value of RBENV_VERSION . You can also unset the shell version:

Note that you'll need rbenv's shell integration enabled (step 3 of the installation instructions) in order to use this command. If you prefer not to use shell integration, you may simply set the RBENV_VERSION variable yourself:

Lists all Ruby versions known to rbenv, and shows an asterisk next to the currently active version.

Displays the currently active Ruby version, along with information on how it was set.

Installs shims for all Ruby executables known to rbenv (i.e.,

/.rbenv/versions/*/bin/* ). Run this command after you install a new version of Ruby, or install a gem that provides commands.

Displays the full path to the executable that rbenv will invoke when you run the given command.

Lists all Ruby versions with the given command installed.

You can affect how rbenv operates with the following settings:

The rbenv source code is hosted on GitHub. It's clean, modular, and easy to understand, even if you're not a shell hacker.

Tests are executed using Bats:

Please feel free to submit pull requests and file bugs on the issue tracker.

Ruby on Rails — один из самых популярных среди разработчиков наборов приложений для создания сайтов и веб-приложений. Язык программирования Ruby в сочетании с системой разработки Rails делает разработку приложений очень простой.

Вы можете легко установить Ruby и Rails с помощью инструмента командной строки rbenv. Использование rbenv обеспечит надежную среду для разработки приложений Ruby on Rails, позволяющую легко сменять версии Ruby, чтобы вся команда использовала одну и ту же версию.

rbenv обеспечивает поддержку версий Ruby для конкретных приложений, позволяет изменять глобальную версию Ruby для каждого пользователя и использовать переменную среды для принудительного определения версии Ruby.

В этом обучающем модуле вы научитесь выполнять установку Ruby и Rails с помощью rbenv.

Предварительные требования

Для данного обучающего модуля вам потребуется следующее:

  • Один сервер Ubuntu 18.04, настроенный в соответствии с руководством по начальной настройке сервера Ubuntu 18.04, включая пользователя sudo без прав root и брандмауэр.
  • Node.js, установленный через официальный PPA в соответствии с указаниями руководства Установка Node.js в Ubuntu 18.04. Некоторые функции Rails, в том числе Asset Pipeline, используют среду исполнения JavaScript. Node.js обеспечивает этот функционал.

Шаг 1 – Установка rbenv и зависимостей

Ruby использует несколько пакетов, которые вы можете установить с помощью диспетчера пакетов. После их установки вы можете установить rbenv и использовать его для установки Ruby,

Вначале обновите список пакетов:

Затем установите зависимости, необходимые для установки Ruby:

После загрузки зависимостей вы можете установить саму утилиту rbenv. Клонируйте репозиторий rbenv из GitHub в каталог

/.rbenv/bin в $PATH , чтобы иметь возможность использовать утилиту командной строки rbenv . Для этого измените файл

/.bashrc , чтобы он влиял на будущие сеансы входа в систему:

Затем добавьте команду eval "$(rbenv init -)" в файл

/.bashrc , чтобы утилита rbenv загружалась автоматически:

Затем примените изменения, внесенные в файл

/.bashrc , для текущего сеанса оболочки:

Проверьте правильность настройки rbenv с помощью команды type , которая выводит дополнительную информацию о команде rbenv :

В окне терминала будет отображаться следующее:

Затем установите плагин ruby-build. Этот плагин добавляет команду rbenv install , упрощающую процесс установки новых версий Ruby:

Итак, вы установили rbenv и ruby-build. Теперь выполним установку Ruby.

Шаг 2 – Установка Ruby с помощью ruby-build

После установки плагина ruby-build вы можете устанавливать требуемые версии Ruby с помощью простой команды. Вначале выведем список всех доступных версий Ruby:

Эта команда должна вывести длинный список версий, которые вы можете установить.

Мы установим Ruby 2.5.1 :

Установка Ruby может быть длительным процессом, поэтому будьте готовы к тому, что установка займет некоторое время.

После завершения установки установите новую версию как версию Ruby по умолчанию с помощью субкоманды global :

Проверьте правильность установки Ruby, проверив номер версии:

Если вы установили версию Ruby 2.5.1, результат выполнения этой команды должен выглядеть примерно так:

Чтобы установить и использовать другую версию Ruby, запустите команду rbenv с другим номером версии, например, rbenv install 2.3.0 или rbenv global 2.3.0 .

Теперь у вас имеется хотя бы одна установленная версия Ruby, и вы выбрали версию Ruby по умолчанию. Теперь мы настроим Gems и Rails.

Шаг 3 — Работа с Gems

Gems — это способ распределения библиотек Ruby. Вы можете использовать команду gem для управления этим распределением. Мы используем эту команду для установки Rails.

При установке gem процедура установки генерирует локальную документацию. Это может значительно увеличить время установки gem, так что отключите генерирование локальной документации, создав файл

/.gemrc с параметром конфигурации, отключающим эту функцию:

Bundler — это инструмент, управляющий зависимостями gem в проектах. Далее установите компонент Bundler, поскольку Rails зависит от него.

Вывод будет выглядеть следующим образом:

Вы можете использовать команду gem env (субкоманда env означает среду ), чтобы узнать больше о среде и конфигурации gems. Вы можете увидеть место установки gems с помощью аргумента home , примерно так:

Результат будет выглядеть примерно так:

После настройки gems вы можете установить Rails.

Шаг 4 – Установка Rails

Чтобы установить Rails, нужно использовать команду gem install с флагом -v для указания версии. Для данного обучающего модуля мы используем версию 5.2.0:

Примечание. Если вы хотите установить другую версию Rails, вы можете вывести список допустимых версий Rails, выполнив поиск, в результате которого будет выведен длинный список возможных версий. Затем мы можем установить определенную версию, например 4.2.7 :

Если вы хотите установить последнюю версию Rails, запустите команду без указания версии:

rbenv создает каталог shims, указывающий на файлы, которые используются текущей активной версией Ruby. Используя субкоманду rehash , rbenv сохраняет shims в этом каталоге для соответствия всех команд Ruby во всех установленных версиях Ruby на вашем сервере. При установке новой версии Ruby или элемента gem, который предоставляет команды, наподобие Rails, нужно использовать следующую команду:

Проверьте правильность установки Rails, распечатав версию с помощью следующей команды:

Если установка выполнена надлежащим образом, вы увидите установленную версию Rails:

Теперь вы можете начать тестирование установки Ruby on Rails и разработку веб-приложений. Давайте посмотрим, как обновлять rbenv.

Шаг 5 – Обновление rbenv

Поскольку вы установили rbenv вручную с помощью Git, вы можете обновить установленную версию до последней в любое время, запустив команду git pull в каталоге

Это обеспечит использование последней актуальной версии rbenv.

Шаг 6 – Удаление версий Ruby

После загрузки дополнительных версий Ruby в каталоге

/.rbenv/versions может оказаться слишком много версий. Используйте в плагине ruby-build субкоманду uninstall для удаления ненужных предыдущих версий.

Например, следующая команда удалит версию Ruby 2.1.3 :

Команда rbenv uninstall позволяет удалять старые версии Ruby, чтобы в каталоге были установлены только используемые версии.

Шаг 7 – Удаление rbenv

Если вы решите больше не использовать утилиту rbenv, вы можете удалить ее из своей системы.

Для этого вначале откройте в редакторе файл

Найдите в файле следующие две строки и удалите их:

Сохраните файл и выйдите из редактора.

Затем удалите rbenv и все установленные версии Ruby с помощью следующей команды:

Выйдите из системы и снова войдите в нее, чтобы применить изменения в оболочке.

Заключение

В этом обучающем модуле вы установили rbenv и Ruby on Rails. Теперь вы можете узнать больше о повышении безопасности этих сред.

Узнайте, как использовать Ruby on Rails с PostgreSQL или MySQL вместо базы данных по умолчанию sqlite3, чтобы обеспечить дополнительную масштабируемость, централизацию и стабильность ваших приложений. По мере роста ваших потребностей вы также можете изучить масштабирование приложений Ruby on Rails на нескольких серверах.

Читайте также: