Richard BEN ALEYA created JRUBY-6316:
----------------------------------------
Summary: NoMethodError: relative_url_root when deploying Rails
3.1.3 app on Tomcat 6.0.35 even with jruby-rack v1.0.10
Key: JRUBY-6316
URL: https://jira.codehaus.org/browse/JRUBY-6316
Project: JRuby
Issue Type: Bug
Components: Rails WAR Deployment
Affects Versions: JRuby 1.6.5
Environment: Linux
Tomcat 6.0.35
Rails 3.1.3
JRuby 1.6.5
Warbler 1.3.2
Reporter: Richard BEN ALEYA
The fix described in issue JRUBY-6226 (use jruby-rack v1.0.10 instead of the
lastest jruby-rack v1.1.2) does not work.
Downgrading to jruby-rack v1.0.10 does not solve the problem for me (jruby
1.6.5.1 (ruby-1.9.2-p136), Rails 3.1.3 on Tomcat 6.0.35).
$ bundle list
Gems included by the bundle:
* actionmailer (3.1.3)
* actionpack (3.1.3)
* activemodel (3.1.3)
* activerecord (3.1.3)
* activerecord-jdbc-adapter (1.2.1)
* activerecord-oracle_enhanced-adapter (1.4.0)
* activeresource (3.1.3)
* activesupport (3.1.3)
* ansi (1.4.1)
* arel (2.2.1)
* bouncy-castle-java (1.5.0146.1)
* builder (3.0.0)
* bundler (1.0.21)
* coffee-rails (3.1.1)
* coffee-script (2.2.0)
* coffee-script-source (1.2.0)
* erubis (2.7.0)
* execjs (1.2.13)
* hike (1.2.1)
* i18n (0.6.0)
* jquery-rails (1.0.19)
* jruby-jars (1.6.5.1)
* jruby-openssl (0.7.4)
* jruby-rack (1.0.10)
* json (1.6.4)
* mail (2.3.0)
* mime-types (1.17.2)
* multi_json (1.0.4)
* polyglot (0.3.3)
* rack (1.3.6)
* rack-cache (1.1)
* rack-mount (0.8.3)
* rack-ssl (1.3.2)
* rack-test (0.6.1)
* rails (3.1.3)
* railties (3.1.3)
* rake (0.9.2.2)
* rdoc (3.12)
* rubyzip (0.9.5)
* sass (3.1.12)
* sass-rails (3.1.5)
* sprockets (2.0.3)
* therubyrhino (1.73.0)
* thor (0.14.6)
* tilt (1.3.3)
* treetop (1.4.10)
* turn (0.8.2)
* tzinfo (0.3.31)
* uglifier (1.2.1)
* warbler (1.3.2)
Gemfile:
...
gem 'therubyrhino', '~> 1.73.0'
gem 'activerecord-oracle_enhanced-adapter', '~> 1.4.0'
gem 'jruby-rack', '1.0.10'
gem 'warbler', '~> 1.3.2'
This sample application is the implementation of the example:
"http://guides.rubyonrails.org/getting_started.html"
* Working perfectly with native Ruby 1.9.3 ("rails server" WEBrick)
* Working perfectly with jruby 1.6.5.1 ("rails server" WEBrick)
* Does not work on Tomcat 6.0.35 ("bundle exec warble war" then deploying
the generated WAR file).
When I make a "GET /sample HTTP/1.1" it returns:
+++
We're sorry, but something went wrong.
We've been notified about this issue and we'll take a look at it shortly.
+++
In the Tomcat log file:
...
System
jruby 1.6.5.1 (ruby-1.8.7-p330) (2011-12-27 1bf37c2) (OpenJDK 64-Bit Server VM
1.6.0_23) [linux-amd64-java]
Time: Wed Jan 04 16:10:18 +0100 2012
Server: Apache Tomcat/6.0-snapshot
jruby.home:
file:/home/mnemonic/webapps/sample/WEB-INF/lib/jruby-stdlib-1.6.5.1.jar!/META-INF/jruby.home
Context Init Parameters:
public.root = /
rails.env = production
Backtrace
SyntaxError:
/home/mnemonic/webapps/sample/WEB-INF/config/initializers/session_store.rb:3:
syntax error, unexpected ':'
Sample::Application.config.session_store :cookie_store, key: '_sample_session'
...
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email