LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 09-15-2008, 07:17 AM   #1
Linux.tar.gz
Senior Member
 
Registered: Dec 2003
Location: Paris
Distribution: Slackware forever.
Posts: 2,227

Rep: Reputation: 86
Post Slackware, ruby, rubygems and rubygames.


I try to do a clean install of rubygame on Slackware 12.1.

First, how do i install rubygems ?

Unzipping the archive and run ruby setup.rb is enough ?
Maybe i have to specify some path ?

Last edited by Linux.tar.gz; 09-15-2008 at 07:22 AM.
 
Old 09-15-2008, 08:22 AM   #2
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware & Slackware64 14.1
Posts: 7,029
Blog Entries: 52

Rep: Reputation: Disabled
Quote:
Originally Posted by Linux.tar.gz View Post
.

First, how do i install rubygems ?

Unzipping the archive and run ruby setup.rb is enough ?
Yes, as root.
 
Old 09-15-2008, 09:18 AM   #3
Linux.tar.gz
Senior Member
 
Registered: Dec 2003
Location: Paris
Distribution: Slackware forever.
Posts: 2,227

Original Poster
Rep: Reputation: 86
Ok, done !

Now i typed :

gem install rake

then :

gem install rubygame

Building native extensions. This could take a while...
ERROR: Error installing rubygame:
ERROR: Failed to build gem native extension.
rake RUBYARCHDIR=/usr/lib/ruby/gems/1.8/gems/rubygame-2.3.0/lib RUBYLIBDIR=/usr/lib/ruby/gems/1.8/gems/rubygame-2.3.0/lib
Dans le fichier inclus à partir de ext/rubygame/rubygame_gfx.c:23:
ext/rubygame/rubygame_gfx.h:25:31: erreur: SDL_gfxPrimitives.h : Aucun fichier ou répertoire de ce type
ext/rubygame/rubygame_gfx.h:26:26: erreur: SDL_rotozoom.h : Aucun fichier ou répertoire de ce type
ext/rubygame/rubygame_gfx.c: In function ‘rbgm_transform_rotozoom’:
ext/rubygame/rubygame_gfx.c:639: attention : assignment makes pointer from integer without a cast
ext/rubygame/rubygame_gfx.c: In function ‘rbgm_transform_zoom’:
ext/rubygame/rubygame_gfx.c:782: attention : assignment makes pointer from integer without a cast
ext/rubygame/rubygame_gfx.c: In function ‘rbgm_transform_zoom_to’:
ext/rubygame/rubygame_gfx.c:815: attention : assignment makes pointer from integer without a cast
rake aborted!
Command failed. Aborting.
/usr/lib/ruby/gems/1.8/gems/rubygame-2.3.0/Rakefile:22:in `try_shell'
(See full trace by running task with --trace)
(in /usr/lib/ruby/gems/1.8/gems/rubygame-2.3.0)
Compiling rubygame/rubygame_main.c
Compiling rubygame/rubygame_shared.c
Compiling rubygame/rubygame_event.c
Compiling rubygame/rubygame_gl.c
Compiling rubygame/rubygame_joystick.c
Compiling rubygame/rubygame_screen.c
Compiling rubygame/rubygame_surface.c
Compiling rubygame/rubygame_time.c
Linking compiled files to create rubygame/rubygame_core.so
Compiling rubygame/rubygame_gfx.c


Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/rubygame-2.3.0 for inspection.
Results logged to /usr/lib/ruby/gems/1.8/gems/rubygame-2.3.0/gem_make.out
bash-3.1#


When i launch this :

1 #! /usr/bin/ruby -w
2
3 require ‘rubygame‘
4
5 Rubygame.init
6 screen = Rubygame::Screen.new [640, 400]
7 loop {}
8

I got this :

bash-3.1$ ruby rubytest.rb
rubytest.rb:3: syntax error, unexpected tIDENTIFIER, expecting $end
3 require ‘rubygame‘
^
bash-3.1$

What have i done wrong ?
 
Old 09-15-2008, 10:20 AM   #4
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware & Slackware64 14.1
Posts: 7,029
Blog Entries: 52

Rep: Reputation: Disabled
Mmm, no idea. What does that:
Quote:
Results logged to /usr/lib/ruby/gems/1.8/gems/rubygame-2.3.0/gem_make.out
gem_make.out say?

Last edited by brianL; 09-15-2008 at 10:21 AM.
 
Old 09-15-2008, 10:36 AM   #5
Linux.tar.gz
Senior Member
 
Registered: Dec 2003
Location: Paris
Distribution: Slackware forever.
Posts: 2,227

Original Poster
Rep: Reputation: 86
I need glasses...

cat /usr/lib/ruby/gems/1.8/gems/rubygame-2.3.0/gem_make.out

rake RUBYARCHDIR=/usr/lib/ruby/gems/1.8/gems/rubygame-2.3.0/lib RUBYLIBDIR=/usr/lib/ruby/gems/1.8/gems/rubygame-2.3.0/lib
Dans le fichier inclus à partir de ext/rubygame/rubygame_gfx.c:23:
ext/rubygame/rubygame_gfx.h:25:31: erreur: SDL_gfxPrimitives.h : Aucun fichier ou répertoire de ce type
ext/rubygame/rubygame_gfx.h:26:26: erreur: SDL_rotozoom.h : Aucun fichier ou répertoire de ce type
ext/rubygame/rubygame_gfx.c: In function ‘rbgm_transform_rotozoom’:
ext/rubygame/rubygame_gfx.c:639: attention : assignment makes pointer from integer without a cast
ext/rubygame/rubygame_gfx.c: In function ‘rbgm_transform_zoom’:
ext/rubygame/rubygame_gfx.c:782: attention : assignment makes pointer from integer without a cast
ext/rubygame/rubygame_gfx.c: In function ‘rbgm_transform_zoom_to’:
ext/rubygame/rubygame_gfx.c:815: attention : assignment makes pointer from integer without a cast
rake aborted!
Command failed. Aborting.
/usr/lib/ruby/gems/1.8/gems/rubygame-2.3.0/Rakefile:22:in `try_shell'
(See full trace by running task with --trace)
(in /usr/lib/ruby/gems/1.8/gems/rubygame-2.3.0)
Compiling rubygame/rubygame_main.c
Compiling rubygame/rubygame_shared.c
Compiling rubygame/rubygame_event.c
Compiling rubygame/rubygame_gl.c
Compiling rubygame/rubygame_joystick.c
Compiling rubygame/rubygame_screen.c
Compiling rubygame/rubygame_surface.c
Compiling rubygame/rubygame_time.c
Linking compiled files to create rubygame/rubygame_core.so
Compiling rubygame/rubygame_gfx.c
 
Old 09-17-2008, 04:33 PM   #6
Linux.tar.gz
Senior Member
 
Registered: Dec 2003
Location: Paris
Distribution: Slackware forever.
Posts: 2,227

Original Poster
Rep: Reputation: 86
Got SDL error :
ext/rubygame/rubygame_gfx.h:25:31: erreur: SDL_gfxPrimitives.h : Aucun fichier ou répertoire de ce type

Got SlackBuild :
http://slackbuilds.org/repository/12...aries/SDL_gfx/

Got build :
installpkg /tmp/SDL_gfx-2.0.17-i486-1_SBo.tgz

Got rubygame :
bash-3.1# gem install rubygame
Building native extensions. This could take a while...
Successfully installed rubygame-2.3.0
1 gem installed
Installing ri documentation for rubygame-2.3.0...
Installing RDoc documentation for rubygame-2.3.0...
bash-3.1#

Got slack.

Thanks.
 
  


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
error when emerging rubygems *CLI> Linux - Server 2 03-25-2008 03:16 PM
Ruby SDL/ Ruby OpenGL tutorials/reference? LinuxNoob75 Programming 0 12-30-2007 12:47 PM
Installing ruby with rails+mysql+apache on Slackware 10.2 from source paultoytoy Slackware 1 09-08-2006 12:01 PM
LXer: RubyGems LXer Syndicated Linux News 0 05-28-2006 05:03 AM
HOWTO put Ruby on Rails on your Slackware box Marsanghas Slackware 2 04-16-2005 04:13 PM


All times are GMT -5. The time now is 06:49 AM.

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