These are steps to setup a new project in ROR.
You must configure and install your Gems individually instead of copying the Gemfile from a previous project.
Refer to Heroku setup if you want to push your project to Heroku.
## Setup directory
```sh
# Create directory in ~/workspace
mkdir ./testproject
cd ./testproject
# Create .ruby-version and .ruby-gemset
touch .ruby-version
touch .ruby-gemset
echo ruby-2.0.0 > .ruby-version
echo testproject > .ruby-gemset
# Rails gem will be installed in project gemset
gem install rails --no-rdoc --no-ri
# creates the new ROR project
rails new .
```
## Edit .gitignore
```
# Ignore Rubymine
/.idea
# Ignore mac stupid DS_Store
*.DS_Store
# Ignore VIM swp files
*.swp
*.swo
```
## Edit Gemfile to setup testing
- Note: Install each gem **ONE-BY-ONE** and run their configuration/installer as needed
- Run "bundle install" to install the gem
- **Note: Set the Ruby SDK in Rubymine preference > Ruby SDK and Gem to your project RVM!!**
```ruby
group :development, :test do
gem 'pry'
gem 'pry-plus'
gem 'pry-rails'
gem 'rspec-rails' # After bundle, run: rails generate rspec:install
gem 'better_errors'
gem 'binding_of_caller'
gem 'factory_girl_rails'
gem 'shoulda'
gem 'awesome_print'
gem 'capybara' # add "require 'capybara/rspec'" to spec_helper
gem 'selenium-webdriver'
end
```
## Setup Github locally
```sh
git init .
git add .
git commit -m "Inital Commit"
```
## Setup Github remotely
- Create a new repository at www.github.com
- Get the remote repository link
```sh
git remote add origin <respository_url>
# Push your source to github.com
git push -u origin master
```