Skip to content

Instantly share code, notes, and snippets.

@yoshinari-nomura
Created January 14, 2016 15:22
Show Gist options
  • Select an option

  • Save yoshinari-nomura/3f82d1beec63544c4a58 to your computer and use it in GitHub Desktop.

Select an option

Save yoshinari-nomura/3f82d1beec63544c4a58 to your computer and use it in GitHub Desktop.
Create new rails project with Bundler
#!/bin/sh
APP_NAME="$1"
IGN_MORE="https://raw.github.com/github/gitignore/master/Rails.gitignore"
mkdir "$APP_NAME" && cd "$APP_NAME" || exit 1
bundle init || exit 1
echo 'gem "rails"' >> Gemfile
bundle install --path vendor/bundle && \
bundle exec rails new . -f --skip-bundle # --skip-test-unit
echo "#" >> .gitignore
echo "# Added from $IGN_MORE" >> .gitignore
echo "#" >> .gitignore
curl -L "$IGN_MORE" >> .gitignore
#echo "# RSpec" >> Gemfile
#echo "gem 'rspec-rails', group: [:development, :test]" >> Gemfile
bundle install --path vendor/bundle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment