This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| source :gemcutter | |
| gem 'rails', '~> 2.3.5', :require => nil |
OlderNewer