I'm using:
 
Java 6
JRuby 1.0.3
Rails 2.0.2
activerecord-jdbc-adapter 0.7.1
 
When I try to persist an object to an Oracle table I get the following:
 
Loading development environment (Rails 2.0.2)
>> Person.find :all
>> => []
p = Person.new
>> => #<Person id: nil, name: nil>
p.name = 'Darcy'
=> "Darcy"
>> p.save
ActiveRecord::StatementInvalid: ActiveRecord::ActiveRecordError:
ORA-01006: bind variable does not exist
: INSERT INTO people (name) VALUES('Darcy')
        from
D:/jruby-1.0.3/lib/ruby/gems/1.8/gems/activerecord-2.0.2-/lib/active_rec
ord/transactions.rb:129:in `rollback_active_record_state!'
        from
D:/jruby-1.0.3/lib/ruby/gems/1.8/gems/activerecord-2.0.2-/lib/active_rec
ord/transactions.rb:108:in `save_with_transactions'
        from (irb):4:in `binding'
        from D:/jruby-1.0.3/lib/ruby/1.8/irb.rb:150:in `eval_input'
        from D:/jruby-1.0.3/lib/ruby/1.8/irb.rb:70:in `signal_status'
        from D:/jruby-1.0.3/lib/ruby/1.8/irb.rb:147:in `eval_input'
        from D:/jruby-1.0.3/lib/ruby/1.8/irb.rb:70:in
`each_top_level_statement'
        from D:/jruby-1.0.3/lib/ruby/1.8/irb.rb:146:in `loop'
        from D:/jruby-1.0.3/lib/ruby/1.8/irb.rb:146:in `catch'
        from D:/jruby-1.0.3/lib/ruby/1.8/irb.rb:146:in `eval_input'
        from D:/jruby-1.0.3/lib/ruby/1.8/irb.rb:70:in `start'
        from :1:in `catch'
        from D:/jruby-1.0.3/lib/ruby/1.8/irb.rb:69:in `start'
        from :1
>> p.id = 1
>> => 1
p.save
=> true
>> Person.find :all
=> [#<Person id: 1, name: "Darcy">]
>>
 
Is there anything else I need to do to work with Oracle?
 
thanks,
Darcy.

This email communication and any files transmitted with it may contain 
confidential and or proprietary information and is provided for the use of the 
intended recipient only. Any review, retransmission or dissemination of this 
information by anyone other than the intended recipient is prohibited.  If you 
receive this email in error, please contact the sender and delete this 
communication and any copies immediately. Thank you. 
http://www.encana.com


_______________________________________________
Jruby-extras-devel mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/jruby-extras-devel

Reply via email to