Problems with JRuby on rails and Oracle

Hello guys,

I’ve been developing in Ruby for a few months and I am starting to work
with Rails. I am having a problem right from the start and I think I am
not doing anything wrong. I have performed the following steps:

  1. I have installed as gem activerecord-jdbc-adapter
  2. run jruby -S rails test
  3. updated database.yml with the following:
    development:
    adapter: oracle
    host: flanders64
    port: 1521
    database: x2iq04
    username: iq_manager
    password: X2Iq01

Warning: The database defined as “test” will be erased and

re-generated from your development database when you run “rake”.

Do not set this db to the same as development or production.

production:
development

  1. run jruby script/server and it works perfectly connecting to the
    database without problems
  2. run jruby script/generate scaffold release_notes title:string
    version:string content:text
  3. rake db:migrate
  4. shutdown the server and start it again
  5. http://localhost:3000/release_notes/new and it works just fine
  6. After I click on create I get this error: any ideas?

NoMethodError in Release_notes#index
Showing release_notes/index.html.erb where line #15 raised:
You have a nil object when you didn’t expect it!
The error occurred while evaluating nil.to_sym

Extracted source (around line #15):
12:

<%=h release_notes.title %>
13: <%=h release_notes.version %>
14: <%=h release_notes.content %>
15: <%= link_to ‘Show’, release_notes %>
16: <%= link_to ‘Edit’, edit_release_notes_path(release_notes)
%>
17: <%= link_to ‘Destroy’, release_notes, :confirm => ‘Are you
sure?’, :method => :delete %>
18:

RAILS_ROOT: /Users/gacilu/Knowledge Administration/Koiaka
Project/Projects/F1/Development/Iteration4/code/iqserver
Application Trace | Framework Trace | Full Trace
/usr/local/jruby-1.1.4/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/routing/route.rb:145:in
extra_keys' /usr/local/jruby-1.1.4/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/routing/route.rb:145:inmap’
/usr/local/jruby-1.1.4/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/routing/route.rb:145:in
extra_keys' generated code (/usr/local/jruby-1.1.4/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/routing/route.rb:45):3:ingenerate’
/usr/local/jruby-1.1.4/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/routing/route.rb:122:in
generate' /usr/local/jruby-1.1.4/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/routing/route_set.rb:337:ingenerate’
/usr/local/jruby-1.1.4/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/url_rewriter.rb:131:in
rewrite_path' /usr/local/jruby-1.1.4/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/url_rewriter.rb:110:inrewrite_url’
/usr/local/jruby-1.1.4/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/url_rewriter.rb:88:in
rewrite' /usr/local/jruby-1.1.4/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/base.rb:622:inurl_for’
/usr/local/jruby-1.1.4/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_view/helpers/url_helper.rb:71:in
url_for' (eval):17:inrelease_notes_path’
app/views/release_notes/index.html.erb:15:in
_run_erb_47app47views47release_notes47index46html46erb' app/views/release_notes/index.html.erb:10:ineach’
app/views/release_notes/index.html.erb:10:in
_run_erb_47app47views47release_notes47index46html46erb' app/controllers/release_notes_controller.rb:7:inindex’
:1:in `initialize’

Thanks,


Guillermo A.
Senior Engineer, Koiaka GmbH

I think something might be screwy because scaffolds are supposed to be
generated singular. Not sure if this is messing up your routes.rb file
or
not. You can also type rake routes to see all the routes you can
generate.