Jruby converted ruby app problems -
i'm trying deploy ruby app our webserver , fit in other apps running there. this, need toss in war , run jetty.
the app has been sitting on machine sometime gems out of date, in process of getting updated , transitioned jruby resolved number of old dependencies warbler bundle it. warbler bundling fine, deployed app dying unknown method.
this the stack trace get:
--- system jruby 1.7.4 (1.9.3p392) 2013-05-16 2390d3b on openjdk 64-bit server vm 1.6.0_27-b27 [linux-amd64] time: 2013-08-07 09:13:33 -0400 server: jetty/8.1.11.v20130520 jruby.home: file:/tmp/jetty-0.0.0.0-8085-webstat.war-_webstat-any-/webapp/web-inf/lib/jruby-stdlib-1.7.4.jar!/meta-inf/jruby.home --- context init parameters: public.root = / rails.env = production --- backtrace nomethoderror: undefined method `set_table_name' lockablestate(table doesn't exist):class method_missing @ org/jruby/rubybasicobject.java:1696 method_missing @ /tmp/jetty-0.0.0.0-8085-webstat.war-_webstat-any-/webapp/web-inf/gems/gems/activerecord-4.0.0/lib/active_record/dynamic_matchers.rb:22 lockablestate @ app/models/lockable_state.rb:3 (root) @ app/models/lockable_state.rb:1 load @ org/jruby/rubykernel.java:1073 load @ /tmp/jetty-0.0.0.0-8085-webstat.war-_webstat-any-/webapp/web-inf/gems/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:222 load_dependency @ /tmp/jetty-0.0.0.0-8085-webstat.war-_webstat-any-/webapp/web-inf/gems/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:213 load @ /tmp/jetty-0.0.0.0-8085-webstat.war-_webstat-any-/webapp/web-inf/gems/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:222 (root) @ /tmp/jetty-0.0.0.0-8085-webstat.war-_webstat-any-/webapp/web-inf/app/models/lockable_state.rb:1 require @ org/jruby/rubykernel.java:1054 require @ /tmp/jetty-0.0.0.0-8085-webstat.war-_webstat-any-/webapp/web-inf/gems/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228 load_dependency @ /tmp/jetty-0.0.0.0-8085-webstat.war-_webstat-any-/webapp/web-inf/gems/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:213 require @ /tmp/jetty-0.0.0.0-8085-webstat.war-_webstat-any-/webapp/web-inf/gems/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228 require_or_load @ /tmp/jetty-0.0.0.0-8085-webstat.war-_webstat-any-/webapp/web-inf/gems/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:329 depend_on @ /tmp/jetty-0.0.0.0-8085-webstat.war-_webstat-any-/webapp/web-inf/gems/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:288 require_dependency @ /tmp/jetty-0.0.0.0-8085-webstat.war-_webstat-any-/webapp/web-inf/gems/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:206 (root) @ /tmp/jetty-0.0.0.0-8085-webstat.war-_webstat-any-/webapp/web-inf/gems/gems/railties-4.0.0/lib/rails/engine.rb:1 each @ org/jruby/rubyarray.java:1617 eager_load! @ /tmp/jetty-0.0.0.0-8085-webstat.war-_webstat-any-/webapp/web-inf/gems/gems/railties-4.0.0/lib/rails/engine.rb:465 each @ org/jruby/rubyarray.java:1617 eager_load! @ /tmp/jetty-0.0.0.0-8085-webstat.war-_webstat-any-/webapp/web-inf/gems/gems/railties-4.0.0/lib/rails/engine.rb:464 eager_load! @ /tmp/jetty-0.0.0.0-8085-webstat.war-_webstat-any-/webapp/web-inf/gems/gems/railties-4.0.0/lib/rails/engine.rb:462 each @ org/jruby/rubyarray.java:1617 eager_load! @ /tmp/jetty-0.0.0.0-8085-webstat.war-_webstat-any-/webapp/web-inf/gems/gems/railties-4.0.0/lib/rails/engine.rb:347 instance_exec @ org/jruby/rubybasicobject.java:1764 run @ /tmp/jetty-0.0.0.0-8085-webstat.war-_webstat-any-/webapp/web-inf/gems/gems/railties-4.0.0/lib/rails/initializable.rb:30 finisher @ /tmp/jetty-0.0.0.0-8085-webstat.war-_webstat-any-/webapp/web-inf/gems/gems/railties-4.0.0/lib/rails/application/finisher.rb:56 run_initializers @ /tmp/jetty-0.0.0.0-8085-webstat.war-_webstat-any-/webapp/web-inf/gems/gems/railties-4.0.0/lib/rails/initializable.rb:55 tsort_each @ jar:file:/tmp/jetty-0.0.0.0-8085-webstat.war-_webstat-any-/webapp/web-inf/lib/jruby-stdlib-1.7.4.jar!/meta-inf/jruby.home/lib/ruby/1.9/tsort.rb:150 each_strongly_connected_component_from @ jar:file:/tmp/jetty-0.0.0.0-8085-webstat.war-_webstat-any-/webapp/web-inf/lib/jruby-stdlib-1.7.4.jar!/meta-inf/jruby.home/lib/ruby/1.9/tsort.rb:219 each_strongly_connected_component @ jar:file:/tmp/jetty-0.0.0.0-8085-webstat.war-_webstat-any-/webapp/web-inf/lib/jruby-stdlib-1.7.4.jar!/meta-inf/jruby.home/lib/ruby/1.9/tsort.rb:183 each @ org/jruby/rubyarray.java:1617 each_strongly_connected_component @ jar:file:/tmp/jetty-0.0.0.0-8085-webstat.war-_webstat-any-/webapp/web-inf/lib/jruby-stdlib-1.7.4.jar!/meta-inf/jruby.home/lib/ruby/1.9/tsort.rb:182 each_strongly_connected_component @ jar:file:/tmp/jetty-0.0.0.0-8085-webstat.war-_webstat-any-/webapp/web-inf/lib/jruby-stdlib-1.7.4.jar!/meta-inf/jruby.home/lib/ruby/1.9/tsort.rb:180 tsort_each @ jar:file:/tmp/jetty-0.0.0.0-8085-webstat.war-_webstat-any-/webapp/web-inf/lib/jruby-stdlib-1.7.4.jar!/meta-inf/jruby.home/lib/ruby/1.9/tsort.rb:148 run_initializers @ /tmp/jetty-0.0.0.0-8085-webstat.war-_webstat-any-/webapp/web-inf/gems/gems/railties-4.0.0/lib/rails/initializable.rb:54 __send__ @ org/jruby/rubybasicobject.java:1703 send @ org/jruby/rubykernel.java:2209 initialize! @ /tmp/jetty-0.0.0.0-8085-webstat.war-_webstat-any-/webapp/web-inf/gems/gems/railties-4.0.0/lib/rails/application.rb:215 (root) @ config/environment.rb:5 load @ org/jruby/rubykernel.java:1073 method_missing @ /tmp/jetty-0.0.0.0-8085-webstat.war-_webstat-any-/webapp/web-inf/gems/gems/railties-4.0.0/lib/rails/railtie/configurable.rb:30 require @ org/jruby/rubykernel.java:1054 (root) @ /tmp/jetty-0.0.0.0-8085-webstat.war-_webstat-any-/webapp/web-inf/config/environment.rb:1 (root) @ file:/tmp/jetty-0.0.0.0-8085-webstat.war-_webstat-any-/webapp/web-inf/lib/jruby-rack-1.1.13.2.jar!/jruby/rack/rails/environment3.rb:1 load_environment @ file:/tmp/jetty-0.0.0.0-8085-webstat.war-_webstat-any-/webapp/web-inf/lib/jruby-rack-1.1.13.2.jar!/jruby/rack/rails/environment3.rb:25 --- rubygems gem.dir: /tmp/jetty-0.0.0.0-8085-webstat.war-_webstat-any-/webapp/web-inf/gems gem.path: /tmp/jetty-0.0.0.0-8085-webstat.war-_webstat-any-/webapp/web-inf/gems activated gems: bundler-1.3.5 rake-10.1.0 codeofficer-rack-options-request-3.0.0 i18n-0.6.4 minitest-4.7.5 multi_json-1.7.8 atomic-1.1.12-java thread_safe-0.1.2-java tzinfo-0.3.37 activesupport-4.0.0 builder-3.1.4 erubis-2.7.0 rack-1.5.2 rack-test-0.6.2 actionpack-4.0.0 mime-types-1.23 polyglot-0.3.3 treetop-1.4.14 mail-2.5.4 actionmailer-4.0.0 activemodel-4.0.0 activerecord-deprecated_finders-1.0.3 arel-4.0.0 activerecord-4.0.0 activerecord-jdbc-adapter-1.2.9.1 jdbc-mysql-5.1.25 activerecord-jdbcmysql-adapter-1.2.9 thor-0.18.1 railties-4.0.0 activerecord-session_store-0.0.1 acts_as_list-0.2.0 acts_as_tree-1.4.0 exception_notification-4.0.0 foreigner-1.4.2 hike-1.2.3 protected_attributes-1.0.3 tilt-1.4.1 sprockets-2.10.0 sprockets-rails-2.0.0 rails-4.0.0 therubyrhino_jar-1.7.4 therubyrhino-2.0.2 will_paginate-3.0.4 --- bundler bundler.bundle_path: /tmp/jetty-0.0.0.0-8085-webstat.war-_webstat-any-/webapp/web-inf/gems bundler.root: /tmp/jetty-0.0.0.0-8085-webstat.war-_webstat-any-/webapp/web-inf gemfile: /tmp/jetty-0.0.0.0-8085-webstat.war-_webstat-any-/webapp/web-inf/gemfile settings: gemfile = /tmp/jetty-0.0.0.0-8085-webstat.war-_webstat-any-/webapp/web-inf/gemfile without = development:test:assets bin_path = /tmp/jetty-0.0.0.0-8085-webstat.war-_webstat-any-/webapp/web-inf/gems/gems/bundler-1.3.5/bin/bundle --- jruby-rack config compat_version = default_logger = org.jruby.rack.logging.standardoutlogger@1dfe3aa4 equals = <error: > err = java.io.printstream@3dcb9af7 filter_adds_html = true filter_verifies_resource = false ignore_environment = false initial_memory_buffer_size = initial_runtimes = jms_connection_factory = jms_jndi_properties = logger = org.jruby.rack.logging.servletcontextlogger@42f6b022 logger_class_name = servlet_context logger_name = jruby.rack maximum_memory_buffer_size = maximum_runtimes = num_initializer_threads = out = java.io.printstream@677afc95 rackup = rackup_path = rewindable = true runtime_arguments = runtime_environment = runtime_timeout_seconds = serial_initialization = false servlet_context = servletcontext@o.e.j.w.webappcontext{/webstat,file:/tmp/jetty-0.0.0.0-8085-webstat.war-_webstat-any-/webapp/},/mfl/run/war/webstat.war throw_init_exception = false
set_table_name
has been removed in rails 4
instead, should use
class lockablestate < activerecord::base self.table_name = "locks" end
Comments
Post a Comment