OSDN Git Service
(root)
/
tdcgexplorer
/
nimono-crawlers.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f49c30f
)
environment from RAILS_ENV
author
nomeu
<nomeu@nomeu.org>
Sat, 12 Jun 2010 19:59:26 +0000
(
04:59
+0900)
committer
nomeu
<nomeu@nomeu.org>
Sat, 12 Jun 2010 19:59:26 +0000
(
04:59
+0900)
lib/connection.rb
patch
|
blob
|
history
diff --git
a/lib/connection.rb
b/lib/connection.rb
index
024b36b
..
80c4525
100644
(file)
--- a/
lib/connection.rb
+++ b/
lib/connection.rb
@@
-1,5
+1,6
@@
require 'yaml'
-options = YAML.load(IO.read("config/database.yml"))["development"]
+environment = ENV["RAILS_ENV"] || "development"
+options = YAML.load(IO.read("config/database.yml"))[environment]
require 'rubygems'
gem 'activerecord'
require 'active_record'