DISQUS

ruby on rails blog: rake db:migrate for production databases

  • jhnsntmthy · 10 months ago
    in my bash profile on my deployment servers, I write an alias like this
    alias rk="RAILS_ENV=production rake"

    so that I can type
    rk db:migrate

    or any rake tasks i need. Do this for script console too if you need it. Saves me alot of headaches
  • ngng · 9 months ago
    Thanks for that, that's saved me some undue finger stress :)
  • GonZoo · 9 months ago
    tks johanttan I got crazy looking for this
  • Tarun · 8 months ago
    I ran into a similar problem, but I was trying to specify the production environment with the parameter --environment='production' like we do for mongrel/webrick...
    for rake the env. should specify using RAILS_ENV