Skip to content

Instantly share code, notes, and snippets.

@Zren
Last active August 29, 2015 14:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Zren/c950a03671e15eb0b98f to your computer and use it in GitHub Desktop.
Save Zren/c950a03671e15eb0b98f to your computer and use it in GitHub Desktop.

GreasyFork

Install

Linux

sudo apt-get ruby libmysqlclient-dev libsqlite3-dev mysql-server-5.6
gem install bundler
sudo gem install therubyracer
sudo gem install libv8
bundle install
sudo gem install rack
  • Rename config/database.example.yml to config/database.yml and edit the values there in. Note that SQLite is not supported as one of the queries uses ALTER TABLE ... ADD CONSTRAINT.

  • Run rackup, it should error with ``raise_no_secret_key': Devise.secret_key was not set. Please add the following to your Devise initializer`.

  • Rename config/initializers/devise.examples.rb to config/initializers/devise.rb and add the config.secret_key = '' line from the previous step into it. Look for # config.secret_key for placement (it should be at the top).

  • Rename config/initializers/secret_key.examples.rb to config/initializers/secret_key.rb and set a new secret key inside it.

    rackup

  • GreasyFork should now be running on http://localhost:9292

  • You will get errors because we haven't populated the database. Run ... bin/rake db:migrate RAILS_ENV=development ?

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