在生产中创建问题但不在localhost上创建问题

时间:2015-08-14 18:21:02

标签: ruby-on-rails ruby-on-rails-4 heroku

在我的rails应用程序中,我收到生产错误(heroku)但在我的localhost上没有收到错误。我的所有迁移都已完成,我可以通过控制台添加它,但我无法在控制器中使用它。

所以发生错误的区域在这里:

respond_to do |format|
    if @registration.save
        EventMailer.new_registration_notification(@registration, @current_event).deliver
        Recipient.create :first_name => @registration.first_name, :last_name => @registration.last_name, :email => @registration.email, :netID => @registration.netID, :event_id => @registration.event_id, :mailing_id => nil
        format.html { redirect_to event_path(@current_event), notice: 'Registration was successful' }

同样,我在开发本地环境中没有出错,但我正在制作中。他们都使用Postgres。所以我的注册正在保存,但从未创建收件人,我收到错误。我通过运行

检查了heroku日志
herkou logs

但没有显示错误。在前端,您会看到一条错误,上面写着"出了问题。如果您是应用程序所有者,请检查您的日志"。

0 个答案:

没有答案
相关问题