Welcome to Working With Rails

 

Discussion Forums

Discuss all things Ruby on Rails with perhaps the web's most vibrant group of Ruby on Rails enthusiasts.
system "rake db:migrate" not working in controller
2 Posts
system "rake db:migrate" not working in controller

system "rake db:migrate", system "rake db:migrate RAILS_ENV=development", Rake::Task['db:migrate'].invoke, not working in controller. Actually I have to run this rake task from controller or plugin.Can any one pls help me with this stuff?

Person
Forum Rating: 100
Sign In To Rate Post

I got the solution after trying a couple of hours.

For windows system(“ start rake db:migrate”)

For Linux system(“rake db:migrate RAILS_ENV=development”)

I tested it in my Local PC

Person
Forum Rating: 100
Sign In To Rate Post
2 Posts
Login to add your message