Skip to content

brightbit/guides

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 

Repository files navigation

Brightbit Handbook

Ruby

Installation

echo "Updating brew ...";
brew update
echo "Removing old versions of Ruby ..."
brew rm -f ruby
echo "Tapping old homebrew formuals ..."
brew tap homebrew/versions
echo "Installing Ruby 1.9.3 ..."
$(brew versions ruby | grep 1.9.3-p392 | cut -d\  -f2-)
brew install ruby
echo "Installing Ruby 2.0.0, which will be the default ..."
brew unlink ruby
$(brew versions ruby | grep 2.0.0-p0 | cut -d\  -f2-)
brew install ruby

echo "Update to latest Rubygems version ..."
/usr/local/Cellar/ruby/1.9.3-p392/bin/gem update --system
/usr/local/Cellar/ruby/2.0.0-p0/bin/gem update --system
echo "Installing critical Ruby gems for Rails development ..."
/usr/local/Cellar/ruby/1.9.3-p392/bin/gem install bundler foreman pg rails --no-ri --no-rdoc -f
/usr/local/Cellar/ruby/2.0.0-p0/bin/gem install bundler foreman pg rails --no-ri --no-rdoc -f
echo "Installing GitHub CLI client ..."
/usr/local/Cellar/ruby/1.9.3-p392/bin/gem install hub --no-ri --no-rdoc -f
/usr/local/Cellar/ruby/2.0.0-p0/bin/gem install hub --no-ri --no-rdoc -f

You'll also need to add $(cd $(which gem)/..;pwd) to your PATH in .zshenv or other sourced file.

Note: brew cleanup deletes old versions -- don't run it!

Switching versions

ruby -v
brew switch ruby 1.9.3-p392
ruby -v
brew switch ruby 2.0.0-p0

Note: For gem bins to work, you'll need to restart your shell

Rails

Styleguide

Refer to bbatsov’s rails-style-guide

CoffeeScript

Styleguide

Follow polarmobile’s coffeescript-style-guide

Javascript

Styleguide

Rule 1: Write all new Javascript in CoffeeScript.

Rule 2: If you must write or maintain Javascript, follow idiomatic.js

TODO: Adapt this into a more brief set of guidelines; or find a more succinct version to include by reference.

CSS

#TODO

HTML Templates

For Ruby & Rails projects, follow the Rails styleguide #TODO

PHP

#TODO

About

The Brightbit Handbook, such as it is

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published