deploying with warbler/tomcat
Added by Carlo Alberto Degli Atti almost 14 years ago
Hi,
this is my absolutely first time I get involved with Ruby & Co... so maybe I'm totally wrong.. excuse me in advance :-)
Anyway my problem is: I've installed redmine 1.1 and have followed the instructions here: http://www.redmine.org/projects/redmine/wiki/HowTo_Install_Redmine_in_Apache_Tomcat
Everything seems fine (all steps are OK, included running ./scripts/server -e production ), but when I put the redmine-1.1.war into the Tomcat webapps folder and I try to access from the browser (ie: http://localhost:8080/redmine-1.1 I just see:
Internal error
An error occurred on the page you were trying to access. If you continue to experience problems please contact your redMine administrator for assistance.
BUT If I give a look to my catalina.out, I can see only few warnings;
So, maybe it's a trivial problem, but I don't know how to make the log more verbose..
This is my catalina.out dump:
INFO: Server startup in 27337 ms config.gem: Unpacked gem rubytree-0.5.2 in vendor/gems has no specification file. Run 'rake gems:refresh_specs' to fix this. config.gem: Unpacked gem coderay-0.9.7 in vendor/gems has no specification file. Run 'rake gems:refresh_specs' to fix this. /usr/share/tomcatProduzione/webapps/redmine-1.1/WEB-INF/gems/gems/rails-2.3.5/lib/rails/gem_dependency.rb:119:Warning: Gem::Dependency#version_requirements is deprecated and will be removed on or after August 2010. Use #requirement
This is my configuration:
Tomcat 6.0.29
Ruby 1.8.7.302, ruby-gems is 1.3.5:
This is my list of installed gems:
actionmailer (2.3.5) actionpack (2.3.5) activerecord (2.3.5) activeresource (2.3.5) activesupport (2.3.5) bouncy-castle-java (1.5.0145.2) i18n (0.4.2) jruby-jars (1.5.6) jruby-openssl (0.7.3) jruby-rack (1.0.7) pg (0.10.1) rack (1.0.1) rails (2.3.5) rake (0.8.7) rubyzip (0.9.4) warbler (1.2.1)
Replies (9)
RE: deploying with warbler/tomcat - Added by Felix Schäfer almost 14 years ago
Have a look at the redmine log for more information, I'm not sure where that would be on jruby though.
RE: deploying with warbler/tomcat - Added by Carlo Alberto Degli Atti almost 14 years ago
Thank you for answering...
I've already tried... if I'm right it is placed into the WEB-INF/log/production.log, but it contains just:
- Logfile created on Fri Mar 11 13:41:27 +0000 2011
no more!
Is there a way to have a more verbose log?!?!
RE: deploying with warbler/tomcat - Added by Felix Schäfer almost 14 years ago
Try starting it in development mode instead of production mode (you can safely point both modes to the same DB, just keep in mind that they're not separate ;-) ).
RE: deploying with warbler/tomcat - Added by Carlo Alberto Degli Atti almost 14 years ago
hmmm....
to start in a development mode do I need to change the warble.conf this way?
config.webxml.rails.env = ENV['RAILS_ENV'] || 'development'
or something else?
This is my full warble.conf:
- Disable automatic framework detection by uncommenting/setting to false
- Warbler.framework_detection = false
- Warbler web application assembly configuration file
Warbler::Config.new do |config| # Features: additional options controlling how the jar is built. # Currently the following features are supported: # - gemjar: package the gem repository in a jar file in WEB-INF/lib # config.features = %w(gemjar)- Application directories to be included in the webapp.
config.dirs = %w(app config lib log vendor tmp extra files lang)
- Additional files/directories to include, above those in config.dirs
- config.includes = FileList["db"]
- Additional files/directories to exclude
- config.excludes = FileList["lib/tasks/*"]
- Additional Java .jar files to include. Note that if .jar files are placed
- in lib (and not otherwise excluded) then they need not be mentioned here.
- JRuby and JRuby-Rack are pre-loaded in this list. Be sure to include your
- own versions if you directly set the value
- config.java_libs += FileList["lib/java/*.jar"]
- Loose Java classes and miscellaneous files to be placed in WEB-INF/classes.
- config.java_classes = FileList["target/classes/**.*"]
- One or more pathmaps defining how the java classes should be copied into
- WEB-INF/classes. The example pathmap below accompanies the java_classes
- configuration above. See http://rake.rubyforge.org/classes/String.html#M000017
- for details of how to specify a pathmap.
- config.pathmaps.java_classes << "%{target/classes/,}p"
- Path to the pre-bundled gem directory inside the war file. Default
- is 'WEB-INF/gems'. Specify path if gems are already bundled
- before running Warbler. This also sets 'gem.path' inside web.xml.
- config.gem_path = "WEB-INF/vendor/bundler_gems"
- Bundler support is built-in. If Warbler finds a Gemfile in the
- project directory, it will be used to collect the gems to bundle
- in your application. If you wish to explicitly disable this
- functionality, uncomment here.
- config.bundler = false
- An array of Bundler groups to avoid including in the war file.
- Defaults to ["development", "test"].
- config.bundle_without = []
- Files for WEB-INF directory (next to web.xml). This contains
- web.xml by default. If there is an .erb-File it will be processed
- with webxml-config. You may want to exclude this file via
- config.excludes.
- config.webinf_files += FileList["jboss-web.xml"]
- Other gems to be included. You need to tell Warbler which gems
- your application needs so that they can be packaged in the war
- file.
- The Rails gems are included by default unless the vendor/rails
- directory is present.
- kada: removed "activerecord-jdbcmysql-adapter"
config.gems += [ "jruby-openssl", "activerecord-jdbcpostgresql-adapter", "pg", "i18n", "rack"] - config.gems << "tzinfo"
- Uncomment this if you don't want to package rails gem.
- config.gems -= ["rails"]
- The most recent versions of gems are used.
- You can specify versions of gems by using a hash assignment:
- config.gems["rails"] = "2.0.2"
- You can also use regexps or Gem::Dependency objects for flexibility or
- fine-grained control.
- config.gems << /^merb-/
- config.gems << Gem::Dependency.new("merb-core", "= 0.9.3")
- Include gem dependencies not mentioned specifically. Default is
- true, uncomment to turn off.
- config.gem_dependencies = false
- Array of regular expressions matching relative paths in gems to be
- excluded from the war. Defaults to empty, but you can set it like
- below, which excludes test files.
- config.gem_excludes = [/^(test|spec)\//]
- Files to be included in the root of the webapp. Note that files in public
- will have the leading 'public/' part of the path stripped during staging.
- config.public_html = FileList["public/**/*", "doc/**/*"]
- Pathmaps for controlling how public HTML files are copied into the .war
- config.pathmaps.public_html = ["%{public/,}p"]
- Pathmaps for controlling how application files are copied into the .war
- config.pathmaps.application = ["WEB-INF/%p"]
- Name of the war file (without the .war) -- defaults to the basename
- of RAILS_ROOT
- config.war_name = "mywar"
- Name of the MANIFEST.MF template for the war file. Defaults to a simple
- MANIFEST.MF that contains the version of Warbler used to create the war file.
- config.manifest_file = "config/MANIFEST.MF"
- When using the 'compiled' feature and specified, only these Ruby
- files will be compiled. Default is to compile all \.rb files in
- the application.
- config.compiled_ruby_files = FileList['app/**/*.rb']
- Value of RAILS_ENV for the webapp -- default as shown below
config.webxml.rails.env = ENV['RAILS_ENV'] || 'development'
- Application booter to use, one of :rack, :rails, or :merb (autodetected by default)
- config.webxml.booter = :rails
- When using the :rack booter, "Rackup" script to use.
- - For 'rackup.path', the value points to the location of the rackup
- script in the web archive file. You need to make sure this file
- gets included in the war, possibly by adding it to config.includes
- or config.webinf_files above.
- - For 'rackup', the rackup script you provide as an inline string
- is simply embedded in web.xml.
- The script is evaluated in a Rack::Builder to load the application.
- Examples:
- config.webxml.rackup.path = 'WEB-INF/hello.ru'
- config.webxml.rackup = %{require './lib/demo'; run Rack::Adapter::Camping.new(Demo)}
- config.webxml.rackup = require 'cgi' && CGI::escapeHTML(File.read("config.ru"))
- Control the pool of Rails runtimes. Leaving unspecified means
- the pool will grow as needed to service requests. It is recommended
- that you fix these values when running a production server!
- config.webxml.jruby.min.runtimes = 2
- config.webxml.jruby.max.runtimes = 4
- JNDI data source name
- config.webxml.jndi = 'jdbc/rails'
end
- Application directories to be included in the webapp.
RE: deploying with warbler/tomcat - Added by Carlo Alberto Degli Atti almost 14 years ago
Finally I got the Tomcat error log!
What does it mean?!?!?!
SEVERE: Application Error org.jruby.rack.RackInitializationException: undefined local variable or method `version_requirements' for #<Rails::GemDependency:0x18320df> from file:/usr/local/data/tomcat/produzione/webapps/redmine-1.1/WEB-INF/lib/jruby-stdlib-1.6.0.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems.rb:254:in `activate' from file:/usr/local/data/tomcat/produzione/webapps/redmine-1.1/WEB-INF/lib/jruby-stdlib-1.6.0.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems.rb:1215:in `gem' from /usr/share/tomcatProduzione/webapps/redmine-1.1/WEB-INF/gems/gems/rails-2.3.5/lib/rails/gem_dependency.rb:73:in `add_load_paths' from /usr/share/tomcatProduzione/webapps/redmine-1.1/WEB-INF/gems/gems/rails-2.3.5/lib/initializer.rb:301:in `add_gem_load_paths' from org/jruby/RubyArray.java:1572:in `each' from /usr/share/tomcatProduzione/webapps/redmine-1.1/WEB-INF/gems/gems/rails-2.3.5/lib/initializer.rb:301:in `add_gem_load_paths' from /usr/share/tomcatProduzione/webapps/redmine-1.1/WEB-INF/gems/gems/rails-2.3.5/lib/initializer.rb:132:in `process' from org/jruby/RubyKernel.java:2038:in `send' from /usr/share/tomcatProduzione/webapps/redmine-1.1/WEB-INF/gems/gems/rails-2.3.5/lib/initializer.rb:113:in `run' from /usr/share/tomcatProduzione/webapps/redmine-1.1/WEB-INF/config/environment.rb:20:in `(root)' from org/jruby/RubyKernel.java:1062:in `load' from /usr/share/tomcatProduzione/webapps/redmine-1.1/WEB-INF/config/environment.rb:54:in `load_environment' from file:/usr/local/data/tomcat/produzione/webapps/redmine-1.1/WEB-INF/lib/jruby-rack-1.0.7.jar!/jruby/rack/rails.rb:47:in `to_app' from file:/usr/local/data/tomcat/produzione/webapps/redmine-1.1/WEB-INF/lib/jruby-rack-1.0.7.jar!/jruby/rack/rails.rb:193:in `new' from <web.xml>:1:in `(root)' from org/jruby/RubyKernel.java:2007:in `instance_eval' from file:/usr/local/data/tomcat/produzione/webapps/redmine-1.1/WEB-INF/lib/jruby-rack-1.0.7.jar!/vendor/rack-1.2.1/rack/builder.rb:46:in `initialize' from <web.xml>:1:in `(root)' at org.jruby.rack.DefaultRackApplicationFactory$4.init(DefaultRackApplicationFactory.java:207) at org.jruby.rack.DefaultRackApplicationFactory.getApplication(DefaultRackApplicationFactory.java:58) at org.jruby.rack.PoolingRackApplicationFactory.getApplication(PoolingRackApplicationFactory.java:95) at org.jruby.rack.DefaultRackDispatcher.process(DefaultRackDispatcher.java:28) at org.jruby.rack.RackFilter.doFilter(RackFilter.java:58) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:774) at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703) at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:896) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690) at java.lang.Thread.run(Thread.java:636) Caused by: org.jruby.exceptions.RaiseException: (NameError) undefined local variable or method `version_requirements' for #<Rails::GemDependency:0x18320df>
RE: deploying with warbler/tomcat - Added by Felix Schäfer almost 14 years ago
version_requirements
is a method that was part of older rubygems, but has been deprecated and removed since. I think there's a fix in Redmine to work around that, but it seems the version you have doesn't have the fix yet. You have 2 choices: either upgrade redmine, or downgrade the rubygems that's with jruby/warbler.
RE: deploying with warbler/tomcat - Added by Carlo Alberto Degli Atti almost 14 years ago
Thanks a lot!
I've got the latest redmine (1.1) from svn... so, maybe it has been fixed in the trunk...
rubygems is 1.3.5, I'm trying to downgrade... but I've to look for the right rpm...
RE: deploying with warbler/tomcat - Added by Felix Schäfer almost 14 years ago
The incriminated rubygems is the one in jruby, not the one you have installed on your system ruby. I think 1.3.5 is fine, but you probably have a newer version in jruby.
RE: deploying with warbler/tomcat - Added by Mypsycho Public about 13 years ago
I posted on a new way to install Redmine.
This procedure is dedicated to people having no Ruby/Rails skills (like me).
Take a look at http://www.redmine.org/boards/1/topics/27046