Skip to content

Instantly share code, notes, and snippets.

x [deleted] (none) -> origin/aa-av-test-fixes
x [deleted] (none) -> origin/aa-build-fix-1.9.3
x [deleted] (none) -> origin/aa-improvments
x [deleted] (none) -> origin/aa-removed-missleading-message
x [deleted] (none) -> origin/aa-warnings-removed-ruby-trunk
x [deleted] (none) -> origin/added-av-in-rails-info
x [deleted] (none) -> origin/added_activemodel_in_railsgemspec
x [deleted] (none) -> origin/build-fix-rake-test
x [deleted] (none) -> origin/build-fix-routing-inspector
x [deleted] (none) -> origin/build-fixed-ruby193
@arunagw
arunagw / rails_graf
Created July 14, 2013 22:30
rails graf
checkouts/rails git:(master)> graf
▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ David Heinemeier Hansson (3425 commits)
▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ Jeremy Kemper (3385 commits)
▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ Aaron Patterson (2553 commits)
▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ José Valim (2520 commits)
▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ Xavier Noria (1735 commits)
▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ Rafael Mendonça França (1309 commits)
▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ Joshua Peek (1099 commits)
▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ Santiago Pastorino (1088 commits)
▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ Carlos Antonio da Silva (1041 commits)
#!/usr/bin/env ruby
require "rubygems"
require "rake"
require "rake/tasklib"
require "colored"
require "fileutils"
#require 'mysql'
#require 'jdbc-mysql'
@arunagw
arunagw / gist:4411159
Created December 30, 2012 05:34
gemfile for ar-jdbc
gem 'activerecord-jdbc-adapter', :path => "/Users/arunagw/checkouts/activerecord-jdbc-adapter"
gem 'activerecord-jdbcsqlite3-adapter', :path => "/Users/arunagw/checkouts/activerecord-jdbc-adapter/activerecord-jdbcsqlite3-adapter"
@arunagw
arunagw / encoding_issue_jruby_and_ruby
Created May 29, 2012 11:01
encoding_issue_jruby_and_ruby
jruby-1.6.7.2 :009 > s = "Foo"
=> "Foo"
jruby-1.6.7.2 :010 > s.encode(s.encoding, :xml => :attr)
=> "Foo"
jruby-1.6.7.2 :011 >
1.9.3p194 :021 > s = "Foo"
=> "Foo"
1.9.3p194 :022 > s.encode(s.encoding, :xml => :attr)
@arunagw
arunagw / cruby_openssl_error
Created April 28, 2012 15:30
openssl with cruby
checkouts/rails git:(master)> rvm ruby-head ruby-1.9.3-p125
checkouts/rails git:(master)> ruby -v ruby-head
ruby 2.0.0dev (2012-04-28 trunk 35487) [x86_64-darwin11.3.0]
checkouts/rails git:(master)> gem -v ruby-head
/Users/arunagw/.rvm/rubies/ruby-head/bin/gem:4: warning: Insecure world writable dir /usr/local in PATH, mode 040777
1.8.24
checkouts/rails git:(master)> bundle update ruby-head
/Users/arunagw/.rvm/gems/ruby-head/
build_user@Ubuntu-1004-lucid-64-minimal:~/clones/rails$ bundle install --path bundle
Fetching git://github.com/rails/journey.git
Fetching gem metadata from https://rubygems.org/.JRuby limited openssl loaded. http://jruby.org/openssl
gem install jruby-openssl for full support.
Unfortunately, a fatal error has occurred. Please report this error to the Bundler issue tracker at https://github.com/carlhuda/bundler/issues so that we can fix it. Please include the full output of the command, your Gemfile and Gemfile.lock. Thanks!
LoadError: OpenSSL::SSL requires the jruby-openssl gem
(root) at /home/build_user/.rvm/rubies/jruby-1.6.7/lib/ruby/site_ruby/shared/jruby/openssl/autoloads/ssl.rb:8
use_ssl= at /home/build_user/.rvm/rubies/jruby-1.6.7/lib/ruby/site_ruby/shared/jruby/openssl/autoloads/ssl.rb:124
ssl at /home/build_user/.rvm/gems/jruby-1.6.7@global/gems/bundler-1.1.3/lib/bundler/vendor/net/http/persistent.rb:448
conne
@arunagw
arunagw / fix_build
Created February 22, 2012 17:46
fix_build
diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb
index bb0441c..f66d28b 100644
--- a/actionpack/lib/action_dispatch/routing/mapper.rb
+++ b/actionpack/lib/action_dispatch/routing/mapper.rb
@@ -1014,10 +1014,10 @@ module ActionDispatch
member do
get :edit if parent_resource.actions.include?(:edit)
get :show if parent_resource.actions.include?(:show)
- delete :destroy if parent_resource.actions.include?(:destroy)
if parent_resource.actions.include?(:update)
@arunagw
arunagw / error___
Created September 13, 2011 19:11
JRuby with JSON 1.6.0
ubuntu@srv-zcq3y:~/clones/rails/activerecord$ gem install json
Fetching: json-1.6.0-java.gem (100%)
Successfully installed json-1.6.0-java
1 gem installed
ubuntu@srv-zcq3y:~/clones/rails/activerecord$ irb
jruby-1.6.4 :001 > require 'rubygems'
=> true
jruby-1.6.4 :002 > require 'json'
NameError: uninitialized constant JSON::Ext::Parser
from org/jruby/RubyModule.java:2569:in `const_missing'
@arunagw
arunagw / test_issue_2383
Created August 4, 2011 04:43
jruby-1.6.3
test_apps/issue_2383 git:(master)* bundle install --without development test assets jruby-1.6.3
Using rake (0.9.2)
Using multi_json (1.0.3)
Using activesupport (3.1.0.rc5)
Using bcrypt-ruby (2.1.4)
Using builder (3.0.0)
Using i18n (0.6.0)
Using activemodel (3.1.0.rc5)
Using erubis (2.7.0)
Using rack (1.3.2)