Skip to content

Instantly share code, notes, and snippets.

View mutle's full-sized avatar

Mutwin Kraus mutle

View GitHub Profile
Installing ffi (0.6.2) from rubygems repository at http://gemcutter.org An exception occurred running /usr/local/rubinius/1.0.0-rc2/gems/bin/bundle
user /Users/mutle/.bundle/rbx/1.8/gems/ffi-0.6.2/ext/ffi_c/libffi/m4/lt~obsolete.m4 (ArgumentError)
Backtrace:
FFI::Platform::File.expand_path at kernel/platform/file.rb:46
File.expand_path at kernel/common/file.rb:257
Gem::Installer#extract_files {} at lib/rubygems/installer.rb:507
Array#each at kernel/bootstrap/array.rb:156
Gem::Installer#extract_files at lib/rubygems/installer.rb:499
Gem::Installer#install at lib/rubygems/installer.rb:195
--- a/actionpack/test/dispatch/routing_test.rb
+++ b/actionpack/test/dispatch/routing_test.rb
@@ -80,6 +80,8 @@ class TestRoutingMapper < ActionDispatch::IntegrationTest
end
end
+ resources :make_projects_test_fail
+
match 'sprockets.js', :to => ::TestRoutingMapper::SprocketsApp
(in /Users/mutle/Programming/redcursor/redpress/vendor/rails/railties)
mkdir -p pkg
WARNING: bin/rails is missing #! line
Successfully built RubyGem
Name: rails
Version: 3.0.pre
File: rails-3.0.pre.gem
mv rails-3.0.pre.gem pkg/rails-3.0.pre.gem
→ sudo gem install --no-ri --no-rdoc --backtrace railties/pkg/rails-3.0.pre.gem
ERROR: While executing gem ... (TypeError)
can't dup NilClass
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/pathname.rb:205:in `dup'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/pathname.rb:205:in `initialize'
(erb):2:in `new'
(erb):2:in `app_script_text'
/Users/mutle/.gem/ruby/1.8/gems/bundler-0.7.0.pre/lib/bundler/gem_ext.rb:9:in `app_script_text'
/Library/Ruby/Site/1.8/rubygems/installer.rb:351:in `generate_bin_script'
/Library/Ruby/Site/1.8/rubygems/installer.rb:350:in `open'
#!/usr/bin/env ruby
ARGV.each do |file|
data = File.read(file)
if data
if data =~ /\A\#\!ruby19/
exit
else
puts "1.9ifying #{file}"
File.open(file, "w") do |f|
ERROR: mount[/blogage] (/var/chef/cookbooks/nfs_mount/recipes/default.rb line 12) had an error:
Device node:/shares/blogage-production does not exist
/usr/lib/ruby/gems/1.8/gems/chef-0.7.4/lib/chef/provider/mount/mount.rb:43:in `load_current_resource'/usr/lib/ruby/gems/1.8/gems/chef-0.7.4/lib/chef/runner.rb:55:in `build_provider'/usr/lib/ruby/gems/1.8/gems/chef-0.7.4/lib/chef/runner.rb:86:in `converge'/usr/lib/ruby/gems/1.8/gems/chef-0.7.4/lib/chef/runner.rb:85:in `each'/usr/lib/ruby/gems/1.8/gems/chef-0.7.4/lib/chef/runner.rb:85:in `converge'/usr/lib/ruby/gems/1.8/gems/chef-0.7.4/lib/chef/resource_collection.rb:58:in `each'/usr/lib/ruby/gems/1.8/gems/chef-0.7.4/lib/chef/resource_collection.rb:57:in `each'/usr/lib/ruby/gems/1.8/gems/chef-0.7.4/lib/chef/runner.rb:63:in `converge'/usr/lib/ruby/gems/1.8/gems/chef-0.7.4/lib/chef/client.rb:373:in `converge'/usr/lib/ruby/gems/1.8/gems/chef-0.7.4/lib/chef/client.rb:101:in `run_solo'/usr/lib/ruby/gems/1.8/gems/chef-0.7.4/lib/chef/application/solo.rb:122:in `run_appli
class Foo::BarsController < ApplicationController
def create
out = "Params: #{params.inspect}"
out << "\nrack.uploads: #{request.env['rack.uploads'].inspect}"
logger.info out
render :text => out
end
end
>> m = Rails.cache.instance_eval("@data")
=> <MemCache: 3 servers, ns: nil, ro: false>
>> t = Time.now.to_f; m.get('a'); puts "#{Time.now.to_f - t}"
0.000349998474121094
=> nil
>> t = Time.now.to_f; Rails.cache.read('b'); puts "#{Time.now.to_f - t}"
0.0184650421142578
=> nil
>> 0.0184650421142578 / 0.000349998474121094
=> 52.7574931880108
location / {
include /etc/nginx/common/proxy.conf;
if (-f $document_root/system/cache$uri.html) {
rewrite ^(.*)$ /system/cache$1.html;
break;
}
if (-f $document_root/system/cache$uri/index.html) {
rewrite ^(.*)$ /system/cache$1/index.html;
set :mongrel_base_port, 5000
set :mongrel_restart_delay, 30
set :mongrel_count, 2
namespace :mongrel do
task :restart, :roles => [:app], :except => {:mongrel => false} do
(mongrel_base_port..(mongrel_base_port+mongrel_count)).to_a.each do |port|
sudo "/usr/bin/monit restart mongrel_#{monit_group}_#{port}"
sleep mongrel_restart_delay
end