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

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

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

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

Ruby on Rails

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

Q&A

解決済

2回答

7302閲覧

助けてください! Herokuにデプロイ出来ません!

退会済みユーザー

退会済みユーザー

総合スコア0

Heroku

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

Ruby on Rails

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

1グッド

1クリップ

投稿2019/01/24 07:43

編集2019/01/24 10:05

前提・実現したいこと

この記事どうりにデプロイしようとしたのですが出来ません

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

remote: /tmp/build_a3a16def7065882f09d5d2c7acbca92c/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/exe/rake:27:in `<top (required)>' remote: Tasks: TOP => environment 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 sampleffy. remote: To https://git.heroku.com/sampleffy.git ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to 'https://git.heroku.com/sampleffy.git' ### 試したこと 何度も試してもダメでした。 herokuにcreateしたファイルを削除して作り直してもダメでした。 一通りググって試した結果全部ダメでした。 どなたかアドバイスお願いします。 出てきたコード(所々カットしています) ! Warning: Multiple default buildpacks reported the ability to handle this app. The first buildpack in the list below will be used. Detected buildpacks: Ruby,Node.js See https://devcenter.heroku.com/articles/buildpacks#buildpack-detect-order -----> Ruby app detected -----> Compiling Ruby/Rails -----> Using Ruby version: ruby-2.5.1 -----> Installing dependencies using bundler 1.15.2 Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment Warning: the running version of Bundler (1.15.2) is older than the version that created the lockfile (1.16.4). We suggest you upgrade to the latest version of Bundler by running `gem install Bundle complete! 20 Gemfile dependencies, 66 gems now installed. Gems in the groups development and test were not installed. Bundled gems are installed into ./vendor/bundle. Post-install message from i18n: HEADS UP! i18n 1.1 changed fallbacks to exclude default locale. But that may break your application. Please check your Rails app for 'config.i18n.fallbacks = true'. If you're using I18n (>= 1.1.0) and Rails (< 5.2.2), this should be 'config.i18n.fallbacks = [I18n.default_locale]'. If not, fallbacks will be broken in your app by I18n 1.1.x. For more info see: https://github.com/svenfuchs/i18n/releases/tag/v1.1.0 Post-install message from sass: Ruby Sass is deprecated and will be unmaintained as of 26 March 2019. * If you use Sass as a command-line tool, we recommend using Dart Sass, the new primary implementation: https://sass-lang.com/install * If you use Sass as a plug-in for a Ruby web framework, we recommend using the sassc gem: https://github.com/sass/sassc-ruby#readme * For more details, please refer to the Sass blog: http://sass.logdown.com/posts/7081811 Bundle completed (50.18s) Cleaning up the bundler cache. Warning: the running version of Bundler (1.15.2) is older than the version that created the lockfile (1.16.4). We suggest you upgrade to the latest version of Bundler by running `gem install bundler`. The latest bundler is 2.0.1, but you are currently running 1.15.2. To update, run `gem install bundler` -----> Installing node-v10.14.1-linux-x64 -----> Detecting rake tasks -----> Preparing app for Rails asset pipeline Running: rake assets:precompile rake aborted! YAML syntax error occurred while parsing /tmp/build_37e0980603a231b872956b03ecee0a9f/config/database.yml. Please note that YAML must be consistently indented using spaces. Tabs are not allowed. Error: (<unknown>): did not find expected key while parsing a block mapping at line 7 column 1 /tmp/build_37e0980603a231b872956b03ecee0a9f/vendor/bundle/ruby/2.5.0/gems/railties-5.2.1/lib/rails/application/configuration.rb:190:in `rescue in database_configuration' /tmp/build_37e0980603a231b872956b03ecee0a9f/vendor/bundle/ruby/2.5.0/gems/railties-5.2.1/lib/rails/application/configuration.rb:165:in `database_configuration' /tmp/build_37e0980603a231b872956b03ecee0a9f/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.1/lib/active_record/railtie.rb:133:in `block (2 levels) in <class:Railtie>' /tmp/build_37e0980603a231b872956b03ecee0a9f/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/lazy_load_hooks.rb:71:in `instance_eval' /tmp/build_37e0980603a231b872956b03ecee0a9f/vendor/bundle/ruby/2.5.0/gems/activesupport- /tmp/build_37e0980603a231b872956b03ecee0a9f/vendor/bundle/ruby/2.5.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/task.rb:62:in `block (2 levels) in define' /tmp/build_37e0980603a231b872956b03ecee0a9f/vendor/bundle/ruby/2.5.0/gems/rake- 12.3.2/exe/rake:27:in `<top (required)>' Tasks: TOP => environment (See full trace by running task with --trace) ! ! Precompiling assets failed. ! ! Push rejected, failed to compile Ruby app. ! Push failed
退会済みユーザー👍を押しています

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

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

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

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

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

ozwind918

2019/01/24 07:45

ローカルでは正常に動きましたか?
sansansandodo

2019/01/24 08:23

Precompiling assets failed. は結果なので、躓いたところではないです。 上のほうにさかのぼっていったら、別の個所でエラーが出ているはずなので、そこの追記をお願いします。 エラー箇所は一か所ではない可能性があるので、pushコマンドたたいてからをぜんぶさかのぼって探してみてください
退会済みユーザー

退会済みユーザー

2019/01/24 10:00

ローカルでは動きます。 見た感じこの2つです。 Warning: the running version of Bundler (1.15.2) is older than the version that created the lockfile (1.16.4). We suggest you upgrade to the latest version of Bundler by running `gem install bundler`. -----> Installing node-v10.14.1-linux-x64 -----> Detecting rake tasks -----> Preparing app for Rails asset pipeline Running: rake assets:precompile rake aborted! YAML syntax error occurred while parsing /tmp/build_37e0980603a231b872956b03ecee0a9f/config/database.yml. Please note that YAML must be consistently indented using spaces. Tabs are not allowed. Error: (<unknown>): did not find expected key while parsing a block mapping at line 7 column 1 /tmp/build_37e0980603a231b872956b03ecee0a9f/vendor/bundle/ruby/2.5.0/gems/railties-5.2.1/lib/rails/application/configuration.rb:190:in `rescue in database_configuration' /tmp/build_37e0980603a231b872956b03ecee0a9f/vendor/bundle/ruby/2.5.0/gems/railties-5.2.1/lib/rails/application/configuration.rb:165:in `database_configuration' /tmp/build_37e0980603a231b872956b03ecee0a9f/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.1/lib/active_record/railtie.rb:133:in `block (2 levels) in <class:Railtie>' どうすれば良いのでしょうか...
matsuand

2019/01/24 10:16

"Tabs are not allowed." と書いてあります。database.yml でしょうか。
退会済みユーザー

退会済みユーザー

2019/01/24 10:38 編集

database.yml はこの様になっています。 # SQLite version 3.x # gem install sqlite3 # # Ensure the SQLite 3 gem is defined in your Gemfile # gem 'sqlite3' # default: &default adapter: sqlite3 pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %> timeout: 5000 development: <<: *default database: db/development.sqlite3 # Warning: The database defined as "test" will be erased and # re-generated from your development database when you run "rake". # Do not set this db to the same as development or production. test: <<: *default database: db/test.sqlite3 production: <<: *default adapter: postgresql encoding: unicode pool: 5
guest

回答2

0

解決しました。
ファイル名が間違っていたり、その他はエラー文を読み検索し解決しました。
コメントをしていただいた方々ありがとうございました。

投稿2019/02/19 15:45

退会済みユーザー

退会済みユーザー

総合スコア0

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

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

0

ベストアンサー

1.bundlerをアンインストール
gem uninstall bundlerで一旦アンインストール。

2.bundlerのバージョンをInstalling dependencies using bundler 1.15.2 Runningに合わせて再インストール
gem install bundler -v '1.15.2'で再度インストール。

3.古い情報が記載されたgemfile.lockがあれば削除
gemfile.lockを削除

4.もろもろをインストールする(gemfile.lockの中身が更新されてbundlerを1.15.2でlockできる)
bundle install

以上を試してみてください

投稿2019/01/24 11:27

sansansandodo

総合スコア248

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

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

退会済みユーザー

退会済みユーザー

2019/01/24 12:32

試してみましたがダメでした。 remote: YAML syntax error occurred while parsing /tmp/build_b3d7c0edf62e26aeccdc6170f354cbb3/config/database.yml. Please note that YAML must be consistently indented using spaces. Tabs are not allowed. Error: (<unknown>): did not find expected key while parsing a block mapping at line 24 column 2 Caused by: remote: Psych::SyntaxError: (<unknown>): did not find expected key while parsing a block mapping at line 24 column 2 emote: Tasks: TOP => environment 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 sampleffy. remote: To https://git.heroku.com/sampleffy.git ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to 'https://git.heroku.com/sampleffy.git'
sansansandodo

2019/01/24 12:40

じゃあwarning依存の問題はなさそうですね。 database.yml内の字下げなんですが、nginxとかの設定ファイルと同じで半角スペースしか認められてないんですよね。多分、TABか全角スペースが混ざってるあるいは字下げ忘れてるはずなので確認してみてください
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

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

ただいまの回答率
85.50%

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

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

質問する

関連した質問