5分でHerokuに放射を展開すると、管理者に許可エラーが発生します

StackOverflow https://stackoverflow.com/questions/4811727

  •  25-10-2019
  •  | 
  •  

質問

これらの2つのチュートリアルをまとめました。

5分でHerokuに輝きます

2.3.5でバンドラーを使用します

そして、私のgemfileには、私も含めました:

gem "taps"
gem "radiant"

そして、私が地元で輝く走ったとき、問題ありません!管理者にアクセスできます。

Herokuで実行すると、FrontPageが機能しますが、管理者は私にAを与えてくれます。

Application error

Change this error message for exceptions thrown outside of an action (like in Dispatcher setups or broken Ruby code) in public/500.html

私はログをチェックしました、そして彼らは言います。

Rendering admin/welcome/login

ActionView::TemplateError (Permission denied - /disk1/home/slugs/6d4358ef-a4c2-411e-b46d-e6224d3c36fb/mnt/public/javascripts/admin/all.js) on line #9 of /home/slugs/6d4358ef-a4c2-411e-b46d-e6224d3c36fb/mnt/.bundle/gems/ruby/1.8/gems/radiant-0.9.1/app/views/layouts/application.html.haml:
6:     - @stylesheets.uniq.each do |stylesheet|
7:       = stylesheet_link_tag stylesheet
8:     %script{:type=>"text/javascript"}="var relative_url_root = '#{ActionController::Base.relative_url_root}';"
9:     = javascript_include_tag %w(admin/prototype admin/effects admin/lowpro admin/dateinput admin/pagestatus admin/cookie admin/popup admin/status admin/utility admin/codearea admin/tabcontrol admin/ruledtable admin/sitemap admin/shortcuts admin/toggle admin/validationerror admin/application), :cache => 'admin/all'
10:     - @javascripts.uniq.each do |javascript|
11:       = javascript_include_tag javascript
12:     - if @content_for_page_scripts

    radiant (0.9.1) app/views/layouts/application.html.haml:9:in `_run_haml_47home47slugs476d4358ef45a4c245411e45b46d45e6224d3c36fb47mnt4746bundle47gems47ruby47146847gems47radiant45046946147app47views47layouts47application46html46haml'
    radiant (0.9.1) vendor/plugins/haml/rails/./lib/haml/helpers/action_view_mods.rb:13:in `render'
    radiant (0.9.1) vendor/plugins/haml/rails/./lib/haml/helpers/action_view_mods.rb:13:in `render'
    radiant (0.9.1) vendor/plugins/haml/rails/./lib/sass/plugin/rails.rb:20:in `process'
    /home/heroku_rack/lib/static_assets.rb:9:in `call'
    /home/heroku_rack/lib/last_access.rb:15:in `call'
    /home/heroku_rack/lib/date_header.rb:14:in `call'
    thin (1.2.6) lib/thin/connection.rb:76:in `pre_process'
    thin (1.2.6) lib/thin/connection.rb:74:in `catch'
    thin (1.2.6) lib/thin/connection.rb:74:in `pre_process'
    thin (1.2.6) lib/thin/connection.rb:57:in `process'
    thin (1.2.6) lib/thin/connection.rb:42:in `receive_data'
    eventmachine (0.12.10) lib/eventmachine.rb:256:in `run_machine'
    eventmachine (0.12.10) lib/eventmachine.rb:256:in `run'
    thin (1.2.6) lib/thin/backends/base.rb:57:in `start'
    thin (1.2.6) lib/thin/server.rb:156:in `start'
    thin (1.2.6) lib/thin/controllers/controller.rb:80:in `start'
    thin (1.2.6) lib/thin/runner.rb:177:in `send'
    thin (1.2.6) lib/thin/runner.rb:177:in `run_command'
    thin (1.2.6) lib/thin/runner.rb:143:in `run!'
    thin (1.2.6) bin/thin:6
    /usr/ruby1.8.7/bin/thin:19:in `load'
    /usr/ruby1.8.7/bin/thin:19

Rendering /disk1/home/slugs/6d4358ef-a4c2-411e-b46d-e6224d3c36fb/mnt/public/500.html (500 Internal Server Error)
役に立ちましたか?

解決

これを解決するために、私はそれが私のローカルで作成しようとしていたファイルを作成しました。

script/server -e production

次に、ログインしました。 http://localhost:3000/admin/

その後、ページが作成され、実行しました

git add .
git commit -m "created temp admin files for production"
git push heroku master

他のヒント

それはです :cache => 'admin/all' Herokuでは./TMPと./LOGの書き込み権限しかないため、JavaScriptリンクタグでそれを引き起こしています。

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top