Skip to content

Instantly share code, notes, and snippets.

@azhao1981
Created March 25, 2012 09:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save azhao1981/2192638 to your computer and use it in GitHub Desktop.
Save azhao1981/2192638 to your computer and use it in GitHub Desktop.
ruby and rails recources
The Bastards Book of Ruby http://ruby.bastardsbook.com/
Clever Algorithms http://www.cleveralgorithms.com
DS and Algos with OO Design Patterns in Ruby http://www.brpreiss.com/books/opus8/
MacRuby: The Definitive Guide http://macruby.labs.oreilly.com/
Humble Little Ruby Book http://humblelittlerubybook.com/
Programming Ruby http://ruby-doc.org/docs/ProgrammingRuby/
Read Ruby 1.9 http://ruby.runpaint.org/
Ruby Best Practices http://rubybestpractices.com/
Ruby on Rails Tutorial Book http://railstutorial.org/book
http://pullmonkey.com/2008/4/21/ruby-on-rails-multiple-database-connections/ 多数据库
dev_basics: &dev_basics
username: root
password:
<% %w(development test production).each do |env| %>
<%= env %>:
<<: *dev_basics
adapter: mysql
database: example_<%= env %>
oracle_<%= env %>:
<<: *dev_basics
adapter: oracle
database: example_oracle_<%= env %>
<% end %>
class User < ActiveRecord::Base
establish_connection "oracle_#{RAILS_ENV}"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment