-
Notifications
You must be signed in to change notification settings - Fork 22.1k
bin/setup script to bootstrap applications.
#15189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| require 'pathname' | ||
|
|
||
| # path to your application root. | ||
| APP_ROOT = Pathname.new File.expand_path('../../', __FILE__) | ||
|
|
||
| Dir.chdir APP_ROOT do | ||
| # This script is a starting point to setup your application. | ||
| # Add necessary setup steps to this file: | ||
|
|
||
| puts "== Installing dependencies ==" | ||
| system "gem install bundler --conservative" | ||
| system "bundle install" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. would be worth change this to
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 will update.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wonder why doesn't
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
|
||
| # puts "\n== Copying sample files ==" | ||
| # unless File.exists?("config/database.yml") | ||
| # system "cp config/database.yml.sample config/database.yml" | ||
| # end | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why do we wanna include this? at least the apps I worked with 10% of them needed to copy a
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's commented out as a suggestion. We have some projects where this is needed.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Actually, I’d kill this. We have the secrets.yml now. So everyone is supposed to checkin database.yml. On May 22, 2014, at 5:45 PM, Yves Senn notifications@github.com wrote:
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Copying sample files is not directly related to
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We could change this to copy a sample of
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I’d like to see a realistic example before we include it. On May 22, 2014, at 6:00 PM, Lucas Mazza notifications@github.com wrote:
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
|
||
| puts "\n== Preparing database ==" | ||
| system "bin/rake db:setup" | ||
|
|
||
| puts "\n== Removing old logs and tempfiles ==" | ||
| system "rm -f log/*" | ||
| system "rm -rf tmp/cache" | ||
|
|
||
| puts "\n== Restarting application server ==" | ||
| system "touch tmp/restart.txt" | ||
| end | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,6 +21,7 @@ | |
| bin/bundle | ||
| bin/rails | ||
| bin/rake | ||
| bin/setup | ||
| config/environments | ||
| config/initializers | ||
| config/locales | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before even this, we should install bundler.