简体   繁体   中英

rake aborted! cannot load such file — indirizzo

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

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")

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM