nginx - How to deploy rails sqlite3 database with capistrano -


i trying deploy this:

bundle exec cap deploy:cold rails_env=production rake db:migrate bundle exec cap deploy:migrate 

but time shows error in log file:

i, [2014-04-14t14:15:14.853543 #10769]  info -- : started "/users/sign_up"      176.192.228.14 @ 2014-04-14 14:15:14 -0400 i, [2014-04-14t14:15:14.856055 #10769]  info -- : processing   devise::registrationscontroller#new html i, [2014-04-14t14:15:14.857398 #10769]  info -- : completed 500 internal server error  in 1ms f, [2014-04-14t14:15:14.860844 #10769] fatal -- :  activerecord::statementinvalid (could not find table 'users') 

but in current/db folder created production.sqlite3 .

in localhost:3000 works fine.

how can migrate db production capistrano?

i use nginx , unicorn , repo https://github.com/egorkze/bh

working sqlite in production problematic because each time deploy new version entiredb stay on old release folder, can when deploy add command:

task :copy_sqlite, roles: :app     run "cp #{current_path}/db/production.sqlite3 #{release_path}/db/" end 

just add before rake db:migrate , solve problem.

my strong suggestion move postgresql/mysql.


Comments

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -