LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 01-04-2014, 08:20 AM   #1
irgunII
Member
 
Registered: Jan 2012
Location: Directly above the center of the earth
Distribution: Slackware. There's something else?
Posts: 377

Rep: Reputation: 65
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?
 
Old 01-04-2014, 10:25 AM   #2
chemfire
Member
 
Registered: Sep 2012
Posts: 70

Rep: Reputation: Disabled
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.
 
Old 01-04-2014, 03:10 PM   #3
irgunII
Member
 
Registered: Jan 2012
Location: Directly above the center of the earth
Distribution: Slackware. There's something else?
Posts: 377

Original Poster
Rep: Reputation: 65
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.
 
Old 01-04-2014, 03:28 PM   #4
irgunII
Member
 
Registered: Jan 2012
Location: Directly above the center of the earth
Distribution: Slackware. There's something else?
Posts: 377

Original Poster
Rep: Reputation: 65
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).
 
Old 01-05-2014, 09:48 AM   #5
a4z
Member
 
Registered: Feb 2009
Posts: 408

Rep: Reputation: 137Reputation: 137
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.
 
Old 01-05-2014, 07:28 PM   #6
dunric
Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 450

Rep: Reputation: 57
  • 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.
 
Old 01-07-2014, 08:23 AM   #7
mlslk31
Member
 
Registered: Mar 2013
Location: Florida, USA
Distribution: Slackware, FreeBSD
Posts: 109

Rep: Reputation: 30
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.
 
Old 01-07-2014, 11:03 AM   #8
dunric
Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 450

Rep: Reputation: 57
Quote:
Originally Posted by mlslk31 View Post
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Any issues installing Ruby Gems and Ruby on Rails in Slackware? Lufbery Slackware 8 02-09-2011 07:22 PM
Ruby SDL/ Ruby OpenGL tutorials/reference? LinuxNoob75 Programming 0 12-30-2007 12:47 PM
PHP v Ruby/Ruby on Rails Neko_D Linux - General 4 02-08-2007 11:56 PM
Upgrading stock 2.4.22 kernel to 2.5.x then to 2.6.6 with existing stock .config file Kyl3 Slackware 8 06-09-2004 05:34 PM


All times are GMT -5. The time now is 09:28 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration