How to install rvm in Debian

Asked

Viewed 122 times

0

I’m trying to install the RVM but I’m not getting it. When checking the dependencies it complains about the package libgmp-dev that is not installed and when trying to install it is not located.

From what I’ve been researching and it seems that there really is no such package for Squeeze or the package is under another name...

3 answers

0

Rafael, I don’t have debian to test.

At present with Mint installed any test done would not be valid.

So I suggest you try to install a version compatible with the latest debian distribution contained on this page:

https://packages.debian.org/search?keywords=libgmp-dev

I hope I’ve helped.

0

Try to perform the following steps:

Install some Debian prerequisites

apt-get -y install build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion locales-all python libxml2=2.7.8.dfsg-2+squeeze6

Now try to install RVM normally

curl -L https://get.rvm.io | bash -s stable

0

Install rbenv which is much better than RVM. With git installed run this command on the terminal.

git clone https://github.com/sstephenson/rbenv.git ~/.rbenv

ruby-build, which simplifies the way Ruby is installed.

git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build

Add rbenv to $PATH. To do this run the following command:

echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc

Add the startup script to your terminal startup file. Run the command.

echo 'eval "$(rbenv init -)"' >> ~/.bashrc

Restart your terminal to load these new settings, or run the command source ~/.bashrc.

If everything worked out. You can now install ruby. To find out which versions are available, run the command rbenv install -l.

$ rbenv install -l
Available versions:
  1.8.6-p383
  1.8.6-p420
  1.8.7-p249
  1.8.7-p302
  1.8.7-p334
  ...

To install the latest version currently available, please run rbenv install 2.3.1. This process will take a while, since rbenv will compile Ruby.

When the installation is over, run the global rbenv 2.3.1 command to set the global version of Ruby/

To view the Ruby version, run ruby -v.

Own opinion about rbenv being superior to RMV and the ability to install plugins to make your life easier. One of them is rbenv-Gem-rehash, which automatically rehashing whenever a Gem is installed or removed.

"Rehashing is the process of upgrading $PATH with Gems binaries. The rbenv init command does this for you, but it is only executed when a new terminal session is started; thus, any Gem installed after this step may not work properly unless you manually execute the rbenv rehash command."

Run the following command to install the plugin:

$ git clone https://github.com/sstephenson/rbenv-gem-rehash.git ~/.rbenv/plugins/rbenv-gem-rehash

source: Blog Nando Vieira

Browser other questions tagged

You are not signed in. Login or sign up in order to post.