资产/ LogEntries / Heroku:Errno :: ENOENT:无此类文件或目录@ rb_sysopen log / production.log(heroku部署)

时间:2018-10-30 08:46:14

标签: ruby-on-rails asset-pipeline logentries

当我尝试将项目推送到heroku时,运行rake assets:precompile时出现以下错误。我已经安装了LogEntries gem(le),并且已经运行bundle install。我已将问题缩小到environment.rb文件中的以下行:

Rails.logger = Le.new('5fea09e1-d1f8-4dfd-aa64-9f4ebaf48b65', :debug => true, :local => true)

我通过Heroku从LogEntries控制面板的以下对话框中获取了密钥:

LogEntries "Email" Log Settings

这是我尝试运行git push heroku master时从Heroku收到的错误:

remote:        Running: rake assets:precompile
remote:        rake aborted!
remote:        Errno::ENOENT: No such file or directory @ rb_sysopen - /tmp/build_c162f593332a318341970a1544a966e1/log/production.log
remote:        /tmp/build_c162f593332a318341970a1544a966e1/vendor/bundle/ruby/2.4.0/gems/le-2.7.6/lib/le/host/http.rb:37:in `new'
remote:        /tmp/build_c162f593332a318341970a1544a966e1/vendor/bundle/ruby/2.4.0/gems/le-2.7.6/lib/le/host/http.rb:37:in `initialize'
remote:        /tmp/build_c162f593332a318341970a1544a966e1/vendor/bundle/ruby/2.4.0/gems/le-2.7.6/lib/le/host.rb:6:in `new'
remote:        /tmp/build_c162f593332a318341970a1544a966e1/vendor/bundle/ruby/2.4.0/gems/le-2.7.6/lib/le/host.rb:6:in `new'
remote:        /tmp/build_c162f593332a318341970a1544a966e1/vendor/bundle/ruby/2.4.0/gems/le-2.7.6/lib/le.rb:30:in `new'
remote:        /tmp/build_c162f593332a318341970a1544a966e1/config/environment.rb:15:in `<top (required)>'
remote:        /tmp/build_c162f593332a318341970a1544a966e1/vendor/bundle/ruby/2.4.0/gems/railties-5.0.2/lib/rails/application.rb:328:in `require'
remote:        /tmp/build_c162f593332a318341970a1544a966e1/vendor/bundle/ruby/2.4.0/gems/railties-5.0.2/lib/rails/application.rb:328:in `require_environment!'
remote:        /tmp/build_c162f593332a318341970a1544a966e1/vendor/bundle/ruby/2.4.0/gems/railties-5.0.2/lib/rails/application.rb:448:in `block in run_tasks_blocks'
remote:        /tmp/build_c162f593332a318341970a1544a966e1/vendor/bundle/ruby/2.4.0/gems/sprockets-rails-3.2.0/lib/sprockets/rails/task.rb:62:in `block (2 levels) in define'
remote:        /tmp/build_c162f593332a318341970a1544a966e1/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/exe/rake:27:in `<top (required)>'
remote:        Errno::ENOENT: No such file or directory @ rb_sysopen - /tmp/build_c162f593332a318341970a1544a966e1/log/production.log
remote:        /tmp/build_c162f593332a318341970a1544a966e1/vendor/bundle/ruby/2.4.0/gems/le-2.7.6/lib/le/host/http.rb:37:in `new'
remote:        /tmp/build_c162f593332a318341970a1544a966e1/vendor/bundle/ruby/2.4.0/gems/le-2.7.6/lib/le/host/http.rb:37:in `initialize'
remote:        /tmp/build_c162f593332a318341970a1544a966e1/vendor/bundle/ruby/2.4.0/gems/le-2.7.6/lib/le/host.rb:6:in `new'
remote:        /tmp/build_c162f593332a318341970a1544a966e1/vendor/bundle/ruby/2.4.0/gems/le-2.7.6/lib/le/host.rb:6:in `new'
remote:        /tmp/build_c162f593332a318341970a1544a966e1/vendor/bundle/ruby/2.4.0/gems/le-2.7.6/lib/le.rb:30:in `new'
remote:        /tmp/build_c162f593332a318341970a1544a966e1/config/environment.rb:15:in `<top (required)>'
remote:        /tmp/build_c162f593332a318341970a1544a966e1/vendor/bundle/ruby/2.4.0/gems/railties-5.0.2/lib/rails/application.rb:328:in `require'
remote:        /tmp/build_c162f593332a318341970a1544a966e1/vendor/bundle/ruby/2.4.0/gems/railties-5.0.2/lib/rails/application.rb:328:in `require_environment!'
remote:        /tmp/build_c162f593332a318341970a1544a966e1/vendor/bundle/ruby/2.4.0/gems/railties-5.0.2/lib/rails/application.rb:448:in `block in run_tasks_blocks'
remote:        /tmp/build_c162f593332a318341970a1544a966e1/vendor/bundle/ruby/2.4.0/gems/sprockets-rails-3.2.0/lib/sprockets/rails/task.rb:62:in `block (2 levels) in define'
remote:        /tmp/build_c162f593332a318341970a1544a966e1/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/exe/rake:27:in `<top (required)>'
remote:        Tasks: TOP => environment
remote:        (See full trace by running task with --trace)
remote: 
remote:  !
remote:  !     Precompiling assets failed.
remote:  !
remote:  !     Push rejected, failed to compile Ruby app.

0 个答案:

没有答案