Skip to content

Instantly share code, notes, and snippets.

TIME_AT_LAUNCH = Time.now
...
get '/stylesheets/:stylesheet.sass' do
content_type 'text/css', :charset => 'utf-8'
last_modified TIME_AT_LAUNCH
sass :"stylesheets/#{params['stylesheet']}"
end
!! Unexpected error while processing request: undefined method `call' for nil:NilClass
undefined method `call' for nil:NilClass
/home/max/git/rack/lib/rack/builder.rb:60:in `call'
/usr/lib/ruby/gems/1.8/gems/thin-1.2.4/lib/thin/connection.rb:76:in `pre_process'
/usr/lib/ruby/gems/1.8/gems/thin-1.2.4/lib/thin/connection.rb:74:in `catch'
/usr/lib/ruby/gems/1.8/gems/thin-1.2.4/lib/thin/connection.rb:74:in `pre_process'
/usr/lib/ruby/gems/1.8/gems/thin-1.2.4/lib/thin/connection.rb:57:in `process'
/usr/lib/ruby/gems/1.8/gems/thin-1.2.4/lib/thin/connection.rb:42:in `receive_data'
/usr/lib/ruby/gems/1.8/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run_machine'
/usr/lib/ruby/gems/1.8/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run'
<nanodeath> hey Debu. I complained about the very same thing yesterday http://support.appcelerator.net/discussions/titanium-desktop-discussion/231-more-developer-docs-for-the-desktop-apps-please
<nanodeath> but I've found that I don't think desktops need that much interaction with the API, except when like, creating dialogs and tray icons and whatnot
<nanodeath> to create a link or a button, it's the same as it would be for a regular web app
<nanodeath> if there's anything in particular you need help with, there's a slight chance I might be able to help out. for now I've mostly just been poking around the API
module Destroyable
def call_destructor(id)
@destructors[id].each do |o|
o.__destroy(id) if o.respond_to? :__destroy
end
@destructors.delete(id)
end
def is_destroyable
@destructors = {}
--- !ruby/exception:RAWS::HTTP::Error
message: RAWS::HTTP::Error
response: !ruby/object:RAWS::HTTP::Typhoeus::Response
body: ""
doc: {}
header: {}
response: &id001 !ruby/object:Typhoeus::Response
body: ""
>> Typhoeus::Request.get("https://mail.google.com/").code
=> 200
>> Typhoeus::Request.get("https://mail.google.com/").code
=> 0
Servers restarted
Ruby console for *.heroku.com
>> Typhoeus::Request.get("https://mail.google.com/").code
=> 200
>> Typhoeus::Request.get("https://mail.google.com/").code
=> 0
>> Typhoeus::VERSION
=> "0.1.14"
>> hydra = Typhoeus::Hydra.new; a = Typhoeus::Request.new("https://mail.google.com"); hydra.queue(a); hydra.run; a.response.code
=> 200
>> hydra = Typhoeus::Hydra.new; a = Typhoeus::Request.new("https://mail.google.com"); hydra.queue(a); hydra.run; a.response.code
=> 200
>> hydra = Typhoeus::Hydra.hydra; a = Typhoeus::Request.new("https://mail.google.com"); hydra.queue(a); hydra.run; a.response.code
=> 0
>> hydra = Typhoeus::Hydra.hydra; a = Typhoeus::Request.new("https://mail.google.com"); hydra.queue(a); hydra.run; a.response.code
=> 0
>> hydra = Typhoeus::Hydra.new
=> #<Typhoeus::Hydra:0x2b2b902130e0 @multi=#<Typhoeus::Multi:0x2b2b90213068>, @retrieved_from_cache={}, @max_concurrency=200, @memoize_requests=true, @memoized_requests={}, @running_requests=0, @stubs=[], @easy_pool=[#<Typhoeus::Easy:0x2b2b90212fc8>, #<Typhoeus::Easy:0x2b2b90212f50>, #<Typhoeus::Easy:0x2b2b90212eb0>, #<Typhoeus::Easy:0x2b2b90212e10>, #<Typhoeus::Easy:0x2b2b90212d70>, #<Typhoeus::Easy:0x2b2b90212cd0>, #<Typhoeus::Easy:0x2b2b90212c30>, #<Typhoeus::Easy:0x2b2b90212b90>, #<Typhoeus::Easy:0x2b2b90212af0>, #<Typhoeus::Easy:0x2b2b90212a50>], @queued_requests=[]>
>> a = Typhoeus::Request.new("https://mail.google.com"); hydra.queue(a); hydra.run; a.response.code
=> 200
>> a = Typhoeus::Request.new("https://mail.google.com"); hydra.queue(a); hydra.run; a.response.code
=> 0
>> (hydra.send :instance_variable_set, :@easy_pool, [].fill(Typhoeus::Easy.new, 0, 5))
=> [#<Typhoeus::Easy:0x2b2b90206d40>, #<Typhoeus::Easy:0x2b2b90206d40>, #<Typhoeus::Easy:0x2b2b90206d40>, #<Typhoeu
require 'rubygems' # skip this line in Ruby 1.9
require 'sinatra'
get '/' do
"Hello, world!"
end