diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-01-05 05:01:14 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-01-05 05:01:14 -0300 |
commit | 107e5720fea9873a14d0fe7459b9784a08c3a953 (patch) | |
tree | ecee9d00012ea1c0d1057d42906dd72d752b53f2 /railties/lib/rails/commands | |
parent | 162e2859813b31c50700b453aa61992dfa57139e (diff) | |
download | rails-107e5720fea9873a14d0fe7459b9784a08c3a953.tar.gz rails-107e5720fea9873a14d0fe7459b9784a08c3a953.tar.bz2 rails-107e5720fea9873a14d0fe7459b9784a08c3a953.zip |
Don't use Rails.root since it is not available at this point
Diffstat (limited to 'railties/lib/rails/commands')
-rw-r--r-- | railties/lib/rails/commands/console.rb | 2 | ||||
-rw-r--r-- | railties/lib/rails/commands/dbconsole.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/railties/lib/rails/commands/console.rb b/railties/lib/rails/commands/console.rb index 78580b220c..4497ef61df 100644 --- a/railties/lib/rails/commands/console.rb +++ b/railties/lib/rails/commands/console.rb @@ -37,7 +37,7 @@ module Rails private def available_environments - Dir[Rails.root.join('config', 'environments', '*.rb')].map { |fname| File.basename(fname, '.*') } + Dir['config/environments/*.rb'].map { |fname| File.basename(fname, '.*') } end end diff --git a/railties/lib/rails/commands/dbconsole.rb b/railties/lib/rails/commands/dbconsole.rb index 2d1e2d6a45..5914c9e4ae 100644 --- a/railties/lib/rails/commands/dbconsole.rb +++ b/railties/lib/rails/commands/dbconsole.rb @@ -147,7 +147,7 @@ module Rails end def available_environments - Dir[Rails.root.join('config', 'environments', '*.rb')].map { |fname| File.basename(fname, '.*') } + Dir['config/environments/*.rb'].map { |fname| File.basename(fname, '.*') } end def find_cmd_and_exec(commands, *args) |