<commit_before># Ruby #

# If you have not run kochiku on the machine you'll need to setup the rake wrapper for kochiku

    rvm wrapper ruby-2.0.0-p195 kochiku rake

# If you are upgrading the ruby version you should should first install it and populate the bundle

    rvm install <new-version>
    cd ~/kochiku/current
    rvm use <new-version>
    bundle

# Then recreate the kochiku_rake rvm wrapper and restart the resque workers one at a time

    rm ~/.rvm/bin/kochiku_rake
    rvm wrapper <new-version> kochiku rake

    launchctl unload ~/Library/LaunchAgents/com.squareup.kochiku-worker-1.plist
    launchctl load ~/Library/LaunchAgents/com.squareup.kochiku-worker-1.plist
    #<repeat for all workers>

# and make sure they restart correctly.  Then follow the steps to install the passenger gem for the new ruby version below



# Nginx #

## How to upgrade passenger and nginx

# Download the nginx version to be installed

    cd /Users/square
    curl http://nginx.org/download/nginx-1.5.0.tar.gz | tar xvz

# Install the passenger gem

    $ cd ~/kochiku/current
    $ gem install passenger -v 4.0.1
    $ which passenger-install-nginx-module
    # => /Users/square/.rvm/gems/ruby-2.0.0-p195/bin/passenger-install-nginx-module

Run the passenger nginx install

    rvmsudo passenger-install-nginx-module<commit_msg>udpate doc for passenger 4.0.5<commit_after># Ruby #

# If you have not run kochiku on the machine you'll need to setup the rake wrapper for kochiku

    rvm wrapper ruby-2.0.0-p195 kochiku rake

# If you are upgrading the ruby version you should should first install it and populate the bundle

    rvm install <new-version>
    cd ~/kochiku/current
    rvm use <new-version>
    bundle

# Then recreate the kochiku_rake rvm wrapper and restart the resque workers one at a time

    rm ~/.rvm/bin/kochiku_rake
    rvm wrapper <new-version> kochiku rake

    launchctl unload ~/Library/LaunchAgents/com.squareup.kochiku-worker-1.plist
    launchctl load ~/Library/LaunchAgents/com.squareup.kochiku-worker-1.plist
    #<repeat for all workers>

# and make sure they restart correctly.  Then follow the steps to install the passenger gem for the new ruby version below



# Nginx #

## How to upgrade passenger and nginx

# Download the nginx version to be installed

    cd /Users/square
    curl http://nginx.org/download/nginx-1.5.0.tar.gz | tar xvz

# Install the passenger gem

    $ cd ~/kochiku/current
    $ gem install passenger -v 4.0.5
    $ which passenger-install-nginx-module
    # => /Users/square/.rvm/gems/ruby-2.0.0-p195/bin/passenger-install-nginx-module

Run the passenger nginx install

    rvmsudo passenger-install-nginx-module
{'fraction_non_alphanumeric': 0.07988055244494215, 'fraction_numerical': 0.01605076521089959, 'mean_word_length': 3.207221350078493, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2619469', 'n_tokens_mistral': 908, 'n_tokens_neox': 846, 'n_words': 293}