Rails scaffold and Oracle: TemplateError

A simple Rails scaffold running using Oracle database gives the
following error:

ActionView::TemplateError (book_url failed to generate from
{:controller=>“books”, :action=>“show”, :id=>#<Book id:
#BigDecimal:3feef1eb,‘10000.0’,1(8), title: “Ultramarathon Man”,
author: “Dean Karnazes”, created_at: “2009-10-06 00:03:14”, updated_at:
“2009-10-06 00:03:14”>}, expected: {:controller=>“books”,
:action=>“show”}, diff: {:id=>#<Book id:
#BigDecimal:459bdb65,‘10000.0’,1(8), title: “Ultramarathon Man”,
author: “Dean Karnazes”, created_at: “2009-10-06 00:03:14”, updated_at:
“2009-10-06 00:03:14”>}) on line #13 of app/views/books/index.html.erb:

Able to create a new book entry and the database shows entry is inserted
correctly as well. But then viewing http://localhost:3000/books gives
the above error.

database.yml looks like:

development:
adapter: jdbc
driver: oracle.jdbc.driver.OracleDriver
url: jdbc:oracle:thin:@localhost:1521:orcl
username: username
password: password

Any idea ?

Thanks,
-Arun


Need Application Server ? Download from http://glassfish.org
Blog: http://blog.arungupta.me


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Hi Arun. Are you using activerecord-oracle_enhanced-adapter? If not,
you should. This cleans up a lot of the basic errors you get when you
use the standard jdbc adapter. Plus the nice thing about the enhanced
adapter is that you don’t need to have a specific jdbc entry in your
database.yml… it can detect if you’re running mri or jruby and will
use the jdbc adapter if necessary.

Rich

On Oct 5, 2009, at 5:24 PM, Arun G. wrote:

author: “Dean Karnazes”, created_at: “2009-10-06 00:03:14”,
adapter: jdbc

Need Application Server ? Download from http://glassfish.org
Blog: http://blog.arungupta.me


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email