ruby-on-rails – Errno :: ENOENT:没有这样的文件或目录@ rb_sysopen – / tmp /

前端之家收集整理的这篇文章主要介绍了ruby-on-rails – Errno :: ENOENT:没有这样的文件或目录@ rb_sysopen – / tmp /前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我正在尝试将我的应用程序推送到Heroku,但是我得到了这个相当随意的错误
Errno::ENOENT: No such file or directory @ rb_sysopen -\
       /tmp/build_.../config/aws.yml
       /tmp/build_.../vendor/bundle/ruby/2.1.0/gems/safe_yaml-1.0.3/lib/safe_yaml.rb:39:in `initialize'
       /tmp/build_.../vendor/bundle/ruby/2.1.0/gems/safe_yaml-1.0.3/lib/safe_yaml.rb:39:in `open'
       /tmp/build_.../vendor/bundle/ruby/2.1.0/gems/safe_yaml-1.0.3/lib/safe_yaml.rb:39:in `unsafe_load_file'
       /tmp/build_.../vendor/bundle/ruby/2.1.0/gems/safe_yaml-1.0.3/lib/safe_yaml.rb:24:in `load_file_with_options'
       /tmp/build_.../config/initializers/aws.rb:1:in `<top (required)>'
       /tmp/build_.../vendor/bundle/ruby/2.1.0/gems/activesupport-4.0.5/lib/active_support/dependencies.rb:223:in `load'
       /tmp/build_.../vendor/bundle/ruby/2.1.0/gems/activesupport-4.0.5/lib/active_support/dependencies.rb:223:in `block in load'
       /tmp/build_.../vendor/bundle/ruby/2.1.0/gems/activesupport-4.0.5/lib/active_support/dependencies.rb:214:in `load_dependency'
       /tmp/build_.../vendor/bundle/ruby/2.1.0/gems/activesupport-4.0.5/lib/active_support/dependencies.rb:223:in `load'
       /tmp/build_.../vendor/

我在aws.yml文件中有正确的密钥,所以我不确定为什么我会收到此错误,也可以在本地正常工作.我已经尝试删除/ tmp文件夹并让Heroku重新生成它也无法正常工作.我该如何解决

解决方法

你确定你的config / aws.yml在正确的位置并且形成正确吗?请检查代码库中对它的所有引用.

执行rake任务时,整个rails环境都会被加载.如果初始化程序或rake任务调用的任何文件不存在或未正确形成,则会出现错误.

猜你在找的Ruby相关文章