Skip to content

Commit

Permalink
Don't use Rails.root since it is not available at this point
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelfranca committed Jan 5, 2013
1 parent 162e285 commit 107e572
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion railties/lib/rails/commands/console.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def parse_arguments(arguments)
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

Expand Down
2 changes: 1 addition & 1 deletion railties/lib/rails/commands/dbconsole.rb
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def parse_arguments(arguments)
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)
Expand Down

1 comment on commit 107e572

@rafaelfranca
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rubys I hope this fixes your issue. Thank you for reporting it ❤️

Please sign in to comment.