Skip to content

Instantly share code, notes, and snippets.

# rake db:migrate RAILS_ENV="production" --trace
(in /var/www/enki.marc-seeger.de)
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
rake aborted!
Object is not missing constant Comment!
/opt/ruby-enterprise-1.8.7-20090928/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:417:in `load_missing_co nstant'
/opt/ruby-enterprise-1.8.7-20090928/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:80:in `const_missing'
/opt/ruby-enterprise-1.8.7-20090928/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:92:in `const_missing'
# script/server -e production
=> Booting WEBrick
=> Rails 2.3.4 application starting on http://0.0.0.0:3000
/opt/ruby-enterprise-1.8.7-20090928/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:417:in `load_missing_constant': Object is not missing constant Comment! (ArgumentError)
from /opt/ruby-enterprise-1.8.7-20090928/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:80:in `const_missing'
from /opt/ruby-enterprise-1.8.7-20090928/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:92:in `const_missing'
from /opt/ruby-enterprise-1.8.7-20090928/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:98:in `send'
from /opt/ruby-enterprise-1.8.7-20090928/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:98:in `const_missing'
from /var/www/enki.marc-seeger.de/app/sweepers/comment_sweeper.rb:2
from /opt/ruby-enterprise-1.8.7-20090928/li
require "dnsruby"
require 'benchmark'
url_list = ["marc-seeger.de", "facebook.com", "google.com", "yahoo.com", "www.hdm-stuttgart.de", "spiegel.de", "heise.de", "golem.de", "reddit.com", "imdb.com"]
nameservers = Hash.new
nameservers["8.8.8.8"] = "Google"
nameservers["8.8.4.4"] = "Google"
nameservers["208.67.222.222"] = "OpenDNS"
nameservers["208.67.220.220"] = "OpenDNS"
require "rubygems"
require "sinatra"
require "pstore"
require "openssl"
require "base64"
configure do
set :data_store, PStore.new("users.pstore")
end
<stream:stream xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams" id="8bb36896-d1d4-4b8e-a534-483d6f18e9ab" from="messi.mi.hdm-stuttgart.de" version="1.0" xml:lang="en">
<stream:features>
<mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl">
<mechanism>PLAIN</mechanism>
</mechanisms>
<starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls" />
<auth xmlns="http://jabber.org/features/iq-auth" />
</stream:features>
</stream:stream>
­
<stream:stream xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams" id="c4ca02e3-8867-4fd9-b879-2b8030075d21" from="messi.mi.hdm-stuttgart.de" version="1.0" xml:lang="en">
<stream:features>
<mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl">
<mechanism>PLAIN</mechanism>
</mechanisms>
<starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls" />
<auth xmlns="http://jabber.org/features/iq-auth" />
</stream:features>
</stream:stream>
­
require "rubygems"
require "eventmachine"
require 'em-http'
class Tester
def crawl(url)
EM.run do
http = EM::HttpRequest.new(url.to_s).get
@rb2k
rb2k / harvard
Created February 24, 2010 15:43
Purposeful conflict resolution by adequate and problem-conscious acting. The Four Action Principles
of the Harvard Concept easily modified and supplemented from the practical experience of the authors:
* Handling people separately from problems and tasks (Separation of relationship level - information level – functional level).
* Place goals, interests and needs and not personal opinions and positions in the middle.
* Before making a decision, come up with alternative solutions which bring advantages to both partners.
* Agree on neutral criteria for the evaluation of the developed solutions and make a decision using these criteria.
@rb2k
rb2k / bla.rb
Created February 25, 2010 15:31
o = OrderedHash.new
o[:findandmodify] = 'to_crawl'
o[:sort] = {:incoming_links => -1}
o[:remove] = true
o[:limit] = amount
jobs = queue.db.command(o)["value"]
puts jobs.inspect
jobs.each do |page|
...
$ gem install mongo_ext
Building native extensions. This could take a while...
ERROR: Error installing mongo_ext:
ERROR: Failed to build gem native extension.
/Users/mseeger/.rvm/rubies/rbx-1.0.0-rc2/bin/rbx extconf.rb
checking for asprintf()... yes
checking for ruby/st.h... yes
checking for ruby/regex.h... yes
checking for ruby/encoding.h... no