Deployment was successful on heroku (when you enter the $heroku open command, the browser opens and the login screen created by the app is displayed normally), but you could not log in, so the database of the production environment (product environment) I have identified the cause to the point that the user information is not included in, but I am unable to set the initial user information in the database of the product environment.
, Seeds.rb has the following initial information.
User.create (name:'testuser', email:'[email protected]', admin: true, password:'test', password_confirmation:'test')
After that, if you enter the following command, an error will occur.
$rails db: seed RAILS_ENV = production You have 1 pending migration: 20201109134914 CreateActiveStorageTables Run `rails db: migrate` to update your database then try again. ChihironoMacBook-ea: taskleaf chihirokato $rails db: seed RAILS_ENV = production
It seems that the migration of a specific migrate file is stopped, but this error does not disappear even if I update the migration with rails db: migrate, or roll back and then migrate again.
I think that there is a lot of lack of knowledge about deployment because I just learned yesterday, but I would appreciate it if you could teach me.
Answer # 1
If you want to register the initial information of heroku,
heroku run rake db: seedIt will be.
- ruby on rails - i want to be able to send emails from the rails production environment
- ruby on rails - [aws production environment] regarding http error 406
- ruby on rails - activemodel :: unknownattributeerror in production environment
- nginx - [production environment] how to read less log/productionlog when rails does not start properly
- ruby - the production environment settings do not work
- ruby on rails - about aws environment variables
- ruby on rails - [aws/ec2] when i try to run a rails application in a production environment, an error occurs in the image displa
- ruby on rails 6 - environment construction of ruby on rails
- error in building environment of ruby on rails
- ruby on rails - i'm trying to build a rails environment on docker, but it doesn't work
- ruby on rails 3 - i'm trying to build a ruby on rails environment with docker, but it doesn't work
- ruby on rails - in rails + nginx + aws + rds t2micro (memory 1g) environment, puma crashes when displaying a database of 20000 r
- ruby - i want to build a rails environment on docker, but i can't get an error
- ruby - rails cannot be started in the production environment when building an ec2 environment
- ruby on rails - how to debug with rails pry in docker environment
- ruby on rails - bootstap 4 does not work in rails6 production environment
- ruby on rails - environment construction rbenv installation next path does not pass
- ruby - i can't "rails db: create rails_env = production" on aws
- ruby - [rails] i want to find the date difference using the model created_at
- python - you may need to restart the kernel to use updated packages error
- php - coincheck api authentication doesn't work
- php - i would like to introduce the coincheck api so that i can make payments with bitcoin on my ec site
- [php] i want to get account information using coincheck api
- the emulator process for avd pixel_2_api_29 was killed occurred when the android studio emulator was started, so i would like to
- i want to call a child component method from a parent in vuejs
- python 3x - typeerror: 'method' object is not subscriptable
- dart - flutter: the instance member'stars' can't be accessed in an initializer error
- xcode - pod install [!] no `podfile 'found in the project directory