Skip to content

Instantly share code, notes, and snippets.

@Kanst
Kanst / 1
Created October 22, 2011 16:38
1
bash < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)
Successfully checked out branch ''
Current branch master is up to date.
Successfully pulled (rebased) from origin
RVM: Shell scripts enabling management of multiple ruby environments.
RTFM: https://rvm.beginrescueend.com/
HELP: http://webchat.freenode.net/?channels=rvm (#rvm on irc.freenode.net)
Upgrading the RVM installation in /home/ubuntu/.rvm/
source 'http://rubygems.org'
gem 'rails', '3.1.3'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'sqlite3'
gem 'therubyracer'
Using rake (0.9.2.2)
Using multi_json (1.0.4)
Using activesupport (3.1.3)
Using builder (3.0.0)
Using i18n (0.6.0)
Using activemodel (3.1.3)
Using erubis (2.7.0)
Using rack (1.3.5)
Using rack-cache (1.1)
Using rack-mount (0.8.3)
~/code/rails/blog ➞ rake db:migrate
rake aborted!
undefined method `mass_assignment_sanitizer=' for ActiveRecord::Base:Class
Tasks: TOP => db:migrate => db:load_config
(See full trace by running task with --trace)
~/code/rails/blog ➞ rails generate scaffold Post title:string body:text
invoke active_record
/home/jeka/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.3/lib/active_record/base.rb:1088:in `method_missing': undefined method `mass_assignment_sanitizer=' for ActiveRecord::Base:Class (NoMethodError)
from /home/jeka/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.3/lib/active_record/railtie.rb:59:in `block (3 levels) in <class:Railtie>'
from /home/jeka/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.3/lib/active_record/railtie.rb:58:in `each'
from /home/jeka/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.3/lib/active_record/railtie.rb:58:in `block (2 levels) in <class:Railtie>'
from /home/jeka/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.3/lib/active_support/lazy_load_hooks.rb:36:in `instance_eval'
from /home/jeka/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.3/lib/active_support/lazy_load_hooks.rb:36:in `execute_hook'
from /home/jeka/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.3/lib/acti
2011-12-24T14:46:58+00:00 heroku[api]: Add-on add logging:basic by jeka@bmstu.me
2011-12-24T14:46:58+00:00 heroku[api]: Release v2 created by jeka@bmstu.me
2011-12-24T14:47:51+00:00 heroku[slugc]: Slug compilation started
2011-12-24T14:48:58+00:00 heroku[api]: Add-on add shared-database:5mb by jeka@bmstu.me
2011-12-24T14:48:58+00:00 heroku[api]: Release v3 created by jeka@bmstu.me
2011-12-24T14:48:58+00:00 heroku[api]: Config add RAILS_ENV, LANG, PATH, RACK_ENV, GEM_PATH by jeka@bmstu.me
2011-12-24T14:48:58+00:00 heroku[api]: Release v4 created by jeka@bmstu.me
2011-12-24T14:48:59+00:00 heroku[api]: Deploy 2dbd339 by jeka@bmstu.me
2011-12-24T14:48:59+00:00 heroku[api]: Release v5 created by jeka@bmstu.me
2011-12-24T14:49:00+00:00 heroku[web.1]: State changed from created to starting
@Kanst
Kanst / chef_solo_bootstrap.sh
Created September 24, 2012 16:48 — forked from ryanb/chef_solo_bootstrap.sh
Bootstrap Chef Solo
#!/usr/bin/env bash
apt-get -y update
apt-get -y install build-essential zlib1g-dev libssl-dev libreadline5-dev libyaml-dev
cd /tmp
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p125.tar.gz
tar -xvzf ruby-1.9.3-p125.tar.gz
cd ruby-1.9.3-p125/
./configure --prefix=/usr/local
make
make install
# -*- coding: utf-8 -*-EdIzmer
import math
a = 4
b = 4
e = 0.000000000000001
s = 0.0
m = a
ss = 0
#!/usr/bin/python
# -*- coding: utf-8 -*-
import urllib, urllib2
import random
import sys, time, os,re
from mechanize import Browser
# определим все, что нам может пригодится дальше
@Kanst
Kanst / gist:4171305
Created November 29, 2012 19:35
modelir_dz2
#!/usr/bin/python
# -*- coding: utf-8 -*-
def sum(len,a,b):
if len==2:
aplusb=[[0,1],[1,1]]
elif len == 3:
aplusb=[[0,1,2],[1,1,1],[2,1,2]]
elif len == 5: