rake db:seeds will work for any environment, but you have to specify it as with any other task when you want to target any environment other than development.
task :seeds, :roles => :db, :only => { :primary => true } do run "cd #{latest_release} && RAILS_ENV=#{rails_env} #{rake} db:seeds" end after "deploy:cold", :seeds On Dec 7, 2011, at 8:36 AM, sukoonc...@gmail.com wrote: > Rake db:seeds , provide sample data for development environment only, How can > we transfer the data to production via Capistrano? > > > Jay > > On Dec 7, 2011, at 8:08 AM, Donovan Bray <donno...@gmail.com> wrote: > >> rake db:seeds is usually used for this purpose >> >> But it depends on your application configuring an appropriate seeds.rb >> >> On Dec 7, 2011, at 2:33 AM, jay parteek <jayparte...@gmail.com> wrote: >> >>> I got you. So rake db:migrate will just try to export the structure of >>> the database placed inside the schema.rb. What if we want to copy the >>> local state (may be some dummy data ) to the remote server? >>> >>> >>> >>> On Wed, Dec 7, 2011 at 2:21 AM, Lee Hambley <lee.hamb...@gmail.com> wrote: >>>> Jay, What exactly do you expect rake db:migrate does? It simply runs your >>>> migrations, it does not copy local state, and images to the remote server, >>>> that wouldn't make any sense. >>>> >>>> -- >>>> * You received this message because you are subscribed to the Google Groups >>>> "Capistrano" group. >>>> * To post to this group, send email to capistrano@googlegroups.com >>>> * To unsubscribe from this group, send email to >>>> capistrano+unsubscr...@googlegroups.com For more options, visit this group >>>> at http://groups.google.com/group/capistrano?hl=en >>> >>> -- >>> * You received this message because you are subscribed to the Google Groups >>> "Capistrano" group. >>> * To post to this group, send email to capistrano@googlegroups.com >>> * To unsubscribe from this group, send email to >>> capistrano+unsubscr...@googlegroups.com For more options, visit this group >>> at http://groups.google.com/group/capistrano?hl=en >> >> -- >> * You received this message because you are subscribed to the Google Groups >> "Capistrano" group. >> * To post to this group, send email to capistrano@googlegroups.com >> * To unsubscribe from this group, send email to >> capistrano+unsubscr...@googlegroups.com For more options, visit this group >> at http://groups.google.com/group/capistrano?hl=en > > -- > * You received this message because you are subscribed to the Google Groups > "Capistrano" group. > * To post to this group, send email to capistrano@googlegroups.com > * To unsubscribe from this group, send email to > capistrano+unsubscr...@googlegroups.com For more options, visit this group at > http://groups.google.com/group/capistrano?hl=en -- * You received this message because you are subscribed to the Google Groups "Capistrano" group. * To post to this group, send email to capistrano@googlegroups.com * To unsubscribe from this group, send email to capistrano+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/capistrano?hl=en