Skip to content

Instantly share code, notes, and snippets.

View proton's full-sized avatar
🤍💙🤍

Peter Savichev proton

🤍💙🤍
View GitHub Profile
proton@earth ~/projects/mongoid_auto_increment (master*) % rake spec (20:05)
/home/proton/.rvm/rubies/ruby-1.9.3-p0/bin/ruby -S rspec spec/mongoid_auto_increment_spec.rb
FFFFFFFFFFFF
Failures:
1) mongoid_auto_increment single auto-increment field should have id 1
Failure/Error: @book1.sequence.should eql 1
expected 1
proton@earth ~/projects/temp/mongoid_rateable (master*) % rake spec (10:36)
(in /home/proton/projects/temp/mongoid_rateable)
/home/proton/.rvm/rubies/ruby-1.9.2-p290/bin/ruby -S bundle exec rspec spec/rateable_spec.rb
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
Failures:
1) Post should have Mongoid::Rateable module
Failure/Error: @bob = User.create :name => "Bob"
NoMethodError:
* Searching for racc ...
* Contents of dev-ruby/racc-1.4.6-r1:
/usr
/usr/bin
/usr/bin/racc
/usr/bin/racc2y
/usr/bin/y2racc
/usr/lib
/usr/lib/ruby
/usr/lib/ruby/gems
pid: /var/web/my/shared/pids/thin.pid
log: log/thin.log
timeout: 30
max_conns: 1024
socket: /var/web/my/shared/thin.sock
no-epoll: true
max_persistent_conns: 512
chdir: /var/web/my/current
environment: production
servers: 3
user nginx nginx;
worker_processes 2;
timer_resolution 100ms;
worker_rlimit_nofile 8192;
worker_priority -15;
error_log /var/log/nginx/error_log info;
*thin *nginx *rails
Подскажите, nginx по непонятным причинам любит кешировать рельсовый сайт (на thin).
Грешу именно на nginx, ибо при обращении напрямую к thin проблемы не возникает.
При этом нигде кеширование не врубал
Конфиг nginx:
user nginx nginx;
worker_processes 2;
timer_resolution 100ms;
@proton
proton / gist:2192730
Created March 25, 2012 10:28
backbone challenge 7-7
var AppRouter = Backbone.Router.extend({
routes: { "appointments/:id": "show", "": "index" },
initialize: function(options){
this.appointmentList = new AppointmentList();
},
start: function(){
Backbone.history.start({pushState: true});
},
proton@earth onila % rails g puffer:controller PufferUser (0:28)
DEPRECATION WARNING: ActiveSupport::Memoizable is deprecated and will be removed in future releases,simply use Ruby memoization pattern instead. (called from <top (required)> at /home/proton/projects/onila/config/application.rb:11)
create app/controllers/admin/puffer_users_controller.rb
/home/proton/.rvm/gems/ruby-1.9.3-p0@onila/bundler/gems/puffer-0043e83cc86c/lib/puffer/backends/models/user/active_record.rb:3:in `<module:User>': uninitialized constant Puffer::User::ActiveRecord (NameError)
from /home/proton/.rvm/gems/ruby-1.9.3-p0@onila/bundler/gems/puffer-0043e83cc86c/lib/puffer/backends/models/user/active_record.rb:2:in `<module:Puffer>'
from /home/proton/.rvm/gems/ruby-1.9.3-p0@onila/bundler/gems/puffer-0043e83cc86c/lib/puffer/backends/models/user/active_r
Started PUT "/orders/4f169b49c77c9434aa000022" for 127.0.0.1 at 2012-01-19 17:20:33 +0400
Processing by OrdersController#update as JSON
Parameters: {"order"=>{"email"=>"aaa@yandex.ru"}, "id"=>"4f169b49c77c9434aa000022"}
WARNING: Can't verify CSRF token authenticity
MONGODB webra_development['system.namespaces'].find({})
MONGODB webra_development['users'].find({:_id=>BSON::ObjectId('4f157ed4c77c941a76000002')}).limit(-1).sort([[:_id, :asc]])
MONGODB webra_development['users'].update({"_id"=>BSON::ObjectId('4f157ed4c77c941a76000002')}, {"$set"=>{"remember_created_at"=>nil}})
MONGODB webra_development['system.namespaces'].find({})
MONGODB webra_development['product_templates'].find({:title=>"ROOT_PRODUCT_TEMPLATE"}).limit(-1).sort([[:_id, :asc]])
MONGODB webra_development['system.namespaces'].find({})
proton@earth webra % rvm info (21:42)
ruby-1.9.2-p290@webra:
system:
uname: "Linux earth 2.6.39-gentoo-r3 #5 SMP PREEMPT Thu Sep 22 23:38:55 MSD 2011 i686 Intel(R) Core(TM) i5 CPU 760 @ 2.80GHz GenuineIntel GNU/Linux"
bash: "/bin/bash => GNU bash, version 4.1.9(2)-release (i686-pc-linux-gnu)"
zsh: "/bin/zsh => zsh 4.3.11 (i686-pc-linux-gnu)"
rvm: