Forum: Ruby library sdl (cannot load such file)

Be3807af8acad6ae4f9d413bb26319d4?d=identicon&s=25 Deniz Po (deniz_)
on 2013-03-19 19:05
Why i have always:

/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in
`require': cannot load such file -- sdl (LoadError)

i've already made:
$ sudo apt-get install libsdl1.2-dev (libsdl1.2-dev is already the
newest version.)
and
$ sudo gem install -r rubysdl and
and
$sudo apt-get install libsdl-ruby (libsdl-ruby is already the newest
version.)
and even: $ rvm remove 1.9.3 and $ rvm install 1.9.3

But always this "cannot load such file"!!! Whyyy ? What else does it
want ?
Abdb670e1c130f96f947a94d03c02efa?d=identicon&s=25 Eric Christopherson (echristopherson)
on 2013-03-19 19:36
(Received via mailing list)
On Tue, Mar 19, 2013 at 1:05 PM, Deniz Po <lists@ruby-forum.com> wrote:
> and
> $sudo apt-get install libsdl-ruby (libsdl-ruby is already the newest
> version.)
> and even: $ rvm remove 1.9.3 and $ rvm install 1.9.3
>
> But always this "cannot load such file"!!! Whyyy ? What else does it
> want ?

Have you tried running gem without sudo?
3853dd5371ac1e094fc45d6c2aa0e459?d=identicon&s=25 Carlo E. Prelz (Guest)
on 2013-03-20 06:54
(Received via mailing list)
Subject: library sdl (cannot load such file)
  Date: mer 20 mar 13 03:05:59 +0900

Quoting Deniz Po (lists@ruby-forum.com):

> Why i have always:
>
>
/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in
> `require': cannot load such file -- sdl (LoadError)

I do not use rvm, and I try to stay as clear as possible from
gems. Your problem is probably related to one of these two
technologies, so I really can't give you a solution. But if you are
using Linux, I can suggest a way to shed some light.

Say your script is called script.rb Run it like this:

strace -eopen ruby script.rb 2>/tmp/output

This command dumps a line in /tmp/output for each file that is opened,
or fails to be opened.

Your error message indicates that you cannot find file sdl.rb. Thus,
do:

grep sdl.rb /tmp/output

you will see where the Ruby interpreter looks for your file. The
places will not include the directory where the file included in the
gem has been installed.

From then on, it really depends on what you find out. It may be that
you were running another instance of the ruby interpreter when you
loaded the gem, for example.

You need to research a bit more, it seems.

Carlo
Adf7d4a2a49161a48ca1863a49f8af37?d=identicon&s=25 Carlos Agarie (Guest)
on 2013-03-20 07:40
(Received via mailing list)
Hey, can you post more information? Do you have any file that is
requiring
sdl?

Also, you should update your Ruby to 1.9.3-p392. :P


-----
Carlos Agarie
Skype: carlos.agarie

Control engineering
Polytechnic School, University of So Paulo, Brazil
Computer engineering
Embry-Riddle Aeronautical University, USA


2013/3/19 Carlo E. Prelz <fluido@fluido.as>
3853dd5371ac1e094fc45d6c2aa0e459?d=identicon&s=25 Carlo E. Prelz (Guest)
on 2013-03-20 08:09
(Received via mailing list)
Subject: Re: library sdl (cannot load such file)
  Date: mer 20 mar 13 03:40:01 +0900

Quoting Carlos Agarie (carlos.agarie@gmail.com):

> Hey, can you post more information? Do you have any file that is requiring
> sdl?

I have written lots of code that requires sdl, but I compile both Ruby
and the Sdl library. My examples would do you no good.

> Also, you should update your Ruby to 1.9.3-p392. :P

$ ruby -v
ruby 2.0.0dev (2013-01-02 trunk 38676) [x86_64-linux]

:-/

Carlo
Be3807af8acad6ae4f9d413bb26319d4?d=identicon&s=25 Deniz Po (deniz_)
on 2013-03-20 08:29
Attachment: output (20 KB)
>> Hey, can you post more information? Do you have any file that is requiring
>> sdl?

> $ ruby -v
> ruby 2.0.0dev (2013-01-02 trunk 38676) [x86_64-linux]

Hey Carlos,

here file attached
and -v ok; ruby 1.9.3p286 (2012-10-12 revision 37165) [x86_64-linux]

i return in some hours, sorry
3853dd5371ac1e094fc45d6c2aa0e459?d=identicon&s=25 Carlo E. Prelz (Guest)
on 2013-03-20 08:35
(Received via mailing list)
Subject: Re: library sdl (cannot load such file)
  Date: mer 20 mar 13 04:29:07 +0900

Quoting Deniz Po (lists@ruby-forum.com):

> here file attached

Well now search for where your sdl.rb was actually installed:

sudo find / -name sdl.rb

(might take a bit of time)

Carlo
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.