On Fri, Jan 21, 2011 at 6:29 AM, Piotr S. <thisredoned / gmail.com> wrote:
> I've installed ruby-opengl through sudo gem install because there were
> errors otherwise and now I can't use it with 'ruby main.rb'. When I
> typed 'sudo ruby main.rb' I think it worked but there were errors
> considering hashes as they're changed in latest version of ruby (I think
> I have different ruby versions as I'm also using RVM).
> I know it's confusing

No it's not.

"I think I have different ruby versions as I'm also using RVM" -- WTF?
You "think"??? If you can say that, you may have RVM installed, but
you're *not* "using" it.

In a terminal  --

prompt$ rvm list

You'll see what rubies you have installed under rvm. Pick one, e.g.

prompt$ rvm use 1.8.7

prompt$ rvm gemset list  # now pick one of those, e.g.

prompt$ rvm use 1.8.7@example

prompt$ gem list

Now, forgetting about 'sudo' altogether, which you shouldn't use with
RVM (unless you're explicitly using the `system` ruby) install the gems
you need.

prompt$ gem install ruby-opengl

If at any point you have an error, STOP and figure out what's wrong
instead of just blindly cascading errors into the dog's breakfast you've
described above.

HTH, and good luck,
-- 
Hassan Schroeder ------------------------ hassan.schroeder / gmail.com
twitter: @hassan