简体   繁体   中英

How do I setup multiple rails applications for development?

For the site I am currently working on we have 2 Rails 3.2 projects. One project is basically an API, and the other is a web front end. In order to develop on the web front end I need to have the API project running. I've tried using the foreman and subcontractor gems to manage this but it doesn't seem to work. Both projects run the Thin application server and have their own RVM gemsets. We also run Nginx in production.

How would you go about managing this setup for development? I want there to be 1 command to fire up everything, similar to how Foreman works.

Requirements:

  • RVM Support
  • Thin for development
  • One command I can run from the API application to start both applications
  • Cannot using Pow (it always seems to get hung up and is incredibly slow)
  • Setup should work for other developers with minimal setup (easily scriptable)
  • Works on OSX

Thanks!

tmuxinator allows you to easily configure a tmux session that can be launched with a single command containing any number of windows (tabs) and executes commands in each window (like starting a server). Just configure it to load the appropriate gemset for the appropriate rails server.

https://github.com/aziz/tmuxinator

another, very cool alternative to the tools you've mentioned is Invoker .

it's worth checking out, as it allows to run multiple processes at once (as well as terminate them), like foreman does and it offers .dev domain which mimics pow behavior.

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