質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.46%
Ruby

Rubyはプログラミング言語のひとつで、オープンソース、オブジェクト指向のプログラミング開発に対応しています。

Ruby on Rails

Ruby on Railsは、オープンソースのWebアプリケーションフレームワークです。「同じことを繰り返さない」というRailsの基本理念のもと、他のフレームワークより少ないコードで簡単に開発できるよう設計されています。

AWS(Amazon Web Services)

Amazon Web Services (AWS)は、仮想空間を機軸とした、クラスター状のコンピュータ・ネットワーク・データベース・ストーレッジ・サポートツールをAWSというインフラから提供する商用サービスです。

Q&A

解決済

1回答

1890閲覧

We're sorry, but something went wrong. の原因がわからない。

退会済みユーザー

退会済みユーザー

総合スコア0

Ruby

Rubyはプログラミング言語のひとつで、オープンソース、オブジェクト指向のプログラミング開発に対応しています。

Ruby on Rails

Ruby on Railsは、オープンソースのWebアプリケーションフレームワークです。「同じことを繰り返さない」というRailsの基本理念のもと、他のフレームワークより少ないコードで簡単に開発できるよう設計されています。

AWS(Amazon Web Services)

Amazon Web Services (AWS)は、仮想空間を機軸とした、クラスター状のコンピュータ・ネットワーク・データベース・ストーレッジ・サポートツールをAWSというインフラから提供する商用サービスです。

0グッド

0クリップ

投稿2020/04/30 15:11

## 現状
awsにデプロイをしようとして2日間詰まっています。
インスタンスやvpcなどの設定は全て完了しており残すところ今のエラーを解決できればというところで詰まっています。

調べてみるとこのエラー分の原因は人によってまちまちであるということは理解できるのですが
ローカルで動くのななぜ本番では動かなくなるのかが全くわからないです。

エラー文

エラーログがこれです。

I, [2020-04-30T11:50:31.728806 #3625] INFO -- : [8fc06e24-2e96-4b42-99bb-4475c36a2aa3] Started GET "/users/sign_up" for 60.105.83.194 at 2020-04-30 11:50:31 +0000 I, [2020-04-30T11:50:31.729775 #3625] INFO -- : [8fc06e24-2e96-4b42-99bb-4475c36a2aa3] Processing by Users::RegistrationsController#new as HTML I, [2020-04-30T11:50:31.731537 #3625] INFO -- : [8fc06e24-2e96-4b42-99bb-4475c36a2aa3] Rendering users/registrations/new.html.haml within layouts/application I, [2020-04-30T11:50:31.732444 #3625] INFO -- : [8fc06e24-2e96-4b42-99bb-4475c36a2aa3] Rendered /home/naoya/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/devise-4.7.1/app/views/devise/shared/_error_messages.html.erb (0.1ms) D, [2020-04-30T11:50:31.736618 #3625] DEBUG -- : [8fc06e24-2e96-4b42-99bb-4475c36a2aa3] Industry Load (0.8ms) SELECT `industries`.* FROM `industries` WHERE `industries`.`ancestry` IS NULL LIMIT 14 D, [2020-04-30T11:50:31.737991 #3625] DEBUG -- : [8fc06e24-2e96-4b42-99bb-4475c36a2aa3] Occupation Load (0.5ms) SELECT `occupations`.* FROM `occupations` WHERE `occupations`.`ancestry` IS NULL LIMIT 15 I, [2020-04-30T11:50:31.738747 #3625] INFO -- : [8fc06e24-2e96-4b42-99bb-4475c36a2aa3] Rendered users/registrations/new.html.haml within layouts/application (7.1ms) I, [2020-04-30T11:50:31.740395 #3625] INFO -- : [8fc06e24-2e96-4b42-99bb-4475c36a2aa3] Completed 500 Internal Server Error in 11ms (ActiveRecord: 1.3ms) F, [2020-04-30T11:50:31.741607 #3625] FATAL -- : [8fc06e24-2e96-4b42-99bb-4475c36a2aa3] F, [2020-04-30T11:50:31.741747 #3625] FATAL -- : [8fc06e24-2e96-4b42-99bb-4475c36a2aa3] ActionView::Template::Error (Webpacker can't find application.js in /var/www/rails/bctalk/public/packs/manifest.json. Possible causes: 1. You want to set webpacker.yml value of compile to true for your environment unless you are using the `webpack -w` or the webpack-dev-server. 2. webpack has not yet re-run to reflect updates. 3. You have misconfigured Webpacker's config/webpacker.yml file. 4. Your webpack configuration is not creating a manifest. Your manifest contains: { } ): F, [2020-04-30T11:50:31.742027 #3625] FATAL -- : [8fc06e24-2e96-4b42-99bb-4475c36a2aa3] 7: = csp_meta_tag [8fc06e24-2e96-4b42-99bb-4475c36a2aa3] 8: = stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' [8fc06e24-2e96-4b42-99bb-4475c36a2aa3] 9: = javascript_include_tag 'application', 'data-turbolinks-track': 'reload' [8fc06e24-2e96-4b42-99bb-4475c36a2aa3] 10: = javascript_pack_tag 'application' [8fc06e24-2e96-4b42-99bb-4475c36a2aa3] 11: %body [8fc06e24-2e96-4b42-99bb-4475c36a2aa3] 12: = render partial: 'posts/top_header' [8fc06e24-2e96-4b42-99bb-4475c36a2aa3] 13: F, [2020-04-30T11:50:31.742189 #3625] FATAL -- : [8fc06e24-2e96-4b42-99bb-4475c36a2aa3] F, [2020-04-30T11:50:31.742336 #3625] FATAL -- : [8fc06e24-2e96-4b42-99bb-4475c36a2aa3] app/views/layouts/application.html.haml:10:in `_app_views_layouts_application_html_haml__427883038205559277_53776840' I, [2020-04-30T12:01:51.869851 #3625] INFO -- : [f28f355c-659e-4cae-9d4b-6b2cb6d4c9ab] Started GET "/" for 27.106.63.202 at 2020-04-30 12:01:51 +0000 I, [2020-04-30T12:01:51.870759 #3625] INFO -- : [f28f355c-659e-4cae-9d4b-6b2cb6d4c9ab] Processing by PostsController#index as HTML I, [2020-04-30T12:01:51.872318 #3625] INFO -- : [f28f355c-659e-4cae-9d4b-6b2cb6d4c9ab] Redirected to http://18.181.57.194/users/sign_up I, [2020-04-30T12:01:51.872480 #3625] INFO -- : [f28f355c-659e-4cae-9d4b-6b2cb6d4c9ab] Filter chain halted as :login_required rendered or redirected I, [2020-04-30T12:01:51.872606 #3625] INFO -- : [f28f355c-659e-4cae-9d4b-6b2cb6d4c9ab] Completed 302 Found in 2ms

で実際にエラーがあるとご指摘を受けているビューがこちらです。

ruby

1registrations/new.html.haml 2 3.signupwra 4 .title 5 .title__content 6 %p 誰にも話せないその悩み 7 %p   貴方はもう病んでいる? 8 .form 9 = form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| 10 = render "devise/shared/error_messages", resource: resource ,class: 'error' 11 .form__field 12 ニックネーム 13 %br/ 14 = f.text_field :nickname, autofocus: true, autocomplete: "nickname",required: true,class:'input' 15 .form__field 16 = f.label :email 17 %br/ 18 = f.email_field :email, autocomplete: "email",required: true,class:'input' 19 .form__field 20 = f.label :password 21 - if @minimum_password_length 22 %em 23 (#{@minimum_password_length} 以上) 24 %br/ 25 = f.password_field :password, autocomplete: "new-password" ,required: true,class:'input' 26 .form__field 27 = f.label :password_confirmation 28 %br/ 29 = f.password_field :password_confirmation, autocomplete: "new-password" ,required: true,class:'input' 30 #InId.form__field 31 業界 32 %br/ 33 = f.collection_select :industry_id, Industry.all.where(ancestry: nil).limit(14), :id, :name,{prompt: "選択してください"}, name: '',id: "Industry-form",selected:true,required:true 34 #OcId.form__field 35 職種 36 %br/ 37 = f.collection_select :occupation_id, Occupation.all.where(ancestry: nil).limit(15), :id, :name,{prompt: "選択してください"}, name: '',id: "Occupation-form",selected:true,required:true 38 .actions 39 = f.submit "save",class:'save' 40

おそらくどこかの記述が誤っているのだと思うのですが知見があさくどこか分かりません。

### 行ったこと
awsのデプロイを再度行うためインスタンスの削除とそのほかの設定を2回やり直しましたがうまくいきませんでした。

環境

ruby 2.5.1
rails 5.2.4
aws

使用しているgem

source 'https://rubygems.org' git_source(:github) { |repo| "https://github.com/#{repo}.git" } ruby '2.5.1' # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' gem 'rails', '~> 5.2.4', '>= 5.2.4.2' # Use mysql as the database for Active Record # Use Puma as the app server gem 'puma', '~> 3.11' # Use SCSS for stylesheets gem 'sass-rails', '~> 5.0' # Use Uglifier as compressor for JavaScript assets gem 'uglifier', '>= 1.3.0' # See https://github.com/rails/execjs#readme for more supported runtimes # gem 'mini_racer', platforms: :ruby gem 'mysql2', '>= 0.4.4', '< 0.6.0' # Use CoffeeScript for .coffee assets and views gem 'coffee-rails', '~> 4.2' # Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks gem 'turbolinks', '~> 5' # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder gem 'jbuilder', '~> 2.5' # Use Redis adapter to run Action Cable in production # gem 'redis', '~> 4.0' # Use ActiveModel has_secure_password # gem 'bcrypt', '~> 3.1.7' # Use ActiveStorage variant # gem 'mini_magick', '~> 4.8' # Use Capistrano for deployment # gem 'capistrano-rails', group: :development # Reduces boot times through caching; required in config/boot.rb gem 'bootsnap', '>= 1.1.0', require: false group :development, :test do # Call 'byebug' anywhere in the code to stop execution and get a debugger console gem 'byebug', platforms: [:mri, :mingw, :x64_mingw] end group :development do # Access an interactive console on exception pages or by calling 'console' anywhere in the code. gem 'web-console', '>= 3.3.0' gem 'listen', '>= 3.0.5', '< 3.2' # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring gem 'spring' gem 'spring-watcher-listen', '~> 2.0.0' end group :test do # Adds support for Capybara system testing and selenium driver gem 'capybara', '>= 2.15' gem 'selenium-webdriver' # Easy installation and use of chromedriver to run system tests with Chrome gem 'chromedriver-helper' end group :production do gem 'unicorn' end # Windows does not include zoneinfo files, so bundle the tzinfo-data gem gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby] gem 'ancestry' gem 'pry-rails' gem 'font-awesome-sass' gem 'carrierwave' gem 'mini_magick' gem 'devise-i18n' #エラー文章日本語化のため,下のジェムも同意 gem 'devise-i18n-views' gem 'devise' gem 'kaminari' gem 'webpacker' gem 'react-rails' gem 'jquery-rails' gem 'haml-rails' gem 'bootstrap_form' gem 'rails-i18n' gem 'redcarpet' gem 'coderay'

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答1

0

ベストアンサー

いえ、指摘されているのはそのviewではないです
下からふたつ目の FATALに
app/views/layouts/application.html.haml:10
とあります。
= javascript_pack_tag 'application'
が原因です。

webpack を使うことになっていますが、それは意識的に?それともいつの間にかそうなってる?
webpackを使うつもりはなく、実際に使っていないなら、この行を削除ですが、
使っている可能性があるなら、
`

  1. You want to set webpacker.yml value of compile to true for your environment
    unless you are using the webpack -w or the webpack-dev-server.
  2. webpack has not yet re-run to reflect updates.
  3. You have misconfigured Webpacker's config/webpacker.yml file.
  4. Your webpack configuration is not creating a manifest.

`
を行うことになります。config/webpacker.yml あります?

なお、、
私はwebpackについてはわからないので、その設定に関する問題やproduction環境で行うべきことが問題となりましたら、識者にタッチです。

投稿2020/04/30 22:37

winterboum

総合スコア23401

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

退会済みユーザー

退会済みユーザー

2020/05/01 01:58

ありがとうございます。 回答いただいてからwebpackの件色々調べてみましたがどれもうまくいきませんでした。 winterboumさんがおっしゃっているように = javascript_pack_tag 'application'のコメントアウトにて無事解決いたしました。 本当にありがとうございます。
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.46%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問