Mercurial > rsstweet
comparison bin/setup @ 42:97a6973e9d94
Reset default scripts.
Done with `rake rails:update:bin`.
| author | edogawaconan <me@myconan.net> |
|---|---|
| date | Thu, 11 Dec 2014 16:05:12 +0900 |
| parents | |
| children | 541427960031 |
comparison
equal
deleted
inserted
replaced
| 41:d76324184cc7 | 42:97a6973e9d94 |
|---|---|
| 1 #!/usr/bin/env ruby | |
| 2 require 'pathname' | |
| 3 | |
| 4 # path to your application root. | |
| 5 APP_ROOT = Pathname.new File.expand_path('../../', __FILE__) | |
| 6 | |
| 7 Dir.chdir APP_ROOT do | |
| 8 # This script is a starting point to setup your application. | |
| 9 # Add necessary setup steps to this file: | |
| 10 | |
| 11 puts "== Installing dependencies ==" | |
| 12 system "gem install bundler --conservative" | |
| 13 system "bundle check || bundle install" | |
| 14 | |
| 15 # puts "\n== Copying sample files ==" | |
| 16 # unless File.exist?("config/database.yml") | |
| 17 # system "cp config/database.yml.sample config/database.yml" | |
| 18 # end | |
| 19 | |
| 20 puts "\n== Preparing database ==" | |
| 21 system "bin/rake db:setup" | |
| 22 | |
| 23 puts "\n== Removing old logs and tempfiles ==" | |
| 24 system "rm -f log/*" | |
| 25 system "rm -rf tmp/cache" | |
| 26 | |
| 27 puts "\n== Restarting application server ==" | |
| 28 system "touch tmp/restart.txt" | |
| 29 end |
