Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
`bin/setup` script to bootstrap applications. #15189
This is a first draft to collect feedback.
While this script does not perform much work out of the box, the idea is to have a starting point to add your own setup code. Having an automated way to bootstrap your application saves not only time but also serves as verifiable documentation. By default the script does:
To encourage users to modify it, I included some suggestions what you might want to do.
This Gist shows the output of the script for a newly generated application. Database setup fails because there is no schema present.
Re: documenting this convention.
The generated README is a meta-README https://github.com/senny/rails/blob/bin/setup/railties/lib/rails/generators/rails/app/templates/README.rdoc.
READMEs depend so much on the project that I find hard that we can write anything specific and more helpful than that, although if anyone feels inspired and wants to give it a shot please feel free.
That was also why I was skeptical about
The Getting Started guide has a table that explains the project layout. The description about
Also implicitly, if the guide had
added a commit
this pull request
May 30, 2014
May 30, 2014
1 check was pending
referenced this pull request
Mar 15, 2015
The way bin/setup is now written, it creates a fresh start - at least for the database. If you pull new changes to a project you're already working on - you'll have your database droped, recreated and migrated all over again. You'll lose all development data.
Wouldn't it be convenient to have the bin/setup just migrate your database if it already exists?
I'm currently using the following code snippet although i guess there should be a better way to check if the database exists:
system <<-SHELL bin/rake db:migrate:status > /dev/null if [ "$?" = "0" ]; then echo "\n== Migrating database ==" bin/rake db:migrate else echo "\n== Preparing database ==" bin/rake db:setup fi SHELL
Some guys expected to run this once after
P.S. there is a google group where you can discuss such ideas or propositions
If you already have the database setup, then you already have the app
On Wed, Jul 15, 2015 at 2:09 AM, DamirSvrtan email@example.com
I think that's a great idea, Xavier. That's how bin/setup started out for
On Wed, Jul 15, 2015 at 2:49 PM, Xavier Noria firstname.lastname@example.org