Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Open source marketplace platform
Ruby HTML JavaScript Cucumber CSS Shell
Branch: master
Failed to load latest commit information.
app Fixes Google Analytics script to use better method to drop subdomain
autotest The basic structure for rspec
config new translations [skip ci]
db some generated changes since privacy field has been added to listing
docs Remove transaction_type -> listing_shape
features Remove unused visibility
lib Remove script that checks pending migrations on Heroku
log Add log dir to repository as new Thinking-sphinx requires it
public Merge pull request #952 from sharetribe/cleanup-error-pages
script Script to find blacklisted usernames
spec Split export of users and transactions behind different feature flags
test Specify email addresses for Person models created when Zeus loads ini…
travis Remove structure, add schema
vendor/assets Use selectize to display the languages, some styling.
.coveralls.yml First try on coveralls.
.dockerignore Dockerfile
.gitignore Use Vagrant to setup NFS share
.pryrc Add .pryrc to add console helpers and methods to zeus console.
.rspec Remove spork remove drb
.rubocop.yml Disable WordArray cop
.slugignore Add log dir to repository as new Thinking-sphinx requires it
.travis.yml Build only master branch pushes
.wti Update WTI and language files Content tweaks
Capfile Deploy now starts sphinx. Scripts not very optimized yet though...
Dockerfile Clean Dockerfile
Gemfile Use Phusion Passenger
Gemfile.lock Remove "BUNDLED WITH" row
Gruntfile.js Search for Dashboard and remove everything
Guardfile Update guard file Clarify copy Content tweaks
LICENSE Update license copyright years
Procfile Max pool size to ENV Add db migration instructions Version 4.5.5
Rakefile A new badge status is saved to the database using delayed job when a … Add a technical roadmap document
VERSION Version 4.5.5
Vagrantfile Improve Docker/Fig setup Revert "Disable deflater"
custom_plan.rb Do not use fixture data for RSpec tests
fig.yml Add zeus service to fig
package.json Add JS testing/linting to Travis
rubocop-todo.yml Allow longer classes [skip ci]
zeus.json Try zeus


Build Status Dependency Status Code Climate Coverage Status

Sharetribe is an open source platform to create your own peer-to-peer marketplace.

Would you like to set up your marketplace in one minute without touching code? Head to

Want to get in touch? Email



Note: If you encounter problems with the installation, ask for help from the developer community in our developer chatroom. When you join, please use threads. Instructions for this and other chat-related things can be found at Flowdock's chat instructions.


Before you get started, the following needs to be installed:

  • Ruby. Version 2.1.2 is currently used and we don't guarantee everything works with other versions. If you need multiple versions of Ruby, RVM is recommended.
  • RubyGems
  • Bundler: gem install bundler
  • Git
  • A database. Only MySQL has been tested, so we give no guarantees that other databases (e.g. PostgreSQL) work. You can install MySQL Community Server two ways:
    1. If you are on a Mac, use homebrew: brew install mysql (highly recommended). Also consider installing the MySQL Preference Pane to control MySQL startup and shutdown. It is packaged with the MySQL downloadable installer, but can be easily installed as a stand-alone.
    2. Download a MySQL installer from here
  • Sphinx. Version 2.1.4 has been used successfully, but newer versions should work as well. Make sure to enable MySQL support. If you're using OS X and have Homebrew installed, install it with brew install sphinx --with-mysql
  • Imagemagick. If you're using OS X and have Homebrew installed, install it with brew install imagemagick

Setting up the development environment

  1. Get the code. Cloning this git repo is probably easiest way:

    git clone git://
  2. Navigate to the Sharetribe project root directory.

  3. Create a database.yml file by copying the example database configuration:

    cp config/database.example.yml config/database.yml
  4. Create the required databases with these commands.

  5. Add your database configuration details to config/database.yml. You will probably only need to fill in the password for the database(s).
  6. Install the required gems by running the following command in the project root directory:

    bundle install
  7. Initialize your database:

    bundle exec rake db:schema:load
  8. Run Sphinx index:

    bundle exec rake ts:index
  9. Stat the Sphinx daemon:

    bundle exec rake ts:start
  10. Use Mailcatcher to receive sent emails locally:

    1. Install Mailcatcher:

      gem install mailcatcher
    2. Start it:

    3. Create a config/config.yml file and add the following lines to it:

        mail_delivery_method: smtp
        smtp_email_address: "localhost"
        smtp_email_port: 1025
    4. Open http://localhost:1080 in your browser

  11. Invoke the delayed job worker:

    bundle exec rake jobs:work
  12. In a new console, open the project root folder and start the server. The simplest way is to use the included Webrick server:

    bundle exec rails server

Congratulations! Sharetribe should now be up and running for development purposes. Open a browser and go to the server URL (e.g. Fill in the form to create a new marketplace and admin user. You should be now able to access your marketplace and modify it from the admin area.

Database migrations

To update your local database schema to the newest version, run database migrations with:

  bundle exec rake db:migrate

Running tests

Tests are handled by RSpec for unit tests and Cucumber for acceptance tests.

  1. Navigate to the root directory of the sharetribe project
  2. Initialize your test database:

    bundle exec rake test:prepare

    This needs to be rerun whenever you make changes to your database schema.

  3. If Zeus isn't running, start it:

    zeus start
  4. To run unit tests, open another terminal and run:

    zeus rspec spec
  5. To run acceptance tests, open another terminal and run:

    zeus cucumber

    Note that running acceptance tests is slow and may take a long time to complete.

To automatically run unit tests when code is changed, start Guard:

  bundle exec guard

Setting up Sharetribe for production

Before starting these steps, perform steps 1-6 from above.

  1. Initialize your database:

    bundle exec rake RAILS_ENV=production db:schema:load
  2. Run Sphinx index:

    bundle exec rake RAILS_ENV=production ts:index
  3. Start the Sphinx daemon:

    bundle exec rake RAILS_ENV=production ts:start
  4. Precompile the assets:

    bundle exec rake assets:precompile
  5. Invoke the delayed job worker:

    bundle exec rake RAILS_ENV=production jobs:work
  6. In a new console, open the project root folder and start the server:

    bundle exec rails server -e production

The built-in WEBrick server (which was started in the last step above) should not be used in production due to performance reasons. A dedicated HTTP server such as unicorn is recommended.

It is also not recommended to serve static assets from a Rails server in production. Instead, you should serve assets from Amazon S3 or use an Apache/Nginx server. In this case, you'll need to set the value of serve_static_assets_in_production to false in config/config.yml.

Setting your domain

  1. In your database, change the value of the domain column in the communities table to match the hostname of your domain. For example, if the URL for your marketplace is, then the domain is

  2. Change the value of the use_domain column to true (or 1) in the communities table.

Advanced settings

Default configuration settings are stored in config/config.default.yml. If you need to change these, we recommend creating a config/config.yml file to override these values. You can also set configuration values to environment variables.

Unofficial installation instructions

Use these instructions to set up and deploy Sharetribe for production in different environments. They have been put together by the developer community, and are not officially maintained by the Sharetribe core team. The instructions might be somewhat out of date.

If you have installation instructions that you would like to share, don't hesitate to contact the team.


Sharetribe's open source version supports payments using Braintree Marketplace. To enable payments with Braintree, you need to have a legal business in the United States. You can sign up for Braintree here. Once that's done, create a new row in the payment gateways table with your Braintree merchant_id, master_merchant_id, public_key, private_key and client_side_encryption_key.

PayPal payments are only available on marketplaces hosted at due to special permissions needed from PayPal. We hope to add support for PayPal payments to the open source version of Sharetribe in the future.


See release notes for information about what has changed and if actions are needed to upgrade.

Technical roadmap

For a better high-level understanding of what the Sharetribe core team is working on currently and what it plans to work on next, read the technical roadmap.


Would you like to make Sharetribe better? Follow these steps.


Sharetribe uses WebTranslateIt (WTI) for translations. If you'd like to translate Sharetribe to your language or improve existing translations, please ask for a WTI invitation. To get an invite, send an email to and mention that you would like to become a translator.

All language additions and modifications (except for English) should be done through the WTI tool. We do not accept Pull Requests that add or modify languages (except English).

Known issues

Browse open issues and submit new ones at

Developer documentation

MIT License

Sharetribe is open source under the MIT license. See LICENSE for details.

Something went wrong with that request. Please try again.