0

I tried running rake db:reset in my rails application after bundle install. The following message is displayed

rake aborted!
cannot load such file -- indirizzo
/home/xyz/Desktop/Signup4/app/models/concerns/address_validation.rb:2:in `<module:AddressValidation>'
/home/xyz/Desktop/Signup4/app/models/concerns/address_validation.rb:1:in `<top (required)>'
/home/xyz/Desktop/Signup4/app/models/location.rb:2:in `<class:Location>'
/home/xyz/Desktop/Signup4/app/models/location.rb:1:in `<top (required)>'
/home/xyz/Desktop/Signup4/db/seeds.rb:11:in `<top (required)>'
Tasks: TOP => db:setup => db:seed
(See full trace by running task with --trace)

bundle show Indirizzo displays

/usr/local/lib/ruby/gems/2.0.0/gems/Indirizzo-0.1.7
curious_coder
  • 2,392
  • 4
  • 25
  • 44

1 Answers1

2

It seems to me the problem is in correct require. According to readme https://github.com/daveworth/Indirizzo#usage it should be

require 'Indirizzo'

but the fact that it does not work (the same error).

It think it should be the same as in the internal lib https://github.com/daveworth/Indirizzo/blob/master/lib/indirizzo.rb

require 'indirizzo/address'

after this I manage to complete this example Indirizzo::Address.new("some address")

gotva
  • 5,919
  • 2
  • 25
  • 35
  • Hmm, I got the same error. I looked at the source and notice that gem itself `require 'indirizzo/address'` https://github.com/daveworth/Indirizzo/blob/master/lib/indirizzo.rb And after this I manage to complete the example from usage `Indirizzo::Address.new("some address")` – gotva Sep 10 '13 at 11:32
  • This worked for me (the latter solution)! Thanks for your help. – Ben Kreeger Oct 08 '14 at 12:05