耙子中止!无法加载此类文件 -- indirizzo [英] rake aborted! cannot load such file -- indirizzo

查看:53
本文介绍了耙子中止!无法加载此类文件 -- indirizzo的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试在安装包后在我的 rails 应用程序中运行 rake db:reset.显示如下信息

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)

捆绑展示 Indirizzo 展示

/usr/local/lib/ruby/gems/2.0.0/gems/Indirizzo-0.1.7

推荐答案

在我看来,问题出在正确的 require 上.根据自述文件 https://github.com/daveworth/Indirizzo#usage 应该是>

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

它认为它应该与内部lib中的相同https://github.com/daveworth/Indirizzo/blob/master/lib/indirizzo.rb

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'

在这之后我设法完成了这个例子 Indirizzo::Address.new("some address")

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

这篇关于耙子中止!无法加载此类文件 -- indirizzo的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆