t56k
t56k

Reputation: 7011

Requiring gems in Rails

I'm having an issue with Geocoder in Rails: specifically that if I use a Geocoder method, i.e., geocoded_by or similar, I get a NoMethodError.

I've included the gem in my gemfile (i.e., a line reading 'gem "geocoder"'). I've installed the bundles, too.

Any advice would be appreciated. I'm rather new to Ruby and Rails.

Cheers.

Upvotes: 0

Views: 111

Answers (3)

Kenny Bania
Kenny Bania

Reputation: 637

Try adding require 'geocoder' to the top of the ruby file it is used in.

Upvotes: 0

Shamith c
Shamith c

Reputation: 3739

Add to following line to Gemfile and Run bundle install

gem "geocoder"

You can refer Railscast-#273, You will get a clear idea.

Upvotes: 1

Smar
Smar

Reputation: 8631

Have you run bundle install? It installs all gems in Gemfile.

Upvotes: 1

Related Questions