I installed the geoip_city gem, and i tested the gem in irb... Now when I am using the gem in the application I get an error
unini开发者_JS百科tialized constant ApplicationController::GeoIPCity
I guessed it is because I did not add the line
require geoip_city
So I tried adding the line to the function I used the code in, but then I got the error
No such file -- geoip_city
Please help.
Have your require rubygems before ?
require 'rubygems'
require 'geoip_city'
精彩评论