作为一名编程初学者,我第一次在Heroku上部署了Rails应用程序。我收到500错误,但找不到源。如果您可以帮助我在日志中找到它,那就太好了。请让我知道我需要共享进行调试的其他信息。
时间不多,要检查的东西很多 链接到日志详细信息:https://pastebin.com/xPAkGWA8
source 'https://rubygems.org'
ruby '2.6.3'
gem 'bootsnap', require: false
gem 'devise'
gem 'jbuilder', '~> 2.0'
gem 'pg', '~> 0.21'
gem 'puma'
gem 'rails', '5.2.3'
gem 'redis'
gem 'autoprefixer-rails'
gem 'font-awesome-sass', '~> 5.6.1'
gem 'sassc-rails'
gem 'simple_form'
gem 'uglifier'
gem 'webpacker'
gem 'pundit'
gem 'dotenv-rails', groups: [:development, :test]
gem 'cloudinary', '~> 1.9.1'
gem 'carrierwave', '~> 1.2'
gem 'geocoder'
group :development do
gem 'web-console', '>= 3.3.0'
end
group :development, :test do
gem 'pry-byebug'
gem 'pry-rails'
gem 'listen', '~> 3.0.5'
gem 'spring'
gem 'spring-watcher-listen', '~> 2.0.0'
gem 'dotenv-rails'
end
答案 0 :(得分:0)
这是错误:ActionView::Template::Error (Must supply cloud_name in tag or in configuration)
似乎您没有配置CLOUDINARY_URL
,如此处所述:https://cloudinary.com/documentation/rails_integration#configuration
如何在Heroku中进行操作:https://devcenter.heroku.com/articles/config-vars
答案 1 :(得分:0)
2019-12-15T07:14:05.514823+00:00 app[web.1]: F, [2019-12-15T07:14:05.514783 #4] FATAL -- : [9d7c7bac-ab26-41b3-8369-75e7d903bbe9] ActionView::Template::Error (Must supply cloud_name in tag or in configuration):
2019-12-15T07:14:05.514973+00:00 app[web.1]: F, [2019-12-15T07:14:05.514929 #4] FATAL -- : [9d7c7bac-ab26-41b3-8369-75e7d903bbe9] 81:
2019-12-15T07:14:05.514974+00:00 app[web.1]: [9d7c7bac-ab26-41b3-8369-75e7d903bbe9] 82: <!--image-->
2019-12-15T07:14:05.514976+00:00 app[web.1]: [9d7c7bac-ab26-41b3-8369-75e7d903bbe9] 83:
2019-12-15T07:14:05.514977+00:00 app[web.1]: [9d7c7bac-ab26-41b3-8369-75e7d903bbe9] 84: <%= link_to cl_image_tag(campaign.campaign_picture, class:"card-campaign-img", width: 278, height: 180, :crop=>"fill"), campaign_path(campaign) %>
2019-12-15T07:14:05.514978+00:00 app[web.1]: [9d7c7bac-ab26-41b3-8369-75e7d903bbe9] 85:
2019-12-15T07:14:05.514979+00:00 app[web.1]: [9d7c7bac-ab26-41b3-8369-75e7d903bbe9] 86: <!--infos-->
2019-12-15T07:14:05.514980+00:00 app[web.1]: [9d7c7bac-ab26-41b3-8369-75e7d903bbe9] 87: <div class="card-campaign-infos">
这是摘录,您应该寻找“ FATAL”标识符。
答案 2 :(得分:0)
我认为您忘记在Rails应用程序中配置Heroku应用程序。 您可以使用“ Heroku config” 对其进行配置。 或者可以通过@beauraF。(https://devcenter.heroku.com/articles/config-vars)提供的链接。