This file contains 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
jdbc_adapter.JdbcAdapterInternalService:373:in `set_native_database_types': java.lang.NullPointerException | |
from jdbc_adapter.JdbcAdapterInternalService$s_method_0_0$RUBYINVOKER$set_native_database_types:-1:in `call' | |
from org.jruby.runtime.callsite.CachingCallSite:260:in `cacheAndCall' | |
from org.jruby.runtime.callsite.CachingCallSite:75:in `call' | |
from org.jruby.ast.VCallNode:82:in `interpret' | |
from org.jruby.ast.NewlineNode:101:in `interpret' | |
from org.jruby.ast.BlockNode:68:in `interpret' | |
from org.jruby.ast.RescueNode:222:in `executeBody' | |
from org.jruby.ast.RescueNode:144:in `interpretWithJavaExceptions' | |
from org.jruby.ast.RescueNode:107:in `interpret' |
This file contains 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
development: | |
adapter: jdbc | |
driver: org.apache.derby.jdbc.EmbeddedDriver | |
url: jdbc:derby://localhost/sketchy;create=true | |
pool: 5 | |
timeout: 5000 |
This file contains 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 'sinatra' | |
require 'json' | |
#WRONG gem 'ActiveRecord-JDBC' | |
gem 'activerecord-jdbc-adapter' | |
require 'jdbc_adapter' | |
require 'active_record' | |
ActiveRecord::Base.establish_connection( | |
:adapter => 'jdbcderby', |
This file contains 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
let's make a list of sinatra-based apps! | |
apps: | |
- http://github.com/cschneid/irclogger "Sinatra based irclogger.com" | |
- http://github.com/rtomayko/wink "minimalist blogging engine" | |
- http://github.com/foca/integrity "The easy and fun Continuous Integration server" | |
- http://github.com/sr/git-wiki "git-powered wiki" | |
- http://github.com/entp/seinfeld "Seinfeld-inspired productivity calendar to track your public github commits." | |
- http://github.com/karmi/marley "Marley, the blog engine without <textareas>. See in action @ www.restafari.org" | |
- http://github.com/ichverstehe/gaze "Serve up your Markdown files with this tiny Sinatra app!" |
This file contains 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
(07:28:35 PM) capotej: whew, i switched to sequel from activerecord and my req/s skyrocketed | |
(07:30:30 PM) danishkirel [[email protected]] entered the room. | |
(07:30:39 PM) MarkMenard_: capotej: What framework are you using for the web tier? | |
(07:31:01 PM) capotej: sinatra | |
(07:31:10 PM) MarkMenard_: Interesting. | |
(07:31:17 PM) capotej: yea i was blown away | |
(07:31:18 PM) MarkMenard_: Before and after numbers? | |
(07:31:22 PM) capotej: 0.81 req/s | |
(07:31:26 PM) capotej: 245 req/s | |
(07:31:27 PM) capotej: lol |
This file contains 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
;; This buffer is for notes you don't want to save, and for Lisp evaluation. | |
;; If you want to create a file, visit that file with C-x C-f, | |
;; then enter the text in that file's own buffer. | |
This file contains 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
map.resources :photos, :requirements => { :id => /[A-Z][A-Z][0-9]+/ } |
This file contains 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
def choose arg | |
case arg | |
when :something: | |
puts "something" | |
when :other: | |
puts "other" | |
default | |
puts "nothing" | |
end | |
end |
This file contains 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 'feedzirra' | |
# fetching a single feed | |
feed = Feedzirra::Feed.fetch_and_parse("http://feeds.feedburner.com/PaulDixExplainsNothing") | |
# feed and entries accessors | |
feed.title # => "Paul Dix Explains Nothing" | |
feed.url # => "http://www.pauldix.net" | |
feed.feed_url # => "http://feeds.feedburner.com/PaulDixExplainsNothing" | |
feed.etag # => "GunxqnEP4NeYhrqq9TyVKTuDnh0" |
This file contains 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 'feedzirra' | |
# fetching a single feed | |
feed = Feedzirra::Feed.fetch_and_parse("http://feeds.feedburner.com/PaulDixExplainsNothing") | |
# feed and entries accessors | |
feed.title # => "Paul Dix Explains Nothing" | |
feed.url # => "http://www.pauldix.net" | |
feed.feed_url # => "http://feeds.feedburner.com/PaulDixExplainsNothing" | |
feed.etag # => "GunxqnEP4NeYhrqq9TyVKTuDnh0" |
OlderNewer