- null: false, use default value
- use FKs
- Use dependant destroy/delete_all/delete_error etc
- retry ActiveRecord::RecordNotUnique, rescue_from
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require_relative 'student.rb' | |
require 'pry' | |
require 'httparty' | |
require 'logger' | |
require 'csv' | |
URL = 'URL_HERE' | |
rollno_prefix, = "11CIIXX" | |
rollno_range = 600..656 | |
subjects = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gem 'mechanize' | |
gem 'pry' | |
gem 'awesome_print' | |
gem 'logger' | |
gem 'activesupport' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ rvm install jruby | |
$ rvm use jruby | |
$ bundle install | |
$ cd actionpack | |
$ ruby --client -Itest:lib test/controller/live_stream_test.rb -n test_async_stream | |
Run options: -n test_async_stream --seed 16798 | |
# Running: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
location /blog { | |
index index.html index.php; | |
#try_files $uri $uri/ /blog/index.php?q=$uri; | |
try_files $uri $uri/ @memcached; | |
location ~ \.(css|js|jpg|jpeg|png|gif)$ { | |
expires 7d; | |
add_header Cache-Control "public, must-revalidate, proxy-revalidate"; | |
add_header "Vary" "Accept-Encoding"; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ jruby --version | |
jruby 1.7.4 (1.9.3p392) 2013-05-16 2390d3b on Java HotSpot(TM) Server VM 1.7.0_40-b43 +indy [linux-i386] | |
$ bundle | |
Java HotSpot(TM) Server VM warning: You have loaded library /home/gaurish/.rvm/rubies/jruby-1.7.4/lib/native/x86_64-Linux/libjffi-1.2.so which might have disabled stack guard. The VM will try to fix the stack guard now. | |
It's highly recommended that you fix the library with 'execstack -c <libfile>', or link it with '-z noexecstack'. | |
Fetching gem metadata from https://rubygems.org/.. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TypeError: superclass mismatch for class PostgreSQLAdapter | |
ConnectionAdapters at /home/travis/build/rails/rails/activerecord/test/cases/adapters/postgresql/statement_pool_test.rb:4 | |
(root) at /home/travis/build/rails/rails/activerecord/test/cases/adapters/postgresql/statement_pool_test.rb:3 | |
require at org/jruby/RubyKernel.java:1054 | |
require at /home/travis/build/rails/rails/activesupport/lib/active_support/dependencies.rb:228 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gem list | |
*** LOCAL GEMS *** | |
actionmailer (4.0.0) | |
actionpack (4.0.0) | |
activemodel (4.0.0) | |
activerecord (4.0.0) | |
activerecord-deprecated_finders (1.0.3) | |
activesupport (4.0.0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#1st form | |
class Foo | |
class << self | |
attr_accessor :bar | |
end | |
self.bar = true | |
end | |
#2nd form | |
class Foo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1) Error: | |
InflectorTest#test_parameterize: | |
Encoding::ConverterNotFoundError: code converter not found (UTF-8 to UTF8-MAC) | |
org/jruby/RubyConverter.java:114:in `initialize' | |
/home/gaurish/code/repo/rails/activesupport/lib/active_support/multibyte/unicode.rb:231:in `tidy_bytes' | |
/home/gaurish/code/repo/rails/activesupport/lib/active_support/inflector/transliterate.rb:62:in `transliterate' | |
/home/gaurish/code/repo/rails/activesupport/lib/active_support/inflector/transliterate.rb:83:in `parameterize' | |
test/inflector_test.rb:235:in `test_parameterize' | |
org/jruby/RubyHash.java:1332:in `each' | |
test/inflector_test.rb:234:in `test_parameterize' |