ImageHex was an attempt at an art website and the first major product of Noided Media. It failed to find a market fit, unfortunately. While it is still online (for the moment) at ImageHex.com, it is not under active development, and may be taken offline rather soon. Despite being a commercial failure it was quite the learning experience for all involved. We're open-sourcing it in the hopes others can learn from it as well.
Notes:
- You MUST install ImageMagick. Easily accomplished through the package manager of most distros and Homebrew.
- We use a loose form of TDD. Have tests to ensure that your code works, but, if it makes sense to write code first and tests later, do that as well. Use discretion. If you're working here you're smart.
- Push all changes to a branch specifically for the task assigned to you.
The branch should be based off
develop
. When the feature is complete, open a Pull Request to merge back intodevelop
. When we're ready to push up to Heroku, Anthony or Connor will mergedevelop
back intomaster
and push it up. - Set up the DB according to the config file.
- Use
rake documentation
to generate the RDoc documentation.
This tutorial assumes you have some basic understanding of using the Terminal and Git/GitHub. You don't need to be able to hack the Pentagon, but you should know what cd
and ls
do, how to make a branch, and how to submit a pull request on GitHub.
If you don't, check out Codecademy's Command Line course and GitHub's Git tutorial before getting started.
Before starting you'll want to set up Two Factor Authentication on your GitHub account, if you haven't already (you shouldn't have access to this repo if you haven't done that, so I have no idea how you're reading this). This is to protect our source code and other data that may be used to compromise user information.
- Install the Xcode command-line tools with
xcode-select –install
. This'll be necessary to install Homebrew. - Install Homebrew with the following command:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
. - Install RVM.
- Use RVM to install Ruby 2.3.0 (
rvm install ruby-2.3.0
) and then switch to that version of Ruby withrvm use ruby-2.3.0 --default
. - Install Git with
brew install git
, then either use Git from the terminal or the GitHub Desktop app to pull down the ImageHex repository. - Install PostgreSQL 9.4 with
brew install postgresql
. We also recommend using Postgres.app on OS X to get the Postgres server running after the initial setup. - Install ImageMagick with
brew install imagemagick
. - Install Bundler with
gem install bundler
. - In the ImageHex directory (wherever you installed the Git repository), run
bundle install
to install all the relevant gems you'll need for developing ImageHex. This might take a bit of time, be patient! - Run
rake db:setup
to set up the Postgres development server. - If everything has gone right so far, you'll be able to start up a Rails server with
rails s
! - Get working!
You can update packages installed with Homebrew at any time with brew update
and brew upgrade
. You'll likely want to do this once a week, just in case there are security issues in anything you've installed. We recommend using Homebrew as much as possible to install development dependencies, as it makes uninstalling and updating things much easier!
Note: Replace apt-get install
with your distro's equivalent package manager, this uses apt-get
for simplicity's sake.
- Install RVM.
- Use RVM to install Ruby 2.3.0 (
rvm install ruby-2.3.0
) and then switch to that version of Ruby withrvm use ruby-2.3.0 --default
. - Install Git if you need to, then use git from the terminal to pull down the ImageHex repository.
- Install PostgreSQL 9.4 with
apt-get install postgresql
. - Install ImageMagick with
apt-get install imagemagick
. - Install Bundler with
gem install bundler
. - In the ImageHex directory (wherever you installed the Git repository), run
bundle install
to install all the relevant gems you'll need for developing ImageHex. This might take a bit of time, be patient! - Run
rake db:setup
to set up the Postgres development server. - If everything has gone right so far, you'll be able to start up a Rails server with
rails s
! - Get working!
Icon font auto-generation technique courtesy of Scott Nelson's post here.
- Assuming you have Homebrew installed on OS X, run
brew install fontforge ttfautohint
from the terminal.
- If you want to install the prerequisites to FontCustom using other means, you can see the installation instructions in the FontCustom README.
- Add icons as
.svg
files toapp/assets/icons
. - From the terminal, in the base ImageHex directory, run
rake icons:compile
. - The new icon font should be generated and immediately useable, you can add the new icon to the site by using the auto-generated CSS classes. For example, if we take an SVG named
heart.svg
, the css class will beicon-heart
.