ruby on rails - Capistrano deploy removes table -
I use capistrano to deploy my rail app for my VPS, but when I go to my page Then after each deployment I get an error log says:
I, [2014-11-04T08: 20: 16.659289 # 12482] Info: - 2014-11-04 Get the "/" for 08: 82.73.170.71: 20:16 -0500 i, [2014-11-04T08: 20: 16.662717 # 12482] Notice -: Home Controller # Index processing by HTML I, [2014- 11-04T08: 20: 16.665 9 7 # 12482] Know Kari - Complete 500 internal server error in 3MF, [2014-11-04T08: 20: 16.670152 # 12482] FATAL -: ActiveRecord :: statement invalid (table 'user' could not be found): app / controller / application_controller.rb : 18: `Current_user 'app / helpers / session_helper.rb: 26: in' log in_in '? App / controllers / home_controller.rb: 4: In `index '
I have to do SSH in my VPS and go to my rail route and run RAILS_ENV = output bundle exec rake Db: Migrate
I still have the production.sqlite3
file in my DB folder, but it's empty.
My deploy.rb
'Codeit' set: repo_url, 'git@github.com: alucardu / movieseat.git' set: deploy_to, ' / Home / deploy / set up: linked_file,% w {config / database.yml config / secrets.yml} set: linked_dear,% w {bin log tmp / peds tmp / cache tmp / sockets vendor / bundle public / system} Requires 'Casistrono-RBN' namespace: Duplicate up dodd 'restart app' function: Restart on roles (app): In: Sequence, Wait: Execute 5 : Touch, release_path.joined ('tmp / restarttext') end of end: / P>Capistrano does not touch the database migration until it
deploy: migrat your Work within
capfile
orbundle order cap deployed: migrate
.Your database is missing 'because SQLite files in your
db
directory only because you do not specify that it should be shared between releases (Should first be in theshared
directory), then it only disappears and remains in the previous release. Adddb / production.sqlite3
to yourlinked files
manifesto.
Comments
Post a Comment