#!/bin/bash
set -e # stop the script as soon as an error occurs
echo "--- Making sure bundler is installed"
gem which bundler &> /dev/null || gem install bundler --no-ri --no-rdoc
echo "--- Installing gems"
bundle check || bundle install
echo "--- Setting up the database"
bundle exec rake db:setup db:test:prepare
echo "--- Running tests to see if everying installed correctly"
bundle exec rspec spec
bundle exec cucumber features --profile all
echo "--- Everything installed correctly!"
echo "--- Run `rails server` to start the server!"
I always make bash scripts to install and update my Rails projects.
So I might have this ./script/install script:
#!/bin/bash
set -e # stop the script as soon as an error occurs
echo "--- Making sure bundler is installed"
gem which bundler &> /dev/null || gem install bundler --no-ri --no-rdoc
echo "--- Installing gems"
bundle check || bundle install
echo "--- Setting up the database"
bundle exec rake db:setup db:test:prepare
echo "--- Running tests to see if everying installed correctly"
bundle exec rspec spec
bundle exec cucumber features --profile all
echo "--- Everything installed correctly!"
echo "--- Run `rails server` to start the server!"
发布评论
评论(2)
我总是制作 bash 脚本来安装和更新我的 Rails 项目。
所以我可能有这个
./script/install
脚本:I always make bash scripts to install and update my Rails projects.
So I might have this
./script/install
script:最难的部分确实是 vagrant 的开发环境。
你在 vagrant 中设置了所有内容,然后他下载了它,然后就完成了。
他完成了:
http://railscasts.com/episodes/292-virtual-machines -with-vagrant
The hardest part is really the development environment for such there is vagrant.
You setup everything in vagrant, then he downloads it, and does.
he is done:
http://railscasts.com/episodes/292-virtual-machines-with-vagrant