简体   繁体   中英

How to auto restart rails server with grunt?

I am working with rails-api so each time i change controller or Route file i want to auto reload rails server, so new changes will be applied.

I got basic setup to work with this plugin: link , where rails start together with grunt.

The problem is i want to reload rails server each time any rails files are changed.

Is it possible to achieve?

Yes, of course. You will need to use Guard for this purpose. Please read carefully Guards official page . They're doing good job in explaining how to setup your development environment.

There are tutorials on RailsCasts and also on NetTuts .

Edit: I forgot to mention that there is second(but definitely not the last one) option to achieve this. If you start using Spring which is Rails application preloader. Read more about this on Github page .

Here is great tutorial on how to setup everything together - http://girders.org/blog/2014/02/06/setup-rails-41-spring-rspec-and-guard/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM