custom_require.rb:36:在'require'中:没有要加载的文件-myapp(LoadError) [英] custom_require.rb:36:in `require': no such file to load -- myapp(LoadError)

查看:90
本文介绍了custom_require.rb:36:在'require'中:没有要加载的文件-myapp(LoadError)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我收到上述错误,我所做的就是安装rvm并从Mac上获得的默认ruby更新到ruby 1.9.2.

i get the above error, all i did was install rvm and update to ruby 1.9.2 from the default ruby that you get with mac.

我所有的宝石都显示在宝石列表中,但是我需要在某处指定路径吗?

all my gems appear in the gem list but do i need to specify a path somewhere?

欢呼

格伦诺.

推荐答案

检查是否已安装gems.gem list如果没有,请照常安装gem install whatever,或者要安装特定版本的gem install whatever -v 1.2.3,或者项目中的捆绑程序(即Rails),它只是bundle install

Check that you have the gems installed gem list If not, install as usual gem install whatever or if you want a specific version gem install whatever -v 1.2.3 Or if you have bundler in your project (ie Rails), it's just bundle install

如果您拥有所有的gem,则可能是本地文件,并且您可能来自Ruby版本<. 1.9,您需要修复$LOAD_PATH(这将取决于我在这里解释的太多因素),或指定要File.dirname(__FILE__) + '/myapp'

If you have all the gems, then this is probably a local file, and you're probably coming from Ruby version < 1.9, you need to either fix your $LOAD_PATH (which will depend on too many factors for me to explain here), or specify the full path to the file you want File.dirname(__FILE__) + '/myapp'

否则,您需要提供更多信息,例如以前运行的版本,myapp是什么以及相对于文件的位置.

Otherwise, you need to give more info, like what version you used to be running, what myapp is, and where it is in relation to your file.

这篇关于custom_require.rb:36:在'require'中:没有要加载的文件-myapp(LoadError)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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