致谢!
我正在尝试部署我的应用程序,但是显示以下错误,但是它在我的开发环境中有效。有人可以帮我吗。
谢谢
2018-10-19T21:44:59.537471+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 56071 -e production`
2018-10-19T21:45:05.502421+00:00 heroku[web.1]: State changed from starting to crashed
2018-10-19T21:45:05.483819+00:00 heroku[web.1]: Process exited with status 1
2018-10-19T21:45:05.390570+00:00 app[web.1]: /app/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:292:in `require': No such file to load -- classes/global/String.rb (LoadError)
2018-10-19T21:45:05.390589+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:292:in `block in require'
2018-10-19T21:45:05.390591+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:258:in `load_dependency'
2018-10-19T21:45:05.390592+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:292:in `require'
2018-10-19T21:45:05.390594+00:00 app[web.1]: from /app/lib/classes/nino_nino.rb:1:in `<top (required)>'
2018-10-19T21:45:05.390596+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:292:in `require'
2018-10-19T21:45:05.390597+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:292:in `block in require'
2018-10-19T21:45:05.390635+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:258:in `load_dependency'
2018-10-19T21:45:05.390637+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:292:in `require'
2018-10-19T21:45:05.390639+00:00 app[web.1]: from /app/app/jobs/crea_planilla_ninonino_job.rb:1:in `<top (required)>'
/app/lib/classes/nino_nino.rb开始是这样的:
require 'classes/global/String'
require 'classes/zip'
require 'tempfile'
module NinoNino
class NinoNinoController < ApplicationController
def crea_certificados(par)
session = {}
session["group_id"] = par["group_id"]
@anio = par["anio"].to_i
@mes = par["mes"].to_i
@municipio = par["municipio"]
@dias_mes = (JSON.parse par["dias_mes"]).collect {|e| e["value"]}
@genera_nino_nino = (par["genera_nino_nino"] == "true")
@genera_resumen = (par["genera_resumen"] == "true")
job_id = par["job_id"]
@format = par["format"]
(...)
classes / global / String:
class String
def last_n_chars(len)
self[-len..-1] || self
end
end