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 or bundle 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 the shared directory), then it only disappears and remains in the previous release. Add db / production.sqlite3 to your linked files manifesto.


Comments

Popular posts from this blog

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -