Home>
As the title suggests, I'm stuck with an error on heroku run rails db: migrate.
■ Error details
bash: rails: command not found
■ Specs
・ Mac os
・ Rails 6.0.3.4
・ Ruby 2.6.6p146 (2020-03-31 revision 67876) [x86_64-darwin19]
I set heroku by referring to the following article, but I get an error.
https://qiita.com/kazukimatsumoto/items/a0daa7281a3948701c39
Thanks for your cooperation.
source'https://rubygems.org'
git_source (: github) {| repo | "https://github.com/#{repo}.git"}
ruby '2.6.6'
gem'rails','~>6.0.3','>= 6.0.3.3'
gem'bcrypt'
gem'puma','~>4.1'
gem'sass-rails','>= 6'
gem'webpacker','~>4.0'
gem'turbolinks','~>5'
gem'jbuilder','~>2.7'
gem'bootsnap','>= 1.4.2', require: false
gem'bootstrap-sass'
gem'devise'
gem'faker'
gem'jquery-rails'
gem'will_paginate'
gem'bootstrap-will_paginate'
gem'carrierwave'
gem "mini_magick"
gem'pry-rails'
group: development,: test do
gem "factory_bot_rails"
gem'rubocop-airbnb'
gem'rails-controller-testing'
gem'rspec-rails'
gem'sqlite3'
gem'byebug', platforms: [: mri,: mingw,: x64_mingw]
end
group: development do
gem'spring-commands-rspec'
gem'web-console','>= 3.3.0'
gem'listen','~>3.2'
gem'spring'
gem'spring-watcher-listen','~>2.0.0'
end
group: test do
gem'webdrivers'
gem'capybara','>= 2.15'
gem'selenium-webdriver'
end
group: production do
gem'pg'
gem'fog'
end
gem'tzinfo-data'
default:&default
adapter: sqlite3
pool:<% = ENV.fetch ("RAILS_MAX_THREADS") {5}%>
timeout: 10000
development:
<<: * default
database: db/development.sqlite3
test: test:
<<: * default
database: db/test.sqlite3
production:
<<: * default
adapter: postgresql
encoding: unicode
pool: 5
-
Answer # 1
Related articles
- [rails 6] rails db: migrate cannot be done on heroku
- ruby on rails - seed fails on heroku
- ruby - after rails db: migrate: reset, the database disappeared
- ruby - rails db: migrate is not possible
- ruby - rails cannot be started in the production environment when building an ec2 environment
- ruby on rails - when i access the rails 6 site on heroku with my own domain, it says "this connection does not protect priv
- ruby on rails - [docker] i get an error when i run rails db: migrate
- ruby on rails - image cannot be saved (activestorage installed) null in image of table
- mysql - i can't db: migrate when deploying a rails app on heroku
- ruby - can't db: migrate after deploying to heroku
- ruby on rails - syntax error cannot be resolved
- ruby on rails - you cannot change the keychain after downloading the pem file when creating an ec2 instance the matter that come
- ruby on rails 5 - the time notation cannot be written normally
- ruby on rails - data cannot be saved in the intermediate table (parameters cannot be passed)
- ruby on rails - heroku: how to check the database_url used for regular backup
- ruby on rails - cannot save nested child model
- ruby - [rails] the cart function cannot get the cart id associated with the user
- ruby on rails - i cannot save a comment on the comment posting page
- ruby on rails - cannot pass id to destroy action of intermediate table
Related questions
- ruby - i want to resolve the error runtimeerror in the production environment
- ruby - i want to avoid the mysql2 :: error: unknown table'likes' error that appears when deploying to heroku
- ruby - unable to deploy to heroku (nomethoderror)
- ruby - unable to deploy to heroku
- ruby - loaderror: cannot load such file --capybara/rspec occurs when executing bin/rspec
- ruby - about rails controller new action
- ruby - how to eliminate duplication using distinctpluck (: hoge)
- ruby - undefind method chart kick in rails production environment
- html - how to proceed with learning and development for ec construction
Since it is an error that there is no rails command, I think that the deployment has failed.
I think you are deploying with the above command, so why not check this log?
For reference, it seems possible that you have pushed a branch other than master to heroku.
https://qiita.com/chiaki-kjwr/items/811c5e82a8cb2daa590f