Is there an easy way to manage many rails dev sites on my computer?
I work on my MacBook Pro. I have many rails projects in ~/dev.
It's like:
- ~/dev/first_project
- ~/dev/second_project
- ~/dev/third_project
- and so on...
Some are rails 2 and others are rails 3 and I use RVM and I use ruby 1.8.7 for all my projects.
When I work for a project I run 'rails s -p 3001' or some开发者_如何学编程thing like that. Now I'm tired of running the command. I want to use passenger with apache but I don't want to add a configuration for each project.
Is there a way that one configuration works for all projects?
For example, first_project.mylocaldomain.com will work with ~/dev/first_project and .rvmrc in the directory. And so on. So the host name will decide which project and which directory.
I hope I explained well.
Thanks.
Sam
37signals recently released Pow; does that do anything cool for you? (Asking because I think it might, but I'm not sure.)
Although Passenger is a great solution to this problem, you will need to install a VirtualHost
entry for each site. This isn't as bad as it sounds if you have a regular structure to your configuration. With a bit of clever scripting you can automatically generate the required files.
A simple alternative is to use the Passenger Preference Pane to help manage your Passenger configuration. This avoids having to fuss around with various configuration files by hand. Adding a new directory is a two step process.
The Pow software from 37signals is a new kind of approach, but it will knock out your regular Apache instance by re-mapping port 80. If you do any other kind of development work, such as PHP sites, this may not work for you.
精彩评论