I'm working on an assignment at a certain school.
I've asked too many questions to my school mentor, and I'm getting confused with the mentor's response, so it's even harder to understand.
So let me ask you a question.
In creating an EC site, we are building an environment where AWS S3 and Heroku work together.
In the process of building the environment
git push heroku (branch name): master-f
Error after execution
ローカル Due to differences in local, remote, and Heroku updates, we know that we cannot push, so we are forcing you to push.
remote: !Precompiling assemblies failed.
remote :!
remote: !Push rejected, failed to compile Ruby app.
remote:
remote: ! Push failed
remote :!
remote: !## Warning-The same version of this code has already been built: e4d8a765c2478440e424bb07 caa43f2f7b8bc
remote :!
remote: ! We have detected that you have triggered a build from source code with version e4d8a765c2478440e424bb07 caa43f2f7b8bc
remote: !at least twice. One common cause of this behavior is attempting to deploy code from a different branch.
remote :!
remote: ! If you are developing on a branch and deploying via you must run:
remote :!
remote: !git push heroku<branchname>:main
remote :!
remote: ! This article goes into details on the behavior:
remote: !https://devcenter.heroku.com/articles/duplicate-build-version
remote:
remote —Verifying deploy...
The limitation of the challenge is that you should not push the Master branch of GitHub.
In the process of starting over several times, we deleted the Heroku app in the past and deleted the branch in the past.
Run git push heroku<branchname>:main
in the error statement
I get the same error.
Resolving Errors
I want to successfully deploy to Heroku
I'm ashamed to ask you this question, but I'd like to ask for your advice and help.
The database.yml contents are as follows.
# MySQL.Version 5.0 and up are supported.
#
# Install the MySQL driver
# gem install mysql2
#
# Ensure the MySQL gem is defined in your Gemfile
# gem 'mysql2'
#
# And be sure to use new-style password hashing:
# # http://dev.mysql.com/doc/refman/5.7/en/old-client.html
default —&default
adapter —mysql2
encoding —utf8
collation —utf8_general_ci
pool —5
host:<%=ENV['MYSQL_HOST']||'localhost'%>
username:<%=ENV['MYSQL_USERNAME']||'root'%>
password:<%=ENV['MYSQL_PASSWORD']|'%>
socket: /tmp/mysql.sock
development:
<<:* default
database —potepanec_2_7_development
# Warning: The database defined as "test" will be used 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 —potepanec_2_7_test
# As with config/secrets.yml, you never want to store sensitive information,
# like your database password, in your source code. If your source code is
# ever see by anyone, they now have access to your database.
#
# Install, provide the password as a unix environment variable when you boot
# The app.Read http://guides.rubyonrails.org/configuring.html#configuring-a-database
# for a full rundown on how to provide these environment variables in a
# production deployment.
#
# On Heroku and other platform providers, you may have a full connection URL
# available as an environment variable.For example:
#
# DATABASE_URL="mysql2://myuser:mypass@localhost/somedatabase"
#
# You can use this database configuration with:
#
# production:
# url:<%=ENV['DATABASE_URL']%>
#
production:
<<:* default
url:<%=ENV['JAWSDB_URL']&.sub('mysql://', 'mysql2://')%>
© 2024 OneMinuteCode. All rights reserved.