Skip to content

Instantly share code, notes, and snippets.

@sionc
Last active April 6, 2020 17:35

Revisions

  1. sionc revised this gist Jan 28, 2014. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions rails-postgres-backbone-bootstrap-bootswatch
    Original file line number Diff line number Diff line change
    @@ -63,3 +63,7 @@ $ git commit -m "[Setup] first commit"
    $ git remote add origin git@github.com:sionc/myapp.git
    $ git push -u origin master

    - Fix SSL errors by using the following command
    $ curl -fsSL curl.haxx.se/ca/cacert.pem \
    -o "$(ruby -ropenssl -e 'puts OpenSSL::X509::DEFAULT_CERT_FILE')"

  2. sionc revised this gist Jan 25, 2014. 1 changed file with 24 additions and 1 deletion.
    25 changes: 24 additions & 1 deletion rails-postgres-backbone-bootstrap-bootswatch
    Original file line number Diff line number Diff line change
    @@ -33,10 +33,33 @@ $ createdb -Omyapp -Eunicode myapp_production
    - Test the rails server
    $ rails s

    - Append the following lines to the Gemfile
    # Use rspec as the testing framework
    group :development, :test do
    gem 'rspec-rails', '~> 3.0.0.beta'
    end

    - Install rspec
    $ bundle install
    $ rails generate rspec:install
    Then, delete the test folder in rails.

    - Create a binstub for the rspec command
    $ bundle binstubs rspec-core

    - Check if you can run rspec
    $ rspec

    - Initialize a git repository
    $ git init

    - Append .DS_Store to gitignore
    - Append .DS_Store to gitignore if you are using a Mac
    # Ignore files containing MAC folder attributes
    .DS_Store

    - Create a new repository on github and follow the 'create repository' instructions
    $ git add .
    $ git commit -m "[Setup] first commit"
    $ git remote add origin git@github.com:sionc/myapp.git
    $ git push -u origin master

  3. sionc created this gist Jan 23, 2014.
    42 changes: 42 additions & 0 deletions rails-postgres-backbone-bootstrap-bootswatch
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,42 @@
    - Check rails version
    $ rails -v

    - To update rails
    $ gem update rails

    - Creating a new rails app using postgresql
    $ mkdir rails_projects
    $ cd rails_projects
    $ rails new myapp --database=postgresql
    $ cd myapp

    - Update Gemfile to include the correct ruby version on the top
    source 'https://rubygems.org'
    ruby '2.0.0'

    - Run bundle install
    $ bundle update
    $ bundle install

    - Update the passwords in the config/database.yml file
    username: myapp
    password: password

    - Create a user in postgresql
    $ createuser myapp

    - Create test, development and production databases
    $ createdb -Omyapp -Eunicode myapp_development
    $ createdb -Omyapp -Eunicode myapp_test
    $ createdb -Omyapp -Eunicode myapp_production

    - Test the rails server
    $ rails s

    - Initialize a git repository
    $ git init

    - Append .DS_Store to gitignore
    # Ignore files containing MAC folder attributes
    .DS_Store