Skip to content

Instantly share code, notes, and snippets.

/bin/sh bin/standalone.sh -Djruby.home=/home/deployer/.rvm/rubies/jruby-1.6.7 -b 10.10.123.46
=========================================================================
JBoss Bootstrap Environment
JBOSS_HOME: /home/deployer/.rvm/gems/jruby-1.6.7/gems/torquebox-server-2.0.0.cr1-java/jboss
JAVA: java
JAVA_OPTS: -server -XX:+UseCompressedOops -XX:+TieredCompilation -Xms64m -Xmx512m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -Djboss.server.default.config=standalone.xml
Fetching gem metadata from https://rubygems.org/.JRuby limited openssl loaded. http://jruby.org/openssl
gem install jruby-openssl for full support.
Unfortunately, a fatal error has occurred. Please report this error to the Bundler issue tracker at https://github.com/carlhuda/bundler/issues so that we can fix it. Please include the full output of the command, your Gemfile and Gemfile.lock. Thanks!
LoadError: OpenSSL::SSL requires the jruby-openssl gem
(root) at /home/deployer/.rvm/rubies/jruby-1.6.7/lib/ruby/site_ruby/shared/jruby/openssl/autoloads/ssl.rb:8
use_ssl= at /home/deployer/.rvm/rubies/jruby-1.6.7/lib/ruby/site_ruby/shared/jruby/openssl/autoloads/ssl.rb:124
ssl at /home/deployer/.rvm/gems/jruby-1.6.7@global/gems/bundler-1.1.3/lib/bundler/vendor/net/http/persistent.rb:448
connection_for at /home/deployer/.rvm/gems/jruby-1.6.7@global/gems/bundler-1.1.3/lib/bundler/vendor/net/http/persistent.rb:216
=========================================================================
JBoss Bootstrap Environment
JBOSS_HOME: /home/deployer/.rvm/gems/jruby-1.6.7/gems/torquebox-server-2.0.0.cr1-java/jboss
JAVA: java
JAVA_OPTS: -server -XX:+UseCompressedOops -XX:+TieredCompilation -Xms64m -Xmx512m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -Djboss.server.default.config=standalone.xml
Concurrency Level: 1
Time taken for tests: 33.708 seconds
Complete requests: 100
Failed requests: 0
Write errors: 0
Total transferred: 863200 bytes
HTML transferred: 814800 bytes
Requests per second: 2.97 [#/sec] (mean)
Time per request: 337.084 [ms] (mean)
Time per request: 337.084 [ms] (mean, across all concurrent requests)
a = 1
b = 2
{ a: a,
b: b,
c: a + b
}
result = []
supported_cartypes.each {|i| result << i.name if i.position.to_i >= minimum_cartype.position}
result.concat supported_cartypes.select {|i| i.position.to_i >= minimum_cartype.position}.map(&:name)
def self.get_fees(location_id)
{
flat: {
specific: LocationFee.where(location_id: location_id, pricing: 'flat', rate_category_specific: true, active: true),
unspecific: LocationFee.where(location_id: location_id, pricing: 'flat', rate_category_specific: false, active: true)
},
per_day: {
specific: LocationFee.where(location_id: location_id, pricing: 'per_day', rate_category_specific: true, active: true),
unspecific: LocationFee.where(location_id: location_id, pricing: 'per_day', rate_category_specific: true, active: true)
},
 def self.get(location, cartypes, pickup_date, return_date)
   inventory = {}
   date_range = (pickup_date .. return_date)
   values = $redis.pipelined do
               cartypes.each do |cartype|
                 date_range.each do |date|
                   $redis.hgetall(key(location, cartype, date))
                 end
               end
             end
@luckyruby
luckyruby / nginx + 10 thin instances
Created April 11, 2012 06:57
Comparison between torquebox 2.0.0 + jruby 1.6.7 and nginx+thin+1.9.3mri
Concurrency Level: 10
Time taken for tests: 8.583 seconds
Complete requests: 100
Failed requests: 0
Write errors: 0
Total transferred: 2117500 bytes
HTML transferred: 2081300 bytes
Requests per second: 11.65 [#/sec] (mean)
Time per request: 858.341 [ms] (mean)
Time per request: 85.834 [ms] (mean, across all concurrent requests)
require 'rubygems'
require 'eventmachine'
require 'nokogiri'
require 'net/http'
require 'uri'
require 'yajl'
require 'active_support/core_ext'
require 'yaml'
require 'logger'
require 'securerandom'