Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Rack Handler #29

Closed
skade opened this Issue · 20 comments

8 participants

@skade

Hi,

I recently looked into adding trinidad as an option to use as a development server in Padrino for JRuby users. Sadly, I found that trinidad does not implement a Rack::Handler subclass class that can be used in the standard rack handler way:

h = Rack::Handler.get(:trinidad)
h.run(....server_opts....)

Is it possible to implement such a class so that we can implement a zero-config server environment with a proper webserver (not Webrick) for JRuby users as well?

If you have any questions on how the Handler protocol works, feel free to ask.

Regards,
Florian Gilcher

@calavera
Owner

Hey Florian,

that would be great. I have a first version of a Rack::Handler ready for Trinidad in the branch below, but it depends on the develoment version of JRuby-rack. I'll hopefully release both of them this weekend:

https://github.com/trinidad/trinidad/tree/rack

If you need any help just let me know.

@skade

Jep, I do have a question. jruby-rack does not seem to be easily usable from bundler (not having a gemspec and a non-standard gem layout). How do I add trinidad and jruby-rack prerelease to my project without all too much hassle, especially so that it is easily reproducible for my fellow developers? :)

Thanks in advance,
Florian

@skade

Hi,

i have a pretty brittle implementation running. I have two issues, though:

First of all, when using rack-flash, I get the following trace:

<snip>This was a sinatra/rack-flash problem</snip>

Also, running without the handler does not seem to work as well, it immediately crashes:

$ bundle exec trinidad -r config.ru 
Sep 16, 2011 10:54:22 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-3000"]
Sep 16, 2011 10:54:22 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Tomcat
Sep 16, 2011 10:54:22 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.21
2011-09-16 20:54:22 INFO: No global web.xml found
2011-09-16 20:54:23 INFO: jruby 1.6.4 (ruby-1.8.7-p330) (2011-08-23 17ea768) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_26) [darwin-x86_64-java]
2011-09-16 20:54:30 INFO: Info: received min runtimes = 1
2011-09-16 20:54:30 INFO: Info: received max runtimes = 5
2011-09-16 20:54:30 INFO: An exception happened during JRuby-Rack startup
undefined method `register' for Rack::Handler:Module
--- System
jruby 1.6.4 (ruby-1.8.7-p330) (2011-08-23 17ea768) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_26) [darwin-x86_64-java]
Time: Fri Sep 16 22:54:30 +0200 2011
Server: Apache Tomcat/7.0.21
jruby.home: /Users/skade/.rvm/rubies/jruby-1.6.4

--- Context Init Parameters:
jruby.compat.version = 1.8.7
jruby.initial.runtimes = 1
jruby.max.runtimes = 5
jruby.min.runtimes = 1
public.root = /public
rack.env = development
rackup.path = config.ru

--- Backtrace
NoMethodError: undefined method `register' for Rack::Handler:Module
         (root) at /Users/skade/.rvm/gems/jruby-1.6.4/bundler/gems/trinidad-459146d21bdc/lib/rack/handler/trinidad.rb:28
        require at org/jruby/RubyKernel.java:1038
        require at /Users/skade/.rvm/gems/jruby-1.6.4/bundler/gems/trinidad-459146d21bdc/lib/rack/handler/trinidad.rb:68
           each at org/jruby/RubyArray.java:1603
        require at /Users/skade/.rvm/gems/jruby-1.6.4/gems/bundler-1.0.18/lib/bundler/runtime.rb:66
           each at org/jruby/RubyArray.java:1603
        require at /Users/skade/.rvm/gems/jruby-1.6.4/gems/bundler-1.0.18/lib/bundler/runtime.rb:55
        require at /Users/skade/.rvm/gems/jruby-1.6.4/gems/bundler-1.0.18/lib/bundler.rb:120
         (root) at /Users/skade/Code/padrino-test/test/config/boot.rb:15
        require at org/jruby/RubyKernel.java:1038
         (root) at /Users/skade/Code/padrino-test/test/config/boot.rb:1
  instance_eval at org/jruby/RubyKernel.java:2061
     initialize at file:/Users/skade/.rvm/gems/jruby-1.6.4/gems/jruby-rack-1.0.10/lib/jruby-rack-1.0.10.jar!/vendor/rack-1.3.2/rack/builder.rb:51
         (root) at /Users/skade/Code/padrino-test/test/config.ru:1

--- RubyGems
Gem.dir: /Users/skade/.rvm/gems/jruby-1.6.4
Gem.path:
/Users/skade/Code/padrino-test/test/WEB-INF/gems
/Users/skade/.rvm/gems/jruby-1.6.4
/Users/skade/.rvm/gems/jruby-1.6.4@global
Activated gems:
  rake-0.9.2
  multi_json-1.0.3
  activesupport-3.1.0
  addressable-2.2.6
  bcrypt-ruby-2.1.4-java
  bundler-1.0.18
  dm-core-1.1.0
  dm-aggregates-1.1.0
  dm-constraints-1.1.0
  dm-migrations-1.1.0
  fastercsv-1.5.4
  json-1.4.6-java
  dm-serializer-1.1.0
  dm-timestamps-1.1.0
  dm-transactions-1.1.0
  stringex-1.2.2
  uuidtools-2.1.2
  dm-types-1.1.0
  dm-validations-1.1.0
  data_mapper-1.1.0
  data_objects-0.10.6
  diff-lcs-1.1.3
  dm-do-adapter-1.1.0
  do_jdbc-0.10.6-java
  jdbc-sqlite3-3.7.2
  do_sqlite3-0.10.6-java
  dm-sqlite-adapter-1.1.0
  mime-types-1.16
  grit-2.4.1
  haml-3.1.3
  rack-1.3.2
  url_mount-0.2.1
  http_router-0.10.2
  i18n-0.6.0
  jruby-rack-1.0.10
  polyglot-0.3.2
  treetop-1.4.10
  mail-2.3.0
  rack-protection-1.1.0
  tilt-1.3.3
  sinatra-1.3.0.f
  thor-0.14.6
  padrino-core-0.10.2
  padrino-helpers-0.10.2
  padrino-admin-0.10.2
  padrino-cache-0.10.2
  padrino-gen-0.10.2
  padrino-mailer-0.10.2
  padrino-0.10.2
  trinidad_jars-1.0.2
  trinidad-1.2.3

--- Bundler
Bundler.bundle_path: /Users/skade/.rvm/gems/jruby-1.6.4
Bundler.root: /Users/skade/Code/padrino-test/test
Gemfile: /Users/skade/Code/padrino-test/test/Gemfile
Settings:
  bin_path = /Users/skade/.rvm/gems/jruby-1.6.4/gems/bundler-1.0.18/bin/bundle
  gemfile = /Users/skade/Code/padrino-test/test/Gemfile

--- JRuby-Rack Config
background_spooling = false
compat_version = RUBY1_8
filter_adds_html = true
filter_verifies_resource = false
ignore_environment = false
initial_runtimes = 1
jms_connection_factory = 
jms_jndi_properties = 
logger = org.jruby.rack.logging.ServletContextLogger@1294a25c
logger_class_name = servlet_context
logger_name = jruby.rack
maximum_runtimes = 5
memory_buffer_size = 65536
num_initializer_threads = 
rackup = 
rackup_path = config.ru
rewindable = true
runtime_timeout_seconds = 
serial_initialization = false
servlet_context = org.apache.catalina.core.ApplicationContextFacade@18a40279
2011-09-16 20:54:30 SEVERE: unable to create shared application instance
2011-09-16 20:54:30 SEVERE: Error: application initialization failed
2011-09-16 20:54:30 INFO: Starting ProtocolHandler ["http-bio-3000"]
2011-09-16 20:54:33 INFO: Marking servlet RackServlet as unavailable
2011-09-16 20:54:33 SEVERE: Allocate exception for servlet RackServlet
@nesquena

+1

@calavera calavera closed this in 471d66b
@kcpavan

Hi,

I am facing the same issue, I'm running jruby 1.6.5. please help me to find a solution. thanks in advance.

I am pasting the log below:
--- System
jruby 1.6.5 (ruby-1.8.7-p330) (2011-10-25 9dcd388) (Java HotSpot(TM) Client VM 1.6.0_20) [linux-i386-java]
Time: Thu Jan 05 06:22:14 -0700 2012
Server: Apache Tomcat/7.0.23
jruby.home: /home/aarthi/.rvm/rubies/jruby-1.6.5

--- Context Init Parameters:
jruby.compat.version = 1.8.7
jruby.initial.runtimes = 1
jruby.max.runtimes = 5
jruby.min.runtimes = 1
public.root = /public
rails.env = development
rails.root = /

--- Backtrace
NoMethodError: undefined method `register' for Rack::Handler:Module
(root) at /home/aarthi/.rvm/gems/jruby-1.6.5/gems/trinidad-1.3.0/lib/rack/handler/trinidad.rb:33
require at org/jruby/RubyKernel.java:1038
require at /home/aarthi/Projects/ccwebapp/vendor/rails/activesupport/lib/active_support/dependencies.rb:156
new_constants_in at /home/aarthi/Projects/ccwebapp/vendor/rails/activesupport/lib/active_support/dependencies.rb:521
new_constants_in at /home/aarthi/Projects/ccwebapp/vendor/rails/activesupport/lib/active_support/dependencies.rb:520
require at /home/aarthi/Projects/ccwebapp/vendor/rails/activesupport/lib/active_support/dependencies.rb:156
(root) at /home/aarthi/.rvm/gems/jruby-1.6.5/gems/trinidad-1.3.0/lib/rack/handler/trinidad.rb:24
require at org/jruby/RubyKernel.java:1038
require at /home/aarthi/.rvm/gems/jruby-1.6.5/gems/trinidad-1.3.0/lib/trinidad.rb:68
each at org/jruby/RubyArray.java:1612
require at /home/aarthi/.rvm/gems/jruby-1.6.5/gems/bundler-1.0.21/lib/bundler/runtime.rb:66
each at org/jruby/RubyArray.java:1612
require at /home/aarthi/.rvm/gems/jruby-1.6.5/gems/bundler-1.0.21/lib/bundler/runtime.rb:55
require at /home/aarthi/.rvm/gems/jruby-1.6.5/gems/bundler-1.0.21/lib/bundler.rb:122
load_gems at /home/aarthi/Projects/ccwebapp/config/boot.rb:116
process at /home/aarthi/Projects/ccwebapp/vendor/rails/railties/lib/initializer.rb:164
send at org/jruby/RubyKernel.java:2093
run at /home/aarthi/Projects/ccwebapp/vendor/rails/railties/lib/initializer.rb:113
(root) at /home/aarthi/Projects/ccwebapp/config/environment.rb:62
load at org/jruby/RubyKernel.java:1063
load_environment at /home/aarthi/Projects/ccwebapp/config/environment.rb:54
to_app at file:/home/aarthi/.rvm/gems/jruby-1.6.5/gems/jruby-rack-1.1.2/lib/jruby-rack-1.1.2.jar!/jruby/rack/rails.rb:47
new at file:/home/aarthi/.rvm/gems/jruby-1.6.5/gems/jruby-rack-1.1.2/lib/jruby-rack-1.1.2.jar!/jruby/rack/rails.rb:192
(root) at :1
instance_eval at org/jruby/RubyKernel.java:2062
initialize at file:/home/aarthi/.rvm/gems/jruby-1.6.5/gems/jruby-rack-1.1.2/lib/jruby-rack-1.1.2.jar!/vendor/rack-1.3.6/rack/builder.rb:51
(root) at :1

--- RubyGems
Gem.dir: /home/aarthi/.rvm/gems/jruby-1.6.5
Gem.path:
/home/aarthi/Projects/ccwebapp/WEB-INF/gems
/home/aarthi/.rvm/gems/jruby-1.6.5
/home/aarthi/.rvm/gems/jruby-1.6.5@global
Activated gems:
rake-0.9.2.2
RedCloth-4.2.9-java
Selenium-1.1.14
activesupport-2.3.5
rack-1.0.1
actionpack-2.3.5
actionmailer-2.3.5
activerecord-2.3.5
activerecord-jdbc-adapter-0.9.2
jdbc-mysql-5.0.4
activerecord-jdbcmysql-adapter-0.9.2
activeresource-2.3.5
builder-3.0.0
mime-types-1.17.2
xml-simple-1.1.1
aws-s3-0.6.2
braintree-2.7.0
bundler-1.0.21
cancan-1.6.7
highline-1.6.9
net-ssh-2.2.2
net-scp-1.0.4
net-sftp-2.0.5
net-ssh-gateway-1.1.0
capistrano-2.9.0
capistrano-ext-1.2.1
diff-lcs-1.1.3
json_pure-1.6.4
polyglot-0.3.3
term-ansicolor-1.0.7
treetop-1.4.10
cucumber-0.6.2
cucumber-rails-0.2.4
database_cleaner-0.4.3
ezcrypto-0.7.2
gem_plugin-0.2.3
geoip-0.8.6
geonames-0.2.2
haml-3.1.4
hoptoad_notifier-2.4.11
icalendar-1.1.1
image_voodoo-0.8.0
is_paranoid-0.9.6
jruby-openssl-0.6
jruby-rack-1.1.2
json-1.6.4-java
weakling-0.0.4-java
nokogiri-1.4.4-java
ruby-hmac-0.4.0
oauth-0.3.6
open4-1.3.0
rack-test-0.6.1
rails-2.3.5
ri_cal-0.8.5
rspec-1.3.0
rspec-rails-1.3.2
ruby-openid-2.1.8
rufus-scheduler-2.0.6
selenium-client-1.2.18
syntax-1.0.0
tlb-core-0.3.2
tlb-rspec1-0.3.2
toadhopper-2.0
trinidad_jars-1.0.2
trinidad-1.3.0
tzinfo-0.3.22
webrat-0.7.0

@calavera calavera reopened this
@calavera
Owner

Hey @kcpavan, I just committed a fix for some configuration errors that I got with the lastest rack version. Can you check master out and try with that version? If it works I'll go ahead and release a new stable version.

@bporterfield

Just started to try Trinidad today with Sinatra. I can't seem to get trinidad to start with a simple Sinatra app. This issue seems to be related. Using rvm-installed jruby:

jruby 1.6.5 (ruby-1.9.2-p136) (2011-10-25 9dcd388) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_29) [darwin-x86_64-java]

Gemfile:

gem 'rack'
gem 'jruby-rack'
gem 'trinidad', :git => "https://github.com/trinidad/trinidad.git"
gem 'sinatra'

config.ru

require 'rubygems'
require 'trinidad'
require 'tester' 
Tester.run! :host => 'localhost', :port => 8080

tester.rb

require 'sinatra/base'

class Tester < Sinatra::Base
  set :server, "trinidad"

  get '/' do
    "Hello!"
  end
end

Starting server with: bundle exec trinidad -r config.ru

Results:

NoMethodError: undefined method `register' for Rack::Handler:Module
    Handler at /Users/bporterfield/.rvm/gems/jruby-1.6.5@2j/bundler/gems/trinidad-c9f97fe94ebf/lib/rack/handler/trinidad.rb:40

Would love to know if new commits are related and/or if I'm doing something wrong? Thanks!

@calavera
Owner

@bporterfield, @kcpavan have you tried to run with the master version this command?

bundle exec rackup

it works fine for me. I think your problem is caused because in one side you're starting Trinidad directly with the binary and also launching the rack handler at the same time. I'm going to investigate further to solve this but, please, let me know if the command above works for you to release a new version with the latest changes and add some documentation about this issue.

Thank you!

@kcpavan

I tried with "bundle exec rackup" command it's starting webrick server.
even i tried with "bundle exec rackup -s trinidad" command its giving following error:

NameError: wrong constant name trinidad.

it's working fine without bundler.

I am using rack-1.1.3 and rails 2.3.14

@bporterfield

"bundle exec rackup" with my setup appears to be working. The output is:

bporterfield@ ~/dev/2jrubytest$ bundle exec rackup
Jan 6, 2012 8:13:53 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-/0.0.0.0-8080"]
Jan 6, 2012 8:13:53 AM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Tomcat
Jan 6, 2012 8:13:53 AM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.23
2012-01-06 16:13:53 INFO: No global web.xml found
2012-01-06 16:13:54 INFO: Starting ProtocolHandler ["http-bio-/0.0.0.0-8080"]

And the my test page was served. Thank you!

@calavera
Owner

I've released trinidad-1.3.1 with the latest fixes on master.

@kcpavan probably your issue is caused because you don't have Trinidad in your Gemfile. Check the README, I've added some lines about the rackup startup.

I'm going to close this issue but if your problems persist, please feel free to open it again.

Thank you!

@leenasn

I came across another issue with rails 2.3.14 and trinidad 1.3.1. The exception thrown was

undefined method 'raw_post' for nil:NilClass

It was being thrown from jruby-rack 1.1.2 version and the latest trinidad is dependent on the same. I downgraded trinidad to 1.2.0 and jruby-rack to 1.0.10 and the application seems to be working fine.

Any other suggested workaround for this?

@calavera
Owner

That looks more like a JRuby-rack issue. Please open a ticket at http://github.com/jruby/jruby-rack/issues

I'm closing this ticket.

Thank you!!

@calavera calavera closed this
@ghost

I'm still seeing this issue with Trinidad 1.3.1:

[myproject@myhost current]$ jruby -S trinidad -e myhost
Jan 11, 2012 6:17:21 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-3000"]
Jan 11, 2012 6:17:21 AM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Tomcat
Jan 11, 2012 6:17:21 AM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.23
2012-01-11 11:17:21 INFO: No global web.xml found
2012-01-11 11:17:22 INFO: Info: received max runtimes = 5
2012-01-11 11:17:22 INFO: jruby 1.6.5 (ruby-1.9.2-p136) (2011-10-25 9dcd388) (OpenJDK 64-Bit Server VM 1.6.0_22) [linux-amd64-java]
2012-01-11 11:17:22 INFO: Info: using runtime pool timeout of 30 seconds
2012-01-11 11:17:22 INFO: Info: received min runtimes = 1
2012-01-11 11:17:22 INFO: Info: received max runtimes = 5

config/boot.rb
config/environment.rb
config/application.rb
/home/myproject/.rvm/gems/jruby-1.6.5@myproject-rails-gui/gems/rack-1.3.6/lib/rack.rb:14 warning: already initialized constant VERSION
/home/myproject/.rvm/gems/jruby-1.6.5@myproject-rails-gui/gems/jruby-rack-1.1.3/lib/jruby/rack/version.rb:10 warning: already initialized constant VERSION
2012-01-11 11:17:33 INFO: Info: received min runtimes = 1
2012-01-11 11:17:33 INFO: Info: received max runtimes = 5
2012-01-11 11:17:33 INFO: An exception happened during JRuby-Rack startup
undefined method `register' for Rack::Handler:Module
--- System
jruby 1.6.5 (ruby-1.9.2-p136) (2011-10-25 9dcd388) (OpenJDK 64-Bit Server VM 1.6.0_22) [linux-amd64-java]
Time: 2012-01-11 06:17:33 -0500
Server: Apache Tomcat/7.0.23
jruby.home: /home/myproject/.rvm/rubies/jruby-1.6.5

--- Context Init Parameters:
jruby.compat.version = 1.9.2
jruby.initial.runtimes = 1
jruby.max.runtimes = 5
jruby.min.runtimes = 1
public.root = /public
rails.env = myhost
rails.root = /

--- Backtrace
NoMethodError: undefined method `register' for Rack::Handler:Module
Handler at /home/myproject/.rvm/gems/jruby-1.6.5@myproject-rails-gui/gems/trinidad-1.3.1/lib/rack/handler/trinidad.rb:40
Rack at /home/myproject/.rvm/gems/jruby-1.6.5@myproject-rails-gui/gems/trinidad-1.3.1/lib/rack/handler/trinidad.rb:8
(root) at /home/myproject/.rvm/gems/jruby-1.6.5@myproject-rails-gui/gems/trinidad-1.3.1/lib/rack/handler/trinidad.rb:7
require at org/jruby/RubyKernel.java:1047
(root) at /home/myproject/.rvm/gems/jruby-1.6.5@myproject-rails-gui/gems/trinidad-1.3.1/lib/rack/handler/trinidad.rb:24
require at org/jruby/RubyKernel.java:1047
require at /home/myproject/.rvm/gems/jruby-1.6.5@myproject-rails-gui/gems/trinidad-1.3.1/lib/trinidad.rb:68
each at org/jruby/RubyArray.java:1612
require at /home/myproject/.rvm/gems/jruby-1.6.5@myproject-rails-gui/gems/bundler-1.0.21/lib/bundler/runtime.rb:66
each at org/jruby/RubyArray.java:1612
require at /home/myproject/.rvm/gems/jruby-1.6.5@myproject-rails-gui/gems/bundler-1.0.21/lib/bundler/runtime.rb:55
require at /home/myproject/.rvm/gems/jruby-1.6.5@myproject-rails-gui/gems/bundler-1.0.21/lib/bundler.rb:122
(root) at /home/myproject/myproject-rails-gui/20120111040632/config/application.rb:17
require at org/jruby/RubyKernel.java:1047
(root) at /home/myproject/myproject-rails-gui/20120111040632/config/application.rb:4
require at org/jruby/RubyKernel.java:1047
load_environment at /home/myproject/myproject-rails-gui/20120111040632/config/environment.rb:167
to_app at file:/home/myproject/.rvm/gems/jruby-1.6.5@myproject-rails-gui/gems/jruby-rack-1.1.3/lib/jruby-rack-1.1.3.jar!/jruby/rack/rails.rb:172
new at file:/home/myproject/.rvm/gems/jruby-1.6.5@myproject-rails-gui/gems/jruby-rack-1.1.3/lib/jruby-rack-1.1.3.jar!/jruby/rack/rails.rb:192
(root) at /home/myproject/myproject-rails-gui/20120111040632/config.ru:1
instance_eval at org/jruby/RubyBasicObject.java:1720
initialize at file:/home/myproject/.rvm/gems/jruby-1.6.5@myproject-rails-gui/gems/jruby-rack-1.1.3/lib/jruby-rack-1.1.3.jar!/vendor/rack-1.3.6/rack/builder.rb:51
(root) at /home/myproject/myproject-rails-gui/20120111040632/config.ru:1

--- RubyGems
Gem.dir: /home/myproject/.rvm/gems/jruby-1.6.5@myproject-rails-gui
Gem.path:
/home/myproject/myproject-rails-gui/20120111040632/WEB-INF/gems
/home/myproject/.rvm/gems/jruby-1.6.5@myproject-rails-gui
/home/myproject/.rvm/gems/jruby-1.6.5@global
Activated gems:
bundler-1.0.21
rake-0.8.7
multi_json-1.0.4
activesupport-3.1.3
builder-3.0.0
i18n-0.6.0
activemodel-3.1.3
erubis-2.7.0
rack-1.3.6
rack-cache-1.1
rack-mount-0.8.3
rack-test-0.6.1
hike-1.2.1
tilt-1.3.3
sprockets-2.0.3
actionpack-3.1.3
mime-types-1.17.2
polyglot-0.3.3
treetop-1.4.10
mail-2.3.0
actionmailer-3.1.3
arel-2.2.1
tzinfo-0.3.31
activerecord-3.1.3
activeresource-3.1.3
bouncy-castle-java-1.5.0146.1
nokogiri-1.5.0-java
ffi-1.0.11-java
childprocess-0.2.3
rubyzip-0.9.5
selenium-webdriver-2.14.0
xpath-0.1.4
capybara-1.1.3.pre
ci_reporter-1.6.5
client_side_validations-3.0.5
diff-lcs-1.1.3
json-1.6.4-java
gherkin-2.7.2-java
term-ansicolor-1.0.7
cucumber-1.1.4
cucumber-rails-1.1.1
factory_girl-2.0.5
rack-ssl-1.3.2
rdoc-3.12
thor-0.14.6
railties-3.1.3
factory_girl_rails-1.1.0
formtastic-1.2.4
headless-0.2.2
humanizer-2.4.3
jquery-rails-1.0.19
jruby-jars-1.6.5
jruby-openssl-0.7.4
jruby-rack-1.1.3
memcache-client-1.8.5
net-ldap-0.2.2
rails-3.1.3
rest-client-1.6.7
rspec-core-2.6.4
rspec-expectations-2.6.0
rspec-mocks-2.6.0
rspec-2.6.0
rspec-rails-2.6.1
shoulda-2.11.3
trinidad_jars-1.0.2
trinidad-1.3.1
warbler-1.3.2
will_paginate-3.0.2

--- Bundler
Bundler.bundle_path: /home/myproject/.rvm/gems/jruby-1.6.5@myproject-rails-gui
Bundler.root: /home/myproject/myproject-rails-gui/20120111040632
Gemfile: /home/myproject/myproject-rails-gui/20120111040632/Gemfile
Settings:
gemfile = /home/myproject/myproject-rails-gui/20120111040632/Gemfile
bin_path = /home/myproject/.rvm/gems/jruby-1.6.5@global/gems/bundler-1.0.21/bin/bundle

--- JRuby-Rack Config
compat_version = RUBY1_9
filter_adds_html = true
filter_verifies_resource = false
ignore_environment = false
initial_runtimes = 1
jms_connection_factory =
jms_jndi_properties =
logger = org.jruby.rack.logging.ServletContextLogger@3af579d
logger_class_name = servlet_context
logger_name = jruby.rack
maximum_runtimes = 5
num_initializer_threads =
rackup =
rackup_path =
rewindable = true
runtime_arguments =
runtime_timeout_seconds =
serial_initialization = false
servlet_context = org.apache.catalina.core.ApplicationContextFacade@65612c8
2012-01-11 11:17:33 SEVERE: Error: unable to initialize application
2012-01-11 11:17:53 INFO: Starting ProtocolHandler ["http-bio-3000"]

@calavera calavera reopened this
@calavera
Owner

there is an open ticket in JRuby-rack talking about this:

jruby/jruby-rack#83

@ghost

Following the advice in that ticket I downgraded to jruby-rack-1.1.1. Trinidad 1.3.1 requires jruby-rack >= 1.1.2, which forced me do downgrade Trinidad to version 1.2.3. Once I did that I got things working.

Were there changes in jruby-rack-1.1.2 which Trinidad depends on? If not then the dependency could be lowered to 1.1.1, which would allow people to use trinidad-1.3.1 until jruby-rack is fixed. If that won't work then is there any way to get Trinidad 1.3.1 working right now or is it stuck until that issue in jruby-rack is resolved? If there isn't any way to run it then it would be helpful if the README said something about this problem.

Thanks for your help and all of the work on Trinidad.

@charliedavi

i have the same issue as @mhuffnagle 1.1.1 works fine 1.1.2/3 crash out

@calavera
Owner

It seems the issues were caused because Rack uses autoload to load Rack::Handler and when we tried to load Trinidad's rack handler that module wasn't initialized. This is the commit with the fix:

7729f5a

I've released Trinidad 1.3.2 with it.

I'm closing this issue. Thank you all for your patience.

@calavera calavera closed this
@charliedavi

works for me - thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.