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

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

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

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

Heroku

HerokuはHeroku社が開発と運営を行っているPaaSの名称です。RubyやNode.js、Python、そしてJVMベース(Java、Scala、Clojureなど)の複数のプログラミング言語をサポートしている。

Ruby on Rails

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

Q&A

解決済

1回答

2561閲覧

herokuにアップできません

nchugzOiCRwyV38

総合スコア18

Ruby

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

Heroku

HerokuはHeroku社が開発と運営を行っているPaaSの名称です。RubyやNode.js、Python、そしてJVMベース(Java、Scala、Clojureなど)の複数のプログラミング言語をサポートしている。

Ruby on Rails

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

0グッド

0クリップ

投稿2018/10/03 10:24

前提・実現したいこと

ruby on rails で作成したアプリをherokuにpushしたいんです!
bootstrap を使っています

しかし何をしてもこのエラーが出てしまいます…

発生している問題・エラーメッセージ

remote: remote: ! Warning: Multiple default buildpacks reported the ability to handle this app. The first buildpack in the list below wil l be used. remote: Detected buildpacks: Ruby,Node.js remote: See https://devcenter.heroku.com/articles/buildpacks#buildpack-detect-order remote: -----> Ruby app detected remote: -----> Compiling Ruby/Rails remote: -----> Using Ruby version: ruby-2.4.4 remote: -----> Installing dependencies using bundler 1.15.2 remote: Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment remote: Warning: the running version of Bundler (1.15.2) is older than the version that created the lockfile (1.17.0.pre.1). We suggest you upgrade to the latest version of Bundler by running `gem install bundler --pre`. 省略 remote: Bundle completed (47.26s) remote: Cleaning up the bundler cache. remote: Warning: the running version of Bundler (1.15.2) is older than the version that created the lockfile (1.17.0.pre.1). We suggest you upgrade to the latest version of Bundler by running `gem install bundler --pre`. remote: The latest bundler is 1.17.0.pre.1, but you are currently running 1.15.2. remote: To update, run `gem install bundler --pre` remote: -----> Installing node-v8.10.0-linux-x64 remote: -----> Detecting rake tasks remote: -----> Preparing app for Rails asset pipeline remote: Running: rake assets:precompile remote: Yarn executable was not detected in the system. remote: Download Yarn at https://yarnpkg.com/en/docs/install remote: I, [2018-10-03T10:02:26.597264 #1374] INFO -- : Writing /tmp/build_d79d1b3b1f9a3ee30c44539402951975/public/assets/main -header-5badfaeb62df843cb3dfd1f1b973f9bd976a152a6fc24c53a29eaef862292dc9.jpg remote: rake aborted! remote: Sprockets::FileNotFound: couldn't find file 'node_modules/jquery/dist/jquery.js' with type 'application/javascript' remote: Checked in these paths: remote: /tmp/build_d79d1b3b1f9a3ee30c44539402951975/app/assets/config remote: /tmp/build_d79d1b3b1f9a3ee30c44539402951975/app/assets/images remote: /tmp/build_d79d1b3b1f9a3ee30c44539402951975/app/assets/javascripts remote: /tmp/build_d79d1b3b1f9a3ee30c44539402951975/app/assets/stylesheets remote: /tmp/build_d79d1b3b1f9a3ee30c44539402951975/vendor/bundle/ruby/2.4.0/gems/coffee-rails-4.2.2/lib/assets/javascripts remote: 省略 /tmp/build_d79d1b3b1f9a3ee30c44539402951975/vendor/bundle/ruby/2.4.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/tas k.rb:67:in `block (2 levels) in define' remote: /tmp/build_d79d1b3b1f9a3ee30c44539402951975/vendor/bundle/ruby/2.4.0/gems/rake-12.3.1/exe/rake:27:in `<top (required)>' remote: Tasks: TOP => assets:precompile remote: (See full trace by running task with --trace) remote: remote: ! remote: ! Precompiling assets failed. remote: ! remote: ! Push rejected, failed to compile Ruby app. remote: remote: ! Push failed remote: Verifying deploy... remote: remote: ! Push rejected to rocky-ocean-42853. remote: To https://git.heroku.com/rocky-ocean-42853.git ! [remote rejected] master -> master (pre-receive hook declined)

長くてすみません

試したこと

・jqueryの再インストールをしましたがダメでした。
・マニフェストファイルの記述も見直しました。
・bundlerのバージョンが一致していないのかと思い、アップデートしましたが、runningのヴァージョンと一致してくれないみたいです。。
それが原因でしょうか?

補足

初心者なので質問の仕方も至らないところがありますがご了承ください(><)
足りない情報があればお申し付けください!

だいぶ煮詰まっております…
どなたか救いの手を…! お願いします!!!

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

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

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

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

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

guest

回答1

0

ベストアンサー

remote: Running: rake assets:precompile remote: Yarn executable was not detected in the system. remote: Download Yarn at https://yarnpkg.com/en/docs/install

yarnがherokuビルド環境にインストールされていないので使えません、というエラーですね。

投稿2018/10/03 10:28

mather

総合スコア6753

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

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

nchugzOiCRwyV38

2018/10/03 15:35 編集

matherさん、回答ありがとうございます!! そういうことだったのですね ``` $ heroku buildpacks:add --index 1 heroku/nodejs ``` 上記のコマンドを実行したところデップロイはできたのですが、今度はApplication Errorとなってしまいました。。 heroku logs をみると、 ``` Starting process with command `npm start` : State changed from starting to crashed : State changed from crashed to starting : Process exited with status 1 npm ERR! missing script: start ``` と出ています。 npm start コマンドも打ってみましたが、errorとなってしまいました。 何が起こっていて、どうすれば良いのかご教示いただければ幸いですm(_ _)m
mather

2018/10/03 16:00

railsを起動したいのではないですか? npm startが実行されているということはnodeアプリケーションと認識されているか、Procfileにnpm startが記述されていると思います。 https://devcenter.heroku.com/articles/procfile 上記Procfileのドキュメントを参考に起動スクリプトを指定してください。
nchugzOiCRwyV38

2018/10/04 07:35 編集

回答ありがとうございます! なるほど確かにそもそもProcfileがありませんでした(苦笑) ルートディレクトリにProcfileを作成し、 ``` web: bundle exec puma -C config/puma.rb ``` と記入したとこ、解決できました! ありがとうございました!!
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

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

ただいまの回答率
85.50%

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

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

質問する

関連した質問