add require to suppress warning; remove variable
Merge pull request #10080 from vipulnsward/railties_warning_fix_v2

add require to suppress warning; remove variable