Rails application installer
I am making a rails cms and I have wondered if there is a plugin or script, which automatically installs the 开发者_StackOverflow社区application?
Thanks!
Just write a capistrano recipe for it. You can even remotely install the application, or, install in batch on different servers, or, update QA/ staging/ production, run auto tests, do a lot of linux console work, and so on...
Its good. Check it out. http://capistranorb.com
update: capistrano link updated
Simple answer. no.
You have to write such a wizard on your own.
You know the drill ... check for a custom config file, if it doesn't see one, run a rake task to create the database tables, install gems etc.
Good luck.
Rails isn't an application. It's a framework. You can't "auto-install" it. You must define all your dependencies by yourself.
There are some shortcuts however. To create a new application for example, you can do in command line :
rails my_new_app
Then you'll have to start coding it. Take a look at the rails guides if that's where you don't know what to do.
If what you're looking for is an easy to install Rails CMS, you could take a look at radiant which does that.
Something like Capistrano, although not an installer or packager, does greatly simplify deploying a Rails application from your development environment onto your hosting server.
Are you trying to deploy this app to a production server, or to a clients PC?
If you want a windows style installer, there isn't really much available as rails isn't designed to run that way. You can, however, still do it. My recommendation would be using NSIS with some custom batch scripts in that case.
Download some open source Rails apps and have a look at their install scripts. I looked at Fat Free CRM for inspiration and found it useful.
Your users will need to specify their database type, username, and password; create the database and migrate it or load the schema; install any gems required in config/environment.rb
; specify their webserver setup and more.
Writing your own rake task is a nice way to bundle this stuff into as few commands as possible, and should be ok to run on any platform.
精彩评论