前提
初心者です。
rails tutorialで学習中です。
cloud9のターミナルで git push heroku master した後、herokuでopen app しても
Application error An error occurred in the application and your page could not be served. If you are the application owner, check your logs for details. You can do this from the Heroku CLI with the command heroku logs --tail
と表示されてしまいます。
実現したいこと
Application errorを改善し、正常にWebページを表示させたい
発生している問題・エラーメッセージ
$ git push heroku master Counting objects: 3, done. Compressing objects: 100% (3/3), done. Writing objects: 100% (3/3), 304 bytes | 304.00 KiB/s, done. Total 3 (delta 2), reused 0 (delta 0) remote: Compressing source files... done. remote: Building source: remote: remote: -----> Building on the Heroku-22 stack remote: -----> Using buildpack: heroku/nodejs remote: -----> Node.js app detected remote: remote: -----> Creating runtime environment remote: remote: NPM_CONFIG_LOGLEVEL=error remote: USE_YARN_CACHE=true remote: NODE_VERBOSE=false remote: NODE_ENV=production remote: NODE_MODULES_CACHE=true remote: remote: -----> Installing binaries remote: engines.node (package.json): 14.19.0 remote: engines.npm (package.json): 6.x.x remote: engines.yarn (package.json): unspecified (use default) remote: remote: Resolving node version 14.19.0... remote: Downloading and installing node 14.19.0... remote: Bootstrapping npm 6.x.x (replacing 6.14.16)... remote: npm 6.14.17 installed remote: Resolving yarn version 1.22.x... remote: Downloading and installing yarn (1.22.19) remote: Installed yarn 1.22.19 remote: remote: -----> Restoring cache remote: - yarn cache remote: remote: -----> Installing dependencies remote: Installing node modules (yarn.lock) remote: yarn install v1.22.19 remote: [1/4] Resolving packages... remote: [2/4] Fetching packages... remote: [3/4] Linking dependencies... remote: [4/4] Building fresh packages... remote: Done in 7.93s. remote: remote: -----> Build remote: remote: -----> Pruning devDependencies remote: yarn install v1.22.19 remote: [1/4] Resolving packages... remote: [2/4] Fetching packages... remote: [3/4] Linking dependencies... remote: [4/4] Building fresh packages... remote: warning Ignored scripts due to flag. remote: Done in 2.67s. remote: remote: -----> Caching build remote: - yarn cache remote: remote: -----> Build succeeded! remote: ! This app may not specify any way to start a node process remote: https://devcenter.heroku.com/articles/nodejs-support#default-web-process-type remote: remote: -----> Discovering process types remote: Procfile declares types -> (none) remote: Default types for buildpack -> web remote: remote: -----> Compressing... remote: Done: 47.8M remote: -----> Launching... remote: Released v7 remote: https://fathomless-shore-68344.herokuapp.com/ deployed to Heroku remote: remote: Starting November 28th, 2022, free Heroku Dynos, free Heroku Postgres, and free Heroku Data for Redis® will no longer be available. remote: remote: If you have apps using any of these resources, you must upgrade to paid plans by this date to ensure your apps continue to run and to retain your data. For students, we will announce a new program by the end of September. Learn more at https://blog.heroku.com/next-chapter remote: remote: Verifying deploy.... done. To https://git.heroku.com/fathomless-shore-68344.git 6d8a917..36e2237 master -> master
該当のソースコード
試したこと
$ heroku run rails c で
Running rails c on xxxxx... up, run.4868 (Free) /usr/bin/env: 'ruby': No such file or directory
と表示されたのでググったら改行コードを
CRLFからLFに変更したら良いと書いてありましたがMacではデフォルトでLFに設定されてるのでこれは的外れ。
他にも heroku run rails c で出た上記エラーで様々な解決策を調べたが解決策が見つからず、、
どなたかご教授お願いいたします。
参考
https://qiita.com/nishikawa1031/items/38132298ef7c34a3b7b2
https://qiita.com/ryonishimura37/items/b72ecc829f9501857528
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2022/09/25 12:29
2022/09/25 12:41
2022/09/25 16:22
2022/09/26 00:49
2022/09/27 11:24
2022/09/27 11:45
2022/09/29 09:38
2022/09/29 09:40
2022/09/29 10:36
2022/10/07 21:12 編集
2022/10/07 21:11