There is a bunch of ways to install Ruby, what is the proper way for Tisquel?

13 respostas [Última entrada]
northernarcher
Desconectado
Joined: 12/24/2014

For whatever reasons the version of Ruby that one can get in the Trisquel repos is old. Too old to be useful. I try to install Jekyll and get this -

grey@x60:~$ sudo gem install jekyll
ERROR: Error installing jekyll:
jekyll requires Ruby version >= 2.0.0.

There are a few different way to go about installing Ruby, like RVM. But with RVM I can basically only use the Ruby that RVM provides, from the terminal. Other programs don't 'see' that it's there. I've found a few other answers as well. So what should I use? I thought the link at the bottom MAY work but it's pretty old. You thoughts, please? Thanks.

https://stackoverflow.com/questions/16222738/how-do-i-install-ruby-2-0-0-correctly-on-ubuntu-12-04

northernarcher
Desconectado
Joined: 12/24/2014

Wow, great typo.

Legimet
Desconectado
Joined: 12/10/2013

Ruby 2.0 is in the repos of Trisquel 7.0.

northernarcher
Desconectado
Joined: 12/24/2014

It does say that, but installing the ruby2.0 package actually gives you ruby1.9.3, I don't know why, but it does.

MeNoMore
Desconectado
Joined: 10/05/2015

sudo apt-get install ruby-full

Try that?
The ruby-full package provides Ruby 1.9.3, which is an old stable release, on Debian and Ubuntu. So just update it?

Reference: https://www.ruby-lang.org/en/documentation/installation/

Calinou
Desconectado
Joined: 03/08/2014

Install ruby2.0 and ruby2.0-dev.

northernarcher
Desconectado
Joined: 12/24/2014

Installing both of those on my system actually gave me Ruby1.9.3.

http://pastebin.com/7j8M41W4

onpon4
Desconectado
Joined: 05/30/2012

I'm not familiar with Ruby, but I suspect you've actually got two ruby binaries, because Ruby 1 is still there, and that Ruby 1 is the one called "ruby". Kind of similar to how there's Python 2 and Python 3, but only Python 2 gets to be aliased to "python". :) Did you try something like "ruby2"?

SuperTramp83

I am a translator!

Desconectado
Joined: 10/31/2014

That's right Onpon. I have a ruby and a ruby2.1 here.

Christopher M. Hobbs
Desconectado
Joined: 11/22/2015

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sun, 22 Nov 2015 21:08:23 +0100 (CET)
name at domain wrote:

> I'm not familiar with Ruby, but I suspect you've actually got two
> ruby binaries, because Ruby 1 is still there, and that Ruby 1 is the
> one called "ruby". Kind of similar to how there's Python 2 and Python
> 3, but only Python 2 gets to be aliased to "python". :) Did you try
> something like "ruby2"?

This is likely the case.

Speaking as a Ruby developer, you're better off just not using Ruby
version provided from apt. Use a utility like rbenv (my personal
favorite), chruby, or rvm (as a last resort) with ruby-install or
ruby-build.

Ruby is a mess.

cmh
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)

iQIcBAEBAgAGBQJWUks+AAoJEP4mb/sadwhodS8P/Ao30IFSV5vNT549k0TeJ8M1
toeIviSc4bH4SGE1acTBsJJuMUNR+z+/oQWYI+mrI1cW2v4rR7QPQjNkCBSw7bKU
YrctWpS+P7aMF16/T6znbOkjvuHRQbXemEensVv/SOO3fa7puRMtF2+hE+sHFgWK
cf9JSZN4SLrSFtJ/OKS2kvMp4dDGyDOPYfIwkBZqPSWhyMytJmygaVNbO5vLhrnA
+IDuYffS0SSqozU3KW/buGdCG/oDZDL/R2sKz8AkWx+RyWI7gH14IBaFeQHsD7Xm
o6jH5Zd5iQUM6ioAK93kd7ZZZ5mOTkGiZbjiKOo4wCVZEGxL3uv5VKX3QiM6L20I
T9DE2qybkyLXxm/u6Btfjs/UD741kPawvkJyARtNZ4/jNIziV1fd9OpKmgrZiKoD
kC90euAKFhNRLk8uI31/m09TKBuSN4gVp9ZZ+E75D3WGCjkrEJMXa/6drkmKRKqp
djutYEL5K4Qtc/EHy3OiU1Z4RE3/2+ael0maQ/xq1IOv7Gq2v5+54fMpKfHca/+V
VJfeNq0Vs0P40sk3j+McCGMhfbq85Q7zSmII2v0/dj6ERXJZQqykowAnIIHfQEjC
f9BTNK4Ec8hi2gmFOgn9RGH3qcYaJu1iUnwsRyIegjsIfm8yB31YWd/nFgnG1shx
7tJMuIMgA7ru8814ijwx
=+Emr
-----END PGP SIGNATURE-----

northernarcher
Desconectado
Joined: 12/24/2014

So why rbenv?

Christopher M. Hobbs
Desconectado
Joined: 11/22/2015

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Mon, 23 Nov 2015 04:43:51 +0100 (CET)
name at domain wrote:

> So why rbenv?

Strictly because it's the one I know the most because it's imposed at
work. I tend to personally prefer chruby because it is the simplest in
design.

A while back, there was a lot of fuss about Ruby in apt with the Debian
folk. I don't recall all the details but there was some squabbling
over 1.8 and moving to 1.9/2.0. From that point forward, I've never
trusted system ruby.

Additionally, using something like rbenv or chruby allows you to have
the most recent ruby installed locally in userland. If you combine it
with something like chgems, you can isolate gemsets should you run down
the rabbit hole of too many gems being installed on the system (often a
real problem when versions aren't explicitly declared).

cmh
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)

iQIcBAEBAgAGBQJWUpWCAAoJEP4mb/sadwhoHSgP/i60/ChXSqtVWrkGnEDDJy8w
VBCXhaqfIpo2seYez0C6XSiLX/BDiyS4qe3Tcf3UF97jOuSF2KitZUeO4JuozMM7
vjQB8L8o4tvkPvFcc80G+n+rgl3JlWgc9aad3bSaz7i9deAal7LRB4t0kBNmZch7
8gVPjghP5Qd2DlHWV0hVH8d8+T3G3oMCQcPyxVIPLDO6XaUSFT4xUck6ZWHwCLRp
8eUzgaF9sJWOCvX+STY47A06fb+nRH9/gb9nmWj3NjfKUJzIWDqFdYYYqeCaiwsn
PeKjGhETZq1SQN+98+CT4SfwV2nhJpN9dAlTKBBTvCbrtz4pLFe3kQOE/Jswiz5F
8fLeMNM/6anmlaPXQo/sCew3ZezRdOwUQxs4rf5LXiPZnbRhfqstlDm04dfPZUkq
2PT2GvkHx3oSno8gZbgAyQpSBVONKIB34F7R7YpifnCM17WqaeTfZonaTSkeyYbc
eSXyA9/14xl9MaFKcLpJn3zVeb3D+G/RhPJSuCXIP3mn+yQQfKp6a1KexxK84Va5
vWRZF8N62eEKyAnXQL6ZaEHG0ilMzk+q5R8RnGs2zP5rnCl/qDygUZ4PFsZDpTbZ
YhaREdiQL98FsubykjWz7AuzGfTfHSNYvzNwHko6jYtrJX7NJ48czp05Krqv6VCI
YyouStNv7VXSgvsk5Ez/
=u5Bd
-----END PGP SIGNATURE-----

natemow
Desconectado
Joined: 12/17/2015

I wound up here trying to get an existing Jekyll project to run on my new Trisquel 7 mini installation -- I wound up following this guide (which does use RVM) and was up and running in a few minutes: https://www.digitalocean.com/community/tutorials/how-to-install-ruby-on-rails-on-an-debian-7-0-wheezy-vps-using-rvm

natemow
Desconectado
Joined: 12/17/2015

I wound up here trying to get an existing Jekyll project to run on my new
Trisquel 7 mini installation -- I wound up following this guide (which does
use RVM) and was up and running in a few minutes:
https://www.digitalocean.com/community/tutorials/how-to-install-ruby-on-rails-on-an-debian-7-0-wheezy-vps-using-rvm