Skip to content

Hobo/hobocookbook

 
 

Repository files navigation

# Hobo Cookbook!

This is the open-source code that implements the site at http://cookbook.hobocentral.net

# How to run locally

The cookbook does not run under Ruby 1.9.2, it requires Ruby 1.8.7.
This should be easy to fix if anybody wants to take a crack at it.

We're using Vlad for deployment, but it messes with our rake tasks at
other times, so the first step is to comment out the call to Vlad.load
in Rakefile.

As for many rails3 apps:

    $ git submodule update --init
    $ bundle install
    $ vi config/database.yml  # and adjust as required
    $ bundle exec rake db:migrate

Unique to the cookbook:

    $ pwd > git-path
    $ echo 'master' > git-version

Run this command now and whenever you want to update/rebuild any of the external dependencies such as hobo, the plugins or the tutorials.

    $ bundle exec rake cookbook:update


# How to update the Agility Tutorial

The Agility tutorial is a Gitorial, a git based tutorial build with stacked git. These are the steps to edit the tutorial:

* Clone https://github.com/Hobo/agility-gitorial-patches
* Follow the steps from the Readme in https://github.com/Hobo/agility-gitorial-patches to edit the patches
* Make a commit to Hobo/agility-gitorial-patches
* Overwrite history in Hobo/agility-gitorial:

    cd agility-gitorial
    git remote add origin git@github.com:Hobo/agility-gitorial.git
    gitorial-bulk-tag # Download from here: https://github.com/bryanlarsen/gitorial-tools/blob/master/gitorial-bulk-tag
    git push origin --force
    git push --tags origin --force

* Clone this repository and build the contents: https://github.com/Hobo/agility-gitorial-patches. (A new copy is recommended)

    git clone git@github.com:Hobo/hobocookbook
    cd hobocookbook
    bundle
    bundle exec rake db:migrate
    git submodule update --init
    pwd > git-path
    echo 'master' > git-version
    bundle exec rake cookbook:update
    bundle exec rails s

* Go to http://localhost:3000 and check that the tutorial has been updated successfully

* Edit gitorials/agility.markdown and remove the last sections, starting with "Unit Testing". This is because a bug in Kramdown and Ruby 1.8.7: it breaks with files which are too long. In the future we'll divide the tutorial into different sections.

* Push the changes to Github and update the production server

    git add gitorials/agility.markdown
    git push origin master
    bundle exec rake vlad:update && bundle exec rake vlad:start_app # you need admin privileges for this :)



About

A place to request and post recipes - how-to guides for useing the Hobo framework for Rails

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 88.5%
  • JavaScript 9.4%
  • CSS 2.1%