Skip to content

Instantly share code, notes, and snippets.

25.07.2009 14:15:26 org.apache.catalina.core.ApplicationContext log
SCHWERWIEGEND: unable to create shared application instance
org.jruby.rack.RackInitializationException: Invalid callback parameter type: STRING
from file:/home/tomcat/tomcat/webapps/nokotest/WEB-INF/lib/jruby-complete-1.3.1.jar!/ffi/library.rb:50:in `attach_function'
from file:/home/tomcat/tomcat/webapps/nokotest/WEB-INF/lib/jruby-complete-1.3.1.jar!/ffi/library.rb:48:in `each'
from file:/home/tomcat/tomcat/webapps/nokotest/WEB-INF/lib/jruby-complete-1.3.1.jar!/ffi/library.rb:48:in `attach_function'
from /home/tomcat/tomcat/webapps/nokotest/WEB-INF/gems/gems/nokogiri-1.3.2-java/lib/nokogiri/ffi/libxml.rb:138
from /home/tomcat/tomcat/webapps/nokotest/WEB-INF/gems/gems/nokogiri-1.3.2-java/lib/nokogiri/ffi/libxml.rb:31:in `require'
from file:/home/tomcat/tomcat/webapps/nokotest/WEB-INF/lib/jruby-complete-1.3.1.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require
$ irb1.9
irb(main):001:0> class Foo; end
=> nil
irb(main):002:0> foo = Foo.new
=> #<Foo:0x0000010107cd38>
irb(main):003:0> def foo.bar; 'foobar'; end
=> nil
irb(main):004:0> foo.bar
=> "foobar"
irb(main):005:0> Foo.new.bar
module Harmony
# Allows accessing config variables from harmony.yml like so:
# Harmony[:domain] => harmonyapp.com
def self.[](key)
unless @config
raw_config = File.read(RAILS_ROOT + "/config/harmony.yml")
@config = YAML.load(raw_config)[RAILS_ENV].symbolize_keys
end
@config[key]
end
Rails CMS alternatives
======================
Active projects:
---------------
adva-cms
repo: http://github.com/svenfuchs/adva_cms/
site: http://adva-cms.org/
Last update: 11/24/09
"the cutting edge Rails CMS platform"
@rubiii
rubiii / gist:255105
Created December 12, 2009 22:16 — forked from locks/app.rb
require 'rubygems'
require 'savon'
require 'sinatra'
#Savon::SOAP.version = 2
servico = "http://dot.dei.isep.ipp.pt/060516/dir3/srvARQSI45.asmx?wsdl"
get '/' do
client = Savon::Client.new servico
@rubiii
rubiii / url_dsl.rb
Created December 14, 2009 19:00 — forked from defunkt/url_dsl.rb
require 'open-uri'
# url dsl -- the ultimate url dsl!
#
# You just can't beat this:
#
# $ irb -r url_dsl
# >> include URLDSL
# => Object
# >> http://github.com/defunkt.json
In response to all the responses to:
http://twitter.com/rtomayko/status/1155906157
You should never do this in a source file included with your library,
app, or tests:
require 'rubygems'
The system I use to manage my $LOAD_PATH is not your library/app/tests
# Reincarnation for classes
class Class
def reincarnate
buried = Object.__send__(:remove_const, self.name)
Object.const_set(self.name, Class.new(buried))
end
end
class Abc
require 'rack/utils'
module Rack
#
# EnforceSSL is a Rack middleware app that enforces that users visit
# specific paths via HTTPS. If a sensitive path is requested over
# plain-text HTTP, a 307 Redirect will be issued leading to the HTTPS
# version of the Requested URI.
#
# MIT License - Hal Brodigan (postmodern.mod3 at gmail.com)
@rubiii
rubiii / Gemfile
Created February 9, 2010 20:57 — forked from samgranieri/Gemfile
source :gemcutter
gem 'rails', '~> 2.3.5', :require => nil