Skip to content

Instantly share code, notes, and snippets.

deployer@pringles:/var/www/reznet_core/current$ ruby -v
jruby 1.7.0.dev (ruby-1.9.3-p139) (2012-04-25 d5c15f5) (OpenJDK 64-Bit Server VM 1.7.0_147-icedtea) [linux-amd64-java]
deployer@pringles:/var/www/reznet_core/current$ jruby -J-Xmx1024m -S gem install torquebox-server
Fetching: torquebox-core-2.0.1-java.gem (100%)
Fetching: torquebox-transactions-2.0.1.gem (100%)
Fetching: blankslate-2.1.2.4.gem (100%)
Fetching: torquebox-configure-2.0.1-java.gem (100%)
Fetching: clj-0.0.5.6.gem (100%)
Fetching: torquebox-messaging-2.0.1-java.gem (100%)
Fetching: torquebox-naming-2.0.1-java.gem (100%)
16:28:23,007 INFO [org.torquebox.core.runtime] (Thread-108) Setting up Bundler
16:28:32,099 INFO [org.torquebox.core.runtime] (Thread-108) Created ruby runtime (ruby_version: RUBY1_9, compile_mode: JIT, app: 20120425185616, context: web) in 10.1s
16:28:36,322 ERROR [org.torquebox.web.servlet.RackFilter] (http--10.10.123.11-8080-1) Error invoking Rack filter: java.lang.NullPointerException
at org.jruby.RubyHash.internalGetEntry(RubyHash.java:506) [jruby.jar:]
at org.jruby.RubyHash.internalGet(RubyHash.java:502) [jruby.jar:]
at org.jruby.RubyHash.fastARef(RubyHash.java:942) [jruby.jar:]
at org.jruby.Ruby.recursiveCheck(Ruby.java:3765) [jruby.jar:]
at org.jruby.Ruby.execRecursiveInternal(Ruby.java:3801) [jruby.jar:]
at org.jruby.Ruby.execRecursiveOuter(Ruby.java:3876) [jruby.jar:]
at org.jruby.RubyArray.hash19(RubyArray.java:694) [jruby.jar:]
deployer@pringles:/var/www/reznet_core/current$ torquebox run -J "\-Xmx1024m" -b 10.10.123.11
/home/deployer/.rvm/gems/jruby-head/gems/torquebox-rake-support-2.0.1/lib/torquebox/deploy_utils.rb:351: Use RbConfig instead of obsolete and deprecated Config.
/bin/sh bin/standalone.sh -Djruby.home=/home/deployer/.rvm/rubies/jruby-head -b 10.10.123.11
=========================================================================
JBoss Bootstrap Environment
JBOSS_HOME: /home/deployer/.rvm/gems/jruby-head/gems/torquebox-server-2.x.incremental.955-java/jboss
JAVA: /usr/lib/jvm/java-7-openjdk-amd64/bin/java
deployer@pringles:/var/www/reznet_core/current$ RAILS_ENV=production jruby --server -S puma
/var/www/reznet_core/shared/bundle/jruby/1.9/gems/rack-1.4.1/lib/rack.rb:14 warning: already initialized constant VERSION
JopensslService.java:10 warning: already initialized constant PKCS1_PADDING
JopensslService.java:10 warning: already initialized constant SSLV23_PADDING
JopensslService.java:10 warning: already initialized constant NO_PADDING
JopensslService.java:10 warning: already initialized constant PKCS1_OAEP_PADDING
JopensslService.java:10 warning: already initialized constant UNIVERSAL_TAG_NAME
JopensslService.java:10 warning: already initialized constant EOC
JopensslService.java:10 warning: already initialized constant BOOLEAN
JopensslService.java:10 warning: already initialized constant INTEGER
Java::JavaLang::ArrayIndexOutOfBoundsException (9):
org.joni.ByteCodeMachine.opExactMB3N(ByteCodeMachine.java:561)
org.joni.ByteCodeMachine.matchAt(ByteCodeMachine.java:205)
org.joni.Matcher.matchCheck(Matcher.java:293)
org.joni.Matcher.search(Matcher.java:438)
org.jruby.RubyString.subBangNoIter19(RubyString.java:2784)
org.jruby.RubyString.sub_bang19(RubyString.java:2740)
org.jruby.RubyString$INVOKER$i$sub_bang19.call(RubyString$INVOKER$i$sub_bang19.gen)
org.jruby.internal.runtime.methods.JavaMethod$JavaMethodOneOrTwoOrNBlock.call(JavaMethod.java:343)
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:201)
def self.deep_copy(o)
Marshal.load(Marshal.dump(o))
end
ArgumentError (wrong constant name other_charges_total):
lib/utility.rb:22:in `deep_copy'
app/models/rate_shop.rb:618:in `results'
app/controllers/requests_controller.rb:4:in `AS'
@luckyruby
luckyruby / puma
Created April 30, 2012 19:16
Starting up 4 daemonized instances with thin vs puma
RAILS_ENV=production puma -b unix:///tmp/myapp.0.sock >/dev/null &
RAILS_ENV=production puma -b unix:///tmp/myapp.1.sock >/dev/null &
RAILS_ENV=production puma -b unix:///tmp/myapp.2.sock >/dev/null &
RAILS_ENV=production puma -b unix:///tmp/myapp.3.sock >/dev/null &
Thread 1: total running time: 390.28165700000005s
% cumulative self self total
time seconds seconds calls ms/call ms/call name
------------------------------------------------------------
63.97 303.11 303.11 12 25258.91 25258.91 Rubinius::Channel#receive
1.22 81.75 5.79 113614 0.05 0.72 Array#each
0.79 9.86 3.72 54915 0.07 0.18 String#upcase!
0.77 4.39 3.65 359795 0.01 0.01 BasicObject#!
0.68 8.23 3.21 84741 0.04 0.10 Hash#[]
http://localhost:3000/requests/AS?&function=AS&iata=10655083&pickup_location=PHX&pickup_date=18MAY2012&pickup_time=1000&return_date=20MAY2012&return_time=1000&cartype=E****
thin start -s4 --socket /tmp/myapp.sock
Starting server on /tmp/myapp.0.sock ...
Starting server on /tmp/myapp.1.sock ...
Starting server on /tmp/myapp.2.sock ...
Starting server on /tmp/myapp.3.sock ...
thin start -s4
Starting server on 0.0.0.0:3000 ...
Starting server on 0.0.0.0:3001 ...
Starting server on 0.0.0.0:3002 ...