Milt,
thanks for your quick reply. Just before I was going to send a reply, I
trawled through my server tmp directory, and found the production.log.
Here’s what it said:
RuntimeError (The driver encountered an error: can’t convert nil into
String):
H:/server/webf/./tmp/deploy/tmp43039VP-exp.war/WEB-INF/gems/gems/activerecord-jdbc-adapter-0.8
/lib/active_record/connection_adapters/jdbc_adapter.rb:307:in
`initialize’
H:/server/webf/./tmp/deploy/tmp43039VP-exp.war/WEB-INF/gems/gems/activerecord-jdbc-adapter-0.8
/lib/active_record/connection_adapters/jdbc_adapter.rb:46:in `new’
H:/server/webf/./tmp/deploy/tmp43039VP-exp.war/WEB-INF/gems/gems/activerecord-jdbc-adapter-0.8
/lib/active_record/connection_adapters/jdbc_adapter.rb:46:in
`jdbc_connection’
H:/server/webf/./tmp/deploy/tmp43039VP-exp.war/WEB-INF/gems/gems/activerecord-2.0.2
/lib/active_record/connection_adapters/abstract/connection_specification.rb:291:in
`connection=’
H:/server/webf/./tmp/deploy/tmp43039VP-exp.war/WEB-INF/gems/gems/activerecord-2.0.2
/lib/active_record/connection_adapters/abstract/connection_specification.rb:259:in
`retrieve_connection’
H:/server/webf/./tmp/deploy/tmp43039VP-exp.war/WEB-INF/gems/gems/activerecord-2.0.2
/lib/active_record/connection_adapters/abstract/connection_specification.rb:78:in
`connection’
H:/server/webf/./tmp/deploy/tmp43039VP-exp.war/WEB-INF/gems/gems/activerecord-2.0.2
/lib/active_record/query_cache.rb:8:in `cache’
H:/server/webf/./tmp/deploy/tmp43039VP-exp.war/WEB-INF/gems/gems/actionpack-2.0.2
/lib/action_controller/caching.rb:677:in `perform_action_with_caching’
H:/server/webf/./tmp/deploy/tmp43039VP-exp.war/WEB-INF/gems/gems/actionpack-2.0.2
/lib/action_controller/base.rb:524:in `process’
H:/server/webf/./tmp/deploy/tmp43039VP-exp.war/WEB-INF/gems/gems/actionpack-2.0.2
/lib/action_controller/filters.rb:685:in `process_with_filters’
H:/server/webf/./tmp/deploy/tmp43039VP-exp.war/WEB-INF/gems/gems/actionpack-2.0.2
/lib/action_controller/session_management.rb:123:in
`process_with_session_management_support’
H:/server/webf/./tmp/deploy/tmp43039VP-exp.war/WEB-INF/gems/gems/actionpack-2.0.2
/lib/action_controller/base.rb:388:in `process’
H:/server/webf/./tmp/deploy/tmp43039VP-exp.war/WEB-INF/gems/gems/actionpack-2.0.2
/lib/action_controller/dispatcher.rb:171:in `handle_request’
H:/server/webf/./tmp/deploy/tmp43039VP-exp.war/WEB-INF/gems/gems/actionpack-2.0.2
/lib/action_controller/dispatcher.rb:115:in `dispatch’
H:/server/webf/./tmp/deploy/tmp43039VP-exp.war/WEB-INF/gems/gems/actionpack-2.0.2
/lib/action_controller/dispatcher.rb:126:in `dispatch_cgi’
H:/server/webf/./tmp/deploy/tmp43039VP-exp.war/WEB-INF/gems/gems/actionpack-2.0.2
/lib/action_controller/dispatcher.rb:9:in `dispatch’
:1
Rendering H:/server/webf/tmp/deploy/tmp43039VP-exp.war/public/500.html
(500
Internal Server Error)
It seems I never copied over a JDBC driver. I’ll go and fix that problem
first, and then try again. But it sure would be nice if I could display
this stack trace in my 500.html when Rails hits a problem.
Anyway, I now have something I can fix. Thanks again.
Ciao,
Jonathan O’Connor
XCOM Dublin
[email protected]
23.05.2008 12:25
To
[email protected]
cc
Please respond to
[email protected]
Subject
us.org Re: [jruby-user] Newby goldspike
on
JBoss problem
Jonathon,
You should not have to change any ruby/rails code to get it running
under
JBoss vs under Webrick - at least this is my experience so far.
jboss-web.xml not needed.
What does it show being logged in both the rails log and the jboss log
when
you get the 500?
–milt
Jonathan O’Connor wrote:
Hi,
I am trying to get a sample Rails app running on JBoss. My Rails
app
“test” has a single controller “sample” with an action “list”.
I’m running NetBeans 6.1 with JRuby 1.1 and Rails 2.0.2.
I generated a standalone war using GoldSpike, and then I copied my
"test.war" to my JBoss deploy directory. This starts up fine, and
"localhost:8080/test" delivers the usual Rails index.html page.
However, "localhost:8080/test/sample/list" shows the 500.html
page.
If I run this using WebBrick on port 3000, with urls:
“localhost:3000” and “localhost:3000/sample/list” it works as I
expect.
I debugged the java side, and the RailsDispatcher code is
definitely
getting called. And the FilesDispatcher works fine.
I read somewhere I had to add a jboss-web.xml. But that didn't
help,
and according to JBoss doc, the root url defaults to the name of
the
war file anyway.
I've tried adding a route to routes.rb: map.connect
'test/sample/:action', :controller => 'sample'
but that didn't help either.
I also tried setting RAILS_RELATIVE_URL_ROOT = '/test/' in
environment.rb, also without success.
Can anyone offer me any advice? Is there a way to debug the jruby
code running in the JBoss server?
thanks,
Jonathan O'Connor
XCOM Dublin
*** XCOM AG Legal Disclaimer ***
Diese E-Mail einschliesslich ihrer Anhaenge ist vertraulich und
ist
allein für den Gebrauch durch den vorgesehenen Empfaenger
bestimmt.
Dritten ist das Lesen, Verteilen oder Weiterleiten dieser E-Mail
untersagt. Wir bitten, eine fehlgeleitete E-Mail unverzueglich
vollstaendig zu loeschen und uns eine Nachricht zukommen zu
lassen.
This email may contain material that is confidential and for the
sole
use of the intended recipient. Any review, distribution by others
or
forwarding without express permission is strictly prohibited. If
you
are not the intended recipient, please contact the sender and
delete
all copies.
Hauptsitz: Bahnstrasse 37, D-47877 Willich, USt-IdNr.: DE 812 885
664
Kommunikation: Telefon +49 2154 9209-70, Telefax +49 2154
9209-900,
www.xcom.de
Handelsregister: Amtsgericht Krefeld, HRB 10340
Vorstand: Matthias Albrecht, Renate Becker-Grope, Marco Marty, Dr.
Rainer Fuchs
Vorsitzender des Aufsichtsrates: Stefan H. Tarach
*** XCOM AG Legal Disclaimer ***
Diese E-Mail einschliesslich ihrer Anhaenge ist vertraulich und ist
allein
für den Gebrauch durch den vorgesehenen Empfaenger bestimmt. Dritten ist
das Lesen, Verteilen oder Weiterleiten dieser E-Mail untersagt. Wir
bitten,
eine fehlgeleitete E-Mail unverzueglich vollstaendig zu loeschen und uns
eine Nachricht zukommen zu lassen.
This email may contain material that is confidential and for the sole
use
of the intended recipient. Any review, distribution by others or
forwarding
without express permission is strictly prohibited. If you are not the
intended recipient, please contact the sender and delete all copies.
Hauptsitz: Bahnstrasse 37, D-47877 Willich, USt-IdNr.: DE 812 885 664
Kommunikation: Telefon +49 2154 9209-70, Telefax +49 2154 9209-900,
Handelsregister: Amtsgericht Krefeld, HRB 10340
Vorstand: Matthias Albrecht, Renate Becker-Grope, Marco Marty, Dr.
Rainer
Fuchs
Vorsitzender des Aufsichtsrates: Stefan H. Tarach