Created
June 28, 2011 13:42
-
-
Save 8th-Light-Blog/1051156 to your computer and use it in GitHub Desktop.
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
Blog Title: Sharing a Database Among Multiple Rails Applications | |
Author: Jim Suchy | |
Date: February 20th, 2007 |
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
/projects/my_lib | |
--> lib | |
--> spec |
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
$: << File.dirname(__FILE__) + '/your_lib_path' |
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 'rubygems' | |
require 'active_record' | |
ActiveRecord::Base.establish_connection( | |
:adapter => "postgresql", | |
:host => "localhost", | |
:username => "rails", | |
:password => "", | |
:database => "<db name>_test" | |
) |
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 File.expand_path(File.dirname(__FILE__) + '/my_lib/lib/file_a' | |
require File.expand_path(File.dirname(__FILE__) + '/my_lib/lib/file_b' | |
require File.expand_path(File.dirname(__FILE__) + '/my_lib/lib/file_c' | |
require File.expand_path(File.dirname(__FILE__) + '/my_lib/lib/file_d' | |
require File.expand_path(File.dirname(__FILE__) + '/my_lib/lib/file_e' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment