Slackware This Forum is for the discussion of Slackware Linux.
|
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
01-04-2014, 08:20 AM
|
#1
|
Member
Registered: Jan 2012
Location: Directly above the center of the earth
Distribution: Slackware. There's something else?
Posts: 383
Rep:
|
Ruby2 instead of stock Ruby...
I'm using Slackware 14.0 and noticed that Ruby is now at 2.1.0.
How do I now get my system to use the Ruby2 instead of the stock Ruby 1.9?
|
|
|
01-04-2014, 10:25 AM
|
#2
|
Member
Registered: Sep 2012
Posts: 459
Rep: 
|
Nothing on the system really uses Ruby should it should be safe to upgrade. I would download the slackbuild from
http://mirror.nexcess.net/slackware/...uby.SlackBuild
Download the version of Ruby you want and run the Slackbuild script. You probably want to comment out the --enable-pthread, as I don't think it the configure script for recent Ruby releases use that switch anymore.
Then you can install the resulting package with upgradepkg
I use Ruby quite a bit but have never compiled it form source on Slackware 1.9.3 has been good enough for. I have had to build from source to upgrade some RHEL systems off of the ancient 1.8.7 release they are still on. It does not have an excessive amount of dependencies or complex install requirements so I don't think you will have any problems.
|
|
|
01-04-2014, 03:10 PM
|
#3
|
Member
Registered: Jan 2012
Location: Directly above the center of the earth
Distribution: Slackware. There's something else?
Posts: 383
Original Poster
Rep:
|
Can't use "upgradepkg" as it doesn't see 'ruby2' anywhere (which is what the package from slackbuilds.org and the tarball is named) and the system seems to see a difference in the two (I guess rightly so?).
I am going to try the build script used for the stock 1.9 that came on the Slackware 14.0 that you mentioned and see how that works.
|
|
|
01-04-2014, 03:28 PM
|
#4
|
Member
Registered: Jan 2012
Location: Directly above the center of the earth
Distribution: Slackware. There's something else?
Posts: 383
Original Poster
Rep:
|
I just noticed that with the stock script for building ruby2 from slackbuilds.org also puts ruby2 in it's own directory in the / directory. I guess that meant that it would be a separate 'ruby' or something like that.
Anyway, I built ruby2 with the script from Slackware 14.0 meant for ruby1 and it installed just fine and no separate directory for it in root, so hopefully the system will use it instead of looking for ruby 1.9 (which I used 'removepkg' on before installing ruby2).
|
|
|
01-05-2014, 09:48 AM
|
#5
|
Senior Member
Registered: Feb 2009
Posts: 1,727
|
if you do not need it system wide, but for your local development, have a look at Ruby Version Manager (RVM)
http://rvm.io/
its like virtualenv for python,
its wildly the recommended way for developing your ruby app anyway.
|
|
|
01-05-2014, 07:28 PM
|
#6
|
Member
Registered: Jul 2004
Distribution: Void Linux, former Slackware
Posts: 498
Rep: 
|
- There are a few Slackware packages that do install specific files for stock Ruby 1.9.x like obexftp, qtruby, korundum.
- It's relatively safe to upgrade to Ruby 2.x and optionally rebuild those packages if required. I'd recommend to keep just one system install of Ruby.
- I'd suggest to keep other Ruby versions besides mentioned RVM in rbenv which find less intrusive. Do use ruby-build from the same place to actually build them.
- Ruby 2.1 is the development branch, the current stable is 2.0 . I'd also welcome Slackware-current would switch to this version as many relevant projects are moving or already moved towards it and Rails 4.0 . Just my

Last edited by dunric; 01-05-2014 at 07:30 PM.
|
|
|
01-07-2014, 08:23 AM
|
#7
|
Member
Registered: Mar 2013
Location: Florida, USA
Distribution: Slackware, FreeBSD
Posts: 210
Rep:
|
Go the Ruby Web site. Get the source code. Get the documentation as well: There's plenty of it, but the programming references and such are separate downloads; the standard-library documentation in particular is rather large. configure. make. make install. It's been a while, but I remember that it has a build/installer that's different from normal. You might read the directions to get the Ruby-installer equivalent of "./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var". At least get the prefix set. Ruby 2.0 worked fine for me on Slackware 14.0 and FreeBSD as well. There might be a different install procedure for building the docs to make them all nice and HTML-ized.
|
|
|
01-07-2014, 11:03 AM
|
#8
|
Member
Registered: Jul 2004
Distribution: Void Linux, former Slackware
Posts: 498
Rep: 
|
Quote:
Originally Posted by mlslk31
Go the Ruby Web site. Get the source code. Get the documentation as well: There's plenty of it, but the programming references and such are separate downloads; the standard-library documentation in particular is rather large. configure. make. make install. It's been a while, but I remember that it has a build/installer that's different from normal. You might read the directions to get the Ruby-installer equivalent of "./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var". At least get the prefix set. Ruby 2.0 worked fine for me on Slackware 14.0 and FreeBSD as well. There might be a different install procedure for building the docs to make them all nice and HTML-ized.
|
I would strongly discourage to do direct installs with make or any other way avoiding Slackware's packaging system as it can mess your filesystem. Build a package with a SlackBuild and do a normal install with install(upgrade)pkg. Even stock SlackBuild for Ruby should work, just change the version variable.
|
|
|
All times are GMT -5. The time now is 01:54 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|