Skip to content

Instantly share code, notes, and snippets.

@joncode
Last active December 17, 2015 23:29
Show Gist options
  • Select an option

  • Save joncode/5689030 to your computer and use it in GitHub Desktop.

Select an option

Save joncode/5689030 to your computer and use it in GitHub Desktop.
Deploying a Rails 4 application / with ruby 2 / foundation 4 / secret ENV variable / staging area

basic setup


tasks:

  1. set up rvm gemset environment

    rvm --rvmrc --create 2.0.0@global

  2. run rails new

    rails new mdot

  3. change gemfile to specifically ask for ruby 2.0

    ruby "2.0.0"

  4. add foundation to gemfile

  5. add rails 3 gemsets

    copied gemset from happyer .. foundation && rails 3 gemsets , plus staging gemsets

  6. bundle install and commit

    note group :assets is deprecation, include will-paginate, and httparty

heroku requirements


tasks:

  1. save env secret token variable to each

    remove initializer/secret_token.rb http://daniel.fone.net.nz/blog/2013/05/20/a-better-way-to-manage-the-rails-secret-token/ heroku config:add SECRET_TOKEN=<30- digit character> heroku config:add SECRET_TOKEN=<30- digit character> --remote staging

  2. commit to github

  3. set up production server

    heroku create mdotd heroku config:add SECRET_TOKEN=<30- digit character>

  4. set up staging server

    heroku create --remote staging mdotdev heroku config:add SECRET_TOKEN=<30- digit character> --remote staging

  5. push code to production and staging

code creation


tasks:

  1. run foundation install
>  rails g foundation:install

> , "data-turbolinks-track" => true
  1. add database schema creator
  2. put in error pages if u have them
  3. install kendoMobile

app set up


tasks:

  1. add constants.rb
  2. set page titles for dev, staging, production add to layout
  3. add service routes for environments
@joncode
Copy link
Copy Markdown
Author

joncode commented Apr 11, 2014

get latest stable version of rvm
rvm --version
rvm get stable
:if necessary
rvm cleanup all

fix homebrew

un-install
rm -rf /usr/local/Cellar /usr/local/.git && brew cleanup
re-install
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"

downloads xcode command line tools again

homebrew updated !

brew doctor

remove broken symlinks

brew prune

fix warnings

brew install git or brew upgrade git

Get ruby version 2.1.1
rvm install 2.1.1

Set the default ruby
rvm --default use 2.1.1

Get rvm to use the global gemset for ruby 2.1.1
rvm gemset use global

create the .rvmrc
rvm --rvmrc --create 2.1.1@global

change gemfile to specifically ask for ruby 2.1.1

get rails 4.1.0

gem install rails

get gem updates

bundle update

run tests and fix issues - do not skip !

a lib/dsym/ruby1.9.1 error was received when running heroku tool belt

I re-installed heroku toolbelt - still had error

I rvm installed ruby 1.9.1 - reinatlled heroku tool belt again and it was fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment