[jruby-dev] saved model object ID always 1 with jruby-rack

2012-02-14 Thread Vivek Pandey
Hi, I am using JRuby with Sinatra and ActiveRecord as ORM. I have code such as this: ActiveRecord::Base.transaction do product.rollback_active_record_state! do if(product.save(false)) logger.debug "Prod ID: #{product.id}" yield if block_given?

[jruby-dev] [jira] (JRUBY-6452) rb_class_of() calls static object method instead of static long method

2012-02-14 Thread Wayne Meissner (JIRA)
Wayne Meissner created JRUBY-6452: - Summary: rb_class_of() calls static object method instead of static long method Key: JRUBY-6452 URL: https://jira.codehaus.org/browse/JRUBY-6452 Project: JRuby

Re: [jruby-dev] saved model object ID always 1 with jruby-rack

2012-02-14 Thread Charles Oliver Nutter
Hi Vivek! On Tue, Feb 14, 2012 at 8:15 AM, Vivek Pandey wrote: > Hi, > > I am using JRuby with Sinatra and ActiveRecord as ORM. I have code such as > this: > >      ActiveRecord::Base.transaction do >         product.rollback_active_record_state! do >           if(product.save(false)) >          

Re: [jruby-dev] saved model object ID always 1 with jruby-rack

2012-02-14 Thread Vivek Pandey
Sorry, forgot to give my env. Running my env on rails is non-trivial at present. All I can tell is that when I run rackup with MRI it all works well but the same when warbled and deployed on tomcat, gives me the id of 1! Something must be silly going on here not sure what. thanks, vivek. JRuby 1

Re: [jruby-dev] saved model object ID always 1 with jruby-rack

2012-02-14 Thread Nick Sieger
How about rackup on JRuby? Works or fails? /Nick On Tue, Feb 14, 2012 at 9:43 AM, Vivek Pandey wrote: > Sorry, forgot to give my env. Running my env on rails is non-trivial at > present. All I can tell is that when I run rackup with MRI it all works well > but the same when warbled and deployed

[jruby-dev] [jira] (JRUBY-6453) Make String/ByteList creation facilities part of RedBridge APIs

2012-02-14 Thread Thomas E Enebo (JIRA)
Thomas E Enebo created JRUBY-6453: - Summary: Make String/ByteList creation facilities part of RedBridge APIs Key: JRUBY-6453 URL: https://jira.codehaus.org/browse/JRUBY-6453 Project: JRuby I

Re: [jruby-dev] saved model object ID always 1 with jruby-rack

2012-02-14 Thread Vivek Pandey
Jruby rackup fails the same way, which is the persisted model object id is shown as 1 instead of its actual value. I ran it thru debugger and right after product.save(false) product.id gives 1 and if I do Product.find_by_name(), it gives me the just persisted object correctly. vivek. On Tue, Feb

Re: [jruby-dev] saved model object ID always 1 with jruby-rack

2012-02-14 Thread Charles Oliver Nutter
Ahh, that's interesting. So perhaps there's something in save that should be getting a generated ID and we're not doing that right? - Charlie On Tue, Feb 14, 2012 at 2:36 PM, Vivek Pandey wrote: > Jruby rackup fails the same way, which is the persisted model object id is > shown as 1 instead of

[jruby-dev] [jira] (JRUBY-6454) Unable to launch browsers with watir or capybara in 1.9 mode

2012-02-14 Thread Zoltan Szugyi (JIRA)
Zoltan Szugyi created JRUBY-6454: Summary: Unable to launch browsers with watir or capybara in 1.9 mode Key: JRUBY-6454 URL: https://jira.codehaus.org/browse/JRUBY-6454 Project: JRuby Issue

Re: [jruby-dev] saved model object ID always 1 with jruby-rack

2012-02-14 Thread Vivek Pandey
that might be the case atleast from pure observation. My rubymine does not let me step inside ActiveRecord::Base.save() with jruby rack:( It does not look like anyone on this list has experienced this problem, that tells me maybe its some other dependencies or something else causing it. This is pre

Re: [jruby-dev] saved model object ID always 1 with jruby-rack

2012-02-14 Thread Nick Sieger
If using "rackup" on JRuby causes the same problem, then Warbler/JRuby-Rack should be able to be ruled out. Can you reproduce the issue with a small script or in the console? On Feb 14, 2012, at 4:33 PM, Vivek Pandey wrote: > that might be the case atleast from pure observation. My rubymine doe

Re: [jruby-dev] saved model object ID always 1 with jruby-rack

2012-02-14 Thread Charles Oliver Nutter
I will echo Nick's suggestion: reproduce in a simple script. If we can narrow it down to a simple schema and script, the fix may be easy to find. My money is on auto-generated ID not propagating back out properly during #save. Feel free to open an AR-JDBC issue at this point: https://github.com/j