Please use Ruby 1.9.2 when reporting issues, Ruby 1.9.1 is not granted
to be compatible with latest DevKit (was build with GCC 3.4.5) and
conflicts might show.
1.9.2 *needs* DevKit 4.5.1
Also, Ruby 1.9.1 introduced some defines that clash with MinGW (marked
them as missing but actually never checked for them)
--
Luis Lavena
AREA 17
-
Perfection in design is achieved not when there is nothing more to add,
but rather when there is nothing more to take away.
Antoine de Saint-Exupéry
> Dear Luis
>
> On 21 Jan., 15:20, Luis Lavena <luislav...@gmail.com> wrote:
>> On Fri, Jan 21, 2011 at 11:18 AM, Zeno R.R. Davatz <zdav...@gmail.com> wrote:
>
>>> I just tried to install dbd-pg on Windows with Ruby 1.9.1 and that
>>> resulted in the following error:
>>
>>> Building native extensions. This could take a while...
>>> ERROR: Error installing dbd-pg:
>>> ERROR: Failed to build gem native extension.
>>
>> Please use Ruby 1.9.2 when reporting issues, Ruby 1.9.1 is not granted
>> to be compatible with latest DevKit (was build with GCC 3.4.5) and
>> conflicts might show.
>>
>> 1.9.2 *needs* DevKit 4.5.1
>>
>> Also, Ruby 1.9.1 introduced some defines that clash with MinGW (marked
>> them as missing but actually never checked for them)
>
> But I need Ruby 1.9.1 because of the working Hash-Iterations ;) -
> http://redmine.ruby-lang.org/wiki/ruby-19/%23Hash_Iteration
Zeno, you should patch the gem(s) that use this broken behavior. To use the example given above, a very simple change makes it compatible.
- h.each_key do |k|
+ h.keys.each do |k|
That avoids the runtime exception. Fix those gems so you can use 1.9.2.
cr
Please report these issues of the gems you're using to the authors.
Send patches, help them make the code work with newer version of Ruby.
> I compiled Ruby 1.9.1 against gcc 4.5.0. Is that a problem for dbd-pg?
> I guess not.
>
No, it wouldn't. As I said Ruby defines blindly what it knows is
missing. I send patches for those things, but for 1.9.2
> Also Ruby 1.9.1 is marked as stable on the Ruby-Windows-Installer
> website.
>
No, is not marked as stable. It is available in the list of downloads
but is not actively updated by Ruby-Core and highly unlikely will get
a new version out.
Focus has been and will remain on 1.9.2 and trunk.
1.8.6 is there for legacy purposes, see the list for my previous
statement on all the above.
> I happy to check some more Ruby 1.9.1 issues on Windows.
>
Thanks, but no thanks. Ruby 1.9.2 and against trunk will be highly
appreciated instead.
I can't split my effort in track every single piece of errors of every
single version of Ruby out there. Mentioned this before. Neither I
have the effort to provide proper patches and get them pushed
upstream.
You know, the compilation problem has nothing to do with what you
entered as "fix"
Instead of massive copy and paste between list, can you at least try
to solve the problems instead of reporting?
Is way better if you provide patches instead of report the errors all
over the place.
That is the way to gain trust, everywhere.
>
> Yep. Sorry about the confusion.
>
> Ruby-1.9.1 is still marked as stable though on Windows. So that is
> confusing too. I need Ruby 1.9.1 to test
> on Windows. Seems it is not stable.
>
> Before I provide patches, I will notify the Maintainer and log the
> bug. The maintainer is mostly faster to provide a patch then I am.
Zeno,
why do you need 1.9.1 to test on Windows? If the intention is to port your application from 1.8.x, then you *need* to test it against 1.9.2. Testing against 1.9.1 won't be of much help because there are behavior differences between 1.9.1 and 1.9.2.
Test with 1.9.2 and create patches for those gems which misbehave. *That* is the way to move forward.
cr
Test::Unit
RSpec
Cucumber
All those tools helps you on that.
> Thank you for your help. And if the App works on Ruby 1.8.6 and Ruby
> 1.9.1 but then breaks on Ruby 1.9.2 I think this is strange and
> inconsistent for Ruby.
Not again!, please stop!
The Ruby-Core thread won my first mute of Gmail, please don't turn
this conversation into a second on.
1.9.0 = YARV, API break with 1.8.x
1.9.1 = development, API breaks with 1.8.x codebase due the
introduction of YARV in 1.9.0, improvements
1.9.2 = Stabilization of 1.9.1 codebase, improvements, for sure is not
the same as 1.8.x
>
> But pg is a different story. pg-0.10.1 does not seem to work with Ruby
> 1.9.2 for us.
>
ruby-pg != pg gem.
You need to read A LOT MORE, change your application MORE than email
every 5 minutes the list on every problem you can simply fix reading
the code.
"It ain't so much the things you don't know that get you in trouble. It's the things you know that just ain't so." - Artimus Ward
"...there is such a distance between how one lives and how one should live that he who lets go that which is done for that which ought to be done learns his ruin rather than his preservation." - Niccolo Machiavelli
It appears your desire for how things should be doesn't match the current reality. Fighting this "reality" can be a bit like fighting gravity, a la Don Quixote.
I challenge you to view the current Ruby "reality" as really just another business opportunity.
You do the hard work to deliver the "consistency", "stability", whatever required by your customers wading through the jungle-of-issues and selectively picking the right combination of technology, versions, features, service, etc. If people can't easily duplicate what you've done and truly value it enough to pay for it, you're off to a good start.
The risk of course is getting distracted and spending precious time away from where you add real value.
As others have replied, the pragmatic path for your 1.9 Windows success starts with 1.9.2 and Chuck's advice to "Test with 1.9.2 and create patches for those gems which misbehave."
Jon
---
blog: http://jonforums.github.com/
twitter: @jonforums
I know my english is not good, but do you really read my answers? I
replied on Ruby-Core that pg != ruby-pg and ruby-pg has not been
updated in YEARS
Considering 1.9.2 is fairly new/stable, can you burn one braincell and
think which one I'm talking about?
No? Still?
pg:
https://rubygems.org/gems/pg
And it works on Ruby 1.9.2-p136:
C:\Users\Luis\Projects\_sandbox>ruby -v
ruby 1.9.2p136 (2010-12-25) [i386-mingw32]
C:\Users\Luis\Projects\_sandbox>subst X: "C:\Program Files (x86)\PostgreSQL\8.3"
C:\Users\Luis\Projects\_sandbox>gem install pg -- --with-pg-dir=X:
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
Successfully installed pg-0.10.1
1 gem installed
C:\Users\Luis\Projects\_sandbox>set PATH=%PATH%;X:\bin
(need libpq.dll in the PATH)
C:\Users\Luis\Projects\_sandbox>irb
irb(main):001:0> require 'rubygems'
=> true
irb(main):002:0> require 'pg'
=> true
irb(main):003:0> conn = PGconn.open(:dbname => 'test', :user =>
'postgres', :password => '')
=> #<PGconn:0x2c9a198>
irb(main):004:0> res = conn.exec('SELECT 1 + 2')
=> #<PGresult:0x2bc0698>
irb(main):005:0> res.getvalue(0,0)
=> "3"
See? It works.
Now, I don't care if 'pg' gem do not build on Ruby 1.8.5, 1.8.6 or
whatever, Is the gem author responsibility to tell you 'No, don't use
1.9.1' like we have been trying to tell you several times.
And no, I give a damn it works on Linux. As I mentioned before Ruby
1.9.1 has bugs in relation to MinGW that you clearly ignored from my
previous answer, it seems obvious you read what you want and quote
responses as you please ignoring facts.
And no again, I give a damn what you call "compatibility".
I'm starting to sound as a broken record on this discussion and
feeling stupid. I've been questioning my communication skills and my
english usage, but seems clearly is not that the problem.
This is the last response you're going to get from me in LONG time.
company_name« existiert bereits (DBI::ProgrammingError)
Note that the third attempt to require fails, as the path is matched.D:\test>ruby -vruby 1.9.2p0 (2010-08-18) [i386-mingw32]D:\test>more example.rb
ConstantValue = 10D:\test>irb -r"./example.rb"irb(main):001:0> require 'd:\test\example.rb'd:/test/example.rb:1: warning: already initialized constant ConstantValue=> trueirb(main):002:0> require 'd:\test\example.rb'=> false