Fedora Linux Support Community & Resources Center
  #1  
Old 30th November 2009, 05:16 AM
Angelus23 Offline
Registered User
 
Join Date: Jun 2005
Posts: 19
linuxfedorafirefox
Ruby1.9

how to install this?
I tried searching for it but all I get is 1.8.
Reply With Quote
  #2  
Old 30th November 2009, 05:34 AM
Demz
Guest
 
Posts: n/a
windows_7firefox
why do you need 1.9?
Reply With Quote
  #3  
Old 30th November 2009, 05:37 AM
Angelus23 Offline
Registered User
 
Join Date: Jun 2005
Posts: 19
linuxfedorafirefox
Quote:
Originally Posted by Demz View Post
why do you need 1.9?
I bought the book: Programming Ruby1.9 by Dave Thomas

---------- Post added at 09:37 PM CST ---------- Previous post was at 09:36 PM CST ----------

btw. I know you can do this by compiling ect...
but I wonder if there's a fedora repo somewhere.
Reply With Quote
  #4  
Old 30th November 2009, 06:01 AM
Demz
Guest
 
Posts: n/a
windows_7firefox
going by this https://fedoraproject.org/wiki/Features/Ruby_1.9.1 it didnt make it into F12, maybe 13
Reply With Quote
  #5  
Old 18th January 2010, 09:23 AM
wengfedora Offline
Registered User
 
Join Date: Jan 2010
Posts: 1
linuxfedorafirefox
i've found a way to build current rpms for fedora-12.

Here a short howto:

0. First install a source rpm (ftp://sftp.mudynamics.com/pub/ruby1....p129-3.src.rpm) from labs.mudynamics.com, where Aaron made a nice rpm-spec file, that is the basis.

1. Download the actual source from the ruby developement page

wget ftp://ftp.ruby-lang.org/pub/ruby/1.9....1-p376.tar.gz

2. You need the rpmbuild-tools:

yum install rpm-build

3. If you have just yum by the hand, install tcl/tk-devel, if happened not jet:

yum install tcl-devel tk-devel

4. now unpack the ruby source files:

tar -xzf ruby-1.9.1-p376.tar.gz

5. Because of Fedora-12 you need a patch for openssl. RedHat went to Version 1.0.0 beta. I've got the Patch from :

http://redmine.ruby-lang.org/issues/show/2022

The Patch can't used directly. The following changes are necessary:

Here is the diff to show the changes i've made:

diff ruby-openssl-1.0.patch my-ruby-openssl-1.0.patch

1,3c1,3
< diff -up ruby-1.8.6.369/ruby-1.8.6-p369/ext/openssl/ossl.c.ossl10 ruby-1.8.6.369/ruby-1.8.6-p369/ext/openssl/ossl.c
< --- ruby-1.8.6.369/ruby-1.8.6-p369/ext/openssl/ossl.c.ossl10 2007-02-13 00:01:19.000000000 +0100
< +++ ruby-1.8.6.369/ruby-1.8.6-p369/ext/openssl/ossl.c 2009-08-26 12:29:41.000000000 +0200
---
> diff -up ruby-1.9.1-p376/ext/openssl/ossl.c.ossl10 ruby-1.9.1-p376/ext/openssl/ossl.c
> --- ruby-1.9.1-p376/ext/openssl/ossl.c.ossl10 2007-02-13 00:01:19.000000000 +0100
> +++ ruby-1.9.1-p376/ext/openssl/ossl.c 2009-08-26 12:29:41.000000000 +0200
31,33c31,33
< diff -up ruby-1.8.6.369/ruby-1.8.6-p369/ext/openssl/ossl_pkcs7.c.ossl10 ruby-1.8.6.369/ruby-1.8.6-p369/ext/openssl/ossl_pkcs7.c
< --- ruby-1.8.6.369/ruby-1.8.6-p369/ext/openssl/ossl_pkcs7.c.ossl10 2007-02-13 00:01:19.000000000 +0100
< +++ ruby-1.8.6.369/ruby-1.8.6-p369/ext/openssl/ossl_pkcs7.c 2009-08-26 12:53:05.000000000 +0200
---
> diff -up ruby-1.9.1-p376/ext/openssl/ossl_pkcs7.c.ossl10 ruby-1.9.1-p376/ext/openssl/ossl_pkcs7.c
> --- ruby-1.9.1-p376/ext/openssl/ossl_pkcs7.c.ossl10 2007-02-13 00:01:19.000000000 +0100
> +++ ruby-1.9.1-p376/ext/openssl/ossl_pkcs7.c 2009-08-26 12:53:05.000000000 +0200
127,129c127,129
< diff -up ruby-1.8.6.369/ruby-1.8.6-p369/ext/openssl/ossl_ssl.c.ossl10 ruby-1.8.6.369/ruby-1.8.6-p369/ext/openssl/ossl_ssl.c
< --- ruby-1.8.6.369/ruby-1.8.6-p369/ext/openssl/ossl_ssl.c.ossl10 2007-03-12 05:12:32.000000000 +0100
< +++ ruby-1.8.6.369/ruby-1.8.6-p369/ext/openssl/ossl_ssl.c 2009-08-26 12:08:48.000000000 +0200
---
> diff -up ruby-1.9.1-p376/ext/openssl/ossl_ssl.c.ossl10 ruby-1.9.1-p376/ext/openssl/ossl_ssl.c
> --- ruby-1.9.1-p376/ext/openssl/ossl_ssl.c.ossl10 2007-03-12 05:12:32.000000000 +0100
> +++ ruby-1.9.1-p376/ext/openssl/ossl_ssl.c 2009-08-26 12:08:48.000000000 +0200

Now you apply the patch:

you have to stay in the same directory where the unpacked ruby sources are:

patch -p0 < my-ruby-openssl-1.0.patch

6. Pack the sources again:

tar -czf ruby-1.9.1-p376.tar.gz ruby-1.9.1-p376/

7. Place the ruby-1.9.1-p376.tar.gz to the directory rpmbuild it wants to expect:

mv ruby-1.9.1-p376.tar.gz /usr/src/redhat/SOURCES/

8. Now it's time to customize your SPEC-file ruby-1.9.1.spec:

cd /usr/src/redhat/SPECS/

Here the difference:

# diff ruby-1.9.1.spec my-ruby-1.9.1.spec

26,28c26,28
< %define V_dist 1.9.1-p129
< %define V_subdir 1.9.1-p129
< %define V_opkg 1.9.1p129
---
> %define V_dist 1.9.1-p376
> %define V_subdir 1.9.1-p376
> %define V_opkg 1.9.1p376
32c32
< %define _patchlevel 129
---
> %define _patchlevel 376

< %{_libdir}/ruby%{rubyxver}/%{rubyver}/json
< %{_libdir}/ruby%{rubyxver}/%{rubyver}/json/pure
---
> %{_libdir}/ruby%{rubyxver}/%{rubyver}/json/*.rb
> #%{_libdir}/ruby%{rubyxver}/%{rubyver}/json/pure
228c228
< %{_libdir}/ruby%{rubyxver}/%{rubyver}/rubygems
---
> %{_libdir}/ruby%{rubyxver}/%{rubyver}/rubygems/*.rb
264,265c264,265
< %{_prefix}/lib/ruby%{rubyxver}/%{rubyver}/%{_normalized_cpu}-%{_target_os}
< %{_prefix}/lib/ruby%{rubyxver}/%{rubyver}/%{_normalized_cpu}-%{_target_os}/enc
---
> #%{_prefix}/lib/ruby%{rubyxver}/%{rubyver}/%{_normalized_cpu}-%{_target_os}
> %{_prefix}/lib/ruby%{rubyxver}/%{rubyver}/%{_normalized_cpu}-%{_target_os}/enc/*.so
341c341
< %{_datadir}/ri
---
> %{_datadir}/ri1.9


9. We are ready to build the rpms:

rpmbuild -bb ./my-ruby-1.9.1.spec

10.The RPM files you can find in /usr/src/redhat/RPMS/i686.

Install using:

rpm -ivh /usr/src/redhat/RPMS/i686/*.rpm

You can install the ruby1.9 rpm files parallel to ruby1.8.x. To call the ruby1.9 executables you have to append 1.9, for instance /usr/bin/ruby1.9.
Reply With Quote
Reply

Tags
ruby19

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump


Current GMT-time: 16:55 (Tuesday, 21-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat