[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

ruby-opengl gem not working on 1.9?

TPReal

3/3/2009 11:16:00 AM

Hello. I have a problem with making ruby-opengl work on Ruby 1.9.1,
Windows.

I download the gem named ruby-opengl-0.60.1-x86-mswin32.gem and install
it - the installation is successful. But then when I try to require
'opengl', I get a Windows error that the file msvcrt-ruby18.dll cannot
be loaded.

If I take the file msvcrt-ruby18.dll from Ruby 1.8.6 and put it in 1.9's
bin dir, then I get:
[BUG] cross-thread violation on rb_gc()
ruby 1.8.6 (2008-08-11) [i386-mswin32]
So the error says that I'm using Ruby 1.8, but at the time of this test
Ruby 1.8 wasn't even on my PATH (I renamed its directory to avoid
collisions).

But if I take the file msvcrt-ruby191.dll that comes with Ruby 1.9 and
rename it to msvcrt-ruby18.dll then I get an elaborate segmentation
fault from gl.so (but at least now the Ruby version reported is ruby
1.9.1p0).

I see that the name msvcrt-ruby18.dll is referenced from inside gl.so,
glu.so and glut.so, so it looks to me like there's no way to use it
under Ruby 1.9 without recompiling or something. But is there any
simpler solution? I'd rather not compile opengl myself.

I can't find any information about the problems I encounter on the
ruby-opengl's website nor anywhere. All I see is they suggest that it
should work with Ruby 1.9 too. Anyone else has had this kind of
problems?

Thanks in advance.
--
Posted via http://www.ruby-....

6 Answers

Jan Dvorak

3/3/2009 7:59:00 PM

0

Thomas B. wrote:
> Hello. I have a problem with making ruby-opengl work on Ruby 1.9.1,
> Windows.
>
> I download the gem named ruby-opengl-0.60.1-x86-mswin32.gem and install
> it - the installation is successful. But then when I try to require
> 'opengl', I get a Windows error that the file msvcrt-ruby18.dll cannot
> be loaded.
>
>
Yes, ruby 1.8 and 1.9 are not binary compatible in general, the binary
gem on rubyforge is intended for use with ruby 1.8. I just uploaded on
rubyforge gem compiled against 1.9.1
(ruby-opengl-0.60.1-x86-mswin32-ruby19.gem
<http://rubyforge.org/frs/download.php/52648/ruby-opengl-0.60.1-x86-mswin32-ruby...),
so try that out. It should work with ruby 1.9.1 from ruby-lang.org (or
any other 1.9 version compiled with MSVC6).

Jan


TPReal

3/3/2009 8:20:00 PM

0

Jan Dvorak wrote:
> Yes, ruby 1.8 and 1.9 are not binary compatible in general, the binary
> gem on rubyforge is intended for use with ruby 1.8. I just uploaded on
> rubyforge gem compiled against 1.9.1
> (ruby-opengl-0.60.1-x86-mswin32-ruby19.gem
> <http://rubyforge.org/frs/download.php/52648/ruby-opengl-0.60.1-x86-mswin32-ruby...),
> so try that out. It should work with ruby 1.9.1 from ruby-lang.org (or
> any other 1.9 version compiled with MSVC6).
>
> Jan

Seems to work with no problems. Thank you very much! I'm going to use
Ruby with OpenGL in my MSc project so it's really great that I can use
Ruby 1.9 now.

Tom.
--
Posted via http://www.ruby-....

Eric Hodel

3/3/2009 10:23:00 PM

0

On Mar 3, 2009, at 11:58, Jan Dvorak wrote:
> Thomas B. wrote:
>> Hello. I have a problem with making ruby-opengl work on Ruby 1.9.1,
>> Windows.
>>
>> I download the gem named ruby-opengl-0.60.1-x86-mswin32.gem and
>> install
>> it - the installation is successful. But then when I try to require
>> 'opengl', I get a Windows error that the file msvcrt-ruby18.dll
>> cannot
>> be loaded.
>>
>>
> Yes, ruby 1.8 and 1.9 are not binary compatible in general, the binary
> gem on rubyforge is intended for use with ruby 1.8. I just uploaded on
> rubyforge gem compiled against 1.9.1
> (ruby-opengl-0.60.1-x86-mswin32-ruby19.gem
> <http://rubyforge.org/frs/download.php/52648/ruby-opengl-0.60.1-x86-mswin32-...
> >),
> so try that out. It should work with ruby 1.9.1 from ruby-lang.org (or
> any other 1.9 version compiled with MSVC6).

You should set required_ruby_version in for your gem as well.

Jan Dvorak

3/4/2009 2:29:00 AM

0

Eric Hodel wrote:
> You should set required_ruby_version in for your gem as well.
Thanks, it should be set now for both binary gems.

Jan


JP

2/2/2010 6:32:00 PM

0

That'll be tough. One way is to simply pull all the data in as-is,
then use a Pivot Table (with its grouping feature) to aggregate the
data by date. You can group by month:
http://www.mrexcel.com/articles/pivot-table-group-dates-by...

Or, edit (or create) the query, then in the MS query window, go to
View > Criteria and click the SQL button. You're viewing the SQL query
that is being run against your data source. Add the GROUP BY statement
after the FROM statement, i.e.

SELECT Products, Sales, OrderDate
FROM OrdersTable
GROUP BY Sales

will show you the count of sales for each product. But since you have
the OrderDate column, you won't get the totals, because each order is
probably on a different date, which will cause each sale to be broken
out into its own row regardless of the GROUP BY statement's directive.
In that case you might want to try an Access group for the appropriate
SQL query statement:

http://groups.google.com/group/microsoft.public.access.ex...

--JP

On Feb 2, 1:15 pm, "H.G. Lamy" <Enterp...@web.de> wrote:
> J.P.,
>
> thanks for feedback.
>
> Instead of something like:
>
> PRODUCTS         SALES         ORDERDATE
> Cheese                  123               3/3/2009
> Cheese                   456              3/12/2009
> Milk....
> etc.
>
> I would like to aggregate (group) the single dates to months:
>
> PRODUCTS         SALES         ORDERDATE
> Cheese                   579              March 2009
> Milk....
> etc.
>
> Is there any way to have Microsoft Query doing that ?
>
> Thank you in advance.
>
> hgl
>
> "JP" <jp2...@earthlink.net> wrote in message
>
> news:ad7364fe-873b-4538-af37-032b8b61e295@m4g2000vbn.googlegroups.com...
> Excel version?
>
> Can you give an example of what the output would look like?
>
> --JP
>
> On Feb 2, 7:00 am, "H.G. Lamy" <Enterp...@web.de> wrote:
>
>
>
> > Hello,
>
> > is it possible to aggregate lots of daily billing dates to 12 months in
> > Microsoft Query, before returning the data to Excel?
> > Thank you in advance.
>
> > Kind regards,
>
> > H.G. Lamy- Hide quoted text -
>
> - Show quoted text -

H.G. Lamy

2/2/2010 8:13:00 PM

0

JP,

thank you. I suspected taht inside MS Query it would be tough to realize, as
you said.
While not an "immediate" solution, grouping later in Excel is an easier way.

Kind regards,

hgl

"JP" <jp2112@earthlink.net> wrote in message
news:eb70a29d-b4b6-4236-aa08-41b99a25bd93@a13g2000vbf.googlegroups.com...
That'll be tough. One way is to simply pull all the data in as-is,
then use a Pivot Table (with its grouping feature) to aggregate the
data by date. You can group by month:
http://www.mrexcel.com/articles/pivot-table-group-dates-by...

Or, edit (or create) the query, then in the MS query window, go to
View > Criteria and click the SQL button. You're viewing the SQL query
that is being run against your data source. Add the GROUP BY statement
after the FROM statement, i.e.

SELECT Products, Sales, OrderDate
FROM OrdersTable
GROUP BY Sales

will show you the count of sales for each product. But since you have
the OrderDate column, you won't get the totals, because each order is
probably on a different date, which will cause each sale to be broken
out into its own row regardless of the GROUP BY statement's directive.
In that case you might want to try an Access group for the appropriate
SQL query statement:

http://groups.google.com/group/microsoft.public.access.ex...

--JP

On Feb 2, 1:15 pm, "H.G. Lamy" <Enterp...@web.de> wrote:
> J.P.,
>
> thanks for feedback.
>
> Instead of something like:
>
> PRODUCTS SALES ORDERDATE
> Cheese 123 3/3/2009
> Cheese 456 3/12/2009
> Milk....
> etc.
>
> I would like to aggregate (group) the single dates to months:
>
> PRODUCTS SALES ORDERDATE
> Cheese 579 March 2009
> Milk....
> etc.
>
> Is there any way to have Microsoft Query doing that ?
>
> Thank you in advance.
>
> hgl
>
> "JP" <jp2...@earthlink.net> wrote in message
>
> news:ad7364fe-873b-4538-af37-032b8b61e295@m4g2000vbn.googlegroups.com...
> Excel version?
>
> Can you give an example of what the output would look like?
>
> --JP
>
> On Feb 2, 7:00 am, "H.G. Lamy" <Enterp...@web.de> wrote:
>
>
>
> > Hello,
>
> > is it possible to aggregate lots of daily billing dates to 12 months in
> > Microsoft Query, before returning the data to Excel?
> > Thank you in advance.
>
> > Kind regards,
>
> > H.G. Lamy- Hide quoted text -
>
> - Show quoted text -