Skip to content
This repository

Sharetribe is a platform for setting up your own peer-to-peer marketplace online. It's a Ruby on Rails based marketplace CMS. There's also a possibility to set up a hosted marketplace at

Octocat-spinner-32 app Fix checkbox group validation layout April 16, 2014
Octocat-spinner-32 autotest The basic structure for rspec July 05, 2010
Octocat-spinner-32 config Translations April 16, 2014
Octocat-spinner-32 db Rename DropdownValue -> DropdownFieldValue April 15, 2014
Octocat-spinner-32 docs Better guide to get started with testing April 12, 2014
Octocat-spinner-32 features Fix checkbox group test April 16, 2014
Octocat-spinner-32 lib Add comment April 16, 2014
Octocat-spinner-32 log Add log dir to repository as new Thinking-sphinx requires it January 24, 2014
Octocat-spinner-32 public Content type by lowercase extension April 03, 2014
Octocat-spinner-32 script A new badge status is saved to the database using delayed job when a … October 26, 2010
Octocat-spinner-32 spec Amenities in columns April 16, 2014
Octocat-spinner-32 test Multiple listing tests April 08, 2014
Octocat-spinner-32 travis Add bundle exec to travis script April 08, 2014
Octocat-spinner-32 vendor Remove debugging `false` April 14, 2014
Octocat-spinner-32 .coveralls.yml First try on coveralls. March 05, 2014
Octocat-spinner-32 .gitignore New translations and update to gitignore March 12, 2014
Octocat-spinner-32 .rspec Remove spork remove drb December 20, 2013
Octocat-spinner-32 .slugignore Add log dir to repository as new Thinking-sphinx requires it January 24, 2014
Octocat-spinner-32 .travis.yml Update travis to use ruby 2.1.1 April 08, 2014
Octocat-spinner-32 .wti Update WTI and language files September 13, 2012
Octocat-spinner-32 Update March 03, 2014
Octocat-spinner-32 Capfile Deploy now starts sphinx. Scripts not very optimized yet though... August 18, 2010
Octocat-spinner-32 Gemfile Update Sphinx gems April 16, 2014
Octocat-spinner-32 Gemfile.lock Update Sphinx gems April 16, 2014
Octocat-spinner-32 Gruntfile.js Fix JSHint April 03, 2014
Octocat-spinner-32 Guardfile CSS style for table March 01, 2014
Octocat-spinner-32 LICENSE Remove prettyPhoto March 16, 2014
Octocat-spinner-32 Procfile Test running on unicorn in heroku September 29, 2012
Octocat-spinner-32 Update README Ruby versions April 11, 2014
Octocat-spinner-32 Version 4.5.1 [skip ci] April 16, 2014
Octocat-spinner-32 Rakefile A new badge status is saved to the database using delayed job when a … October 26, 2010
Octocat-spinner-32 VERSION Version 4.5.1 [skip ci] April 16, 2014
Octocat-spinner-32 Use Rack Deflater January 13, 2014
Octocat-spinner-32 custom_plan.rb Faster Zeus rspec startup March 26, 2014
Octocat-spinner-32 package.json Add JS testing/linting to Travis March 07, 2014
Octocat-spinner-32 zeus.json Try zeus December 19, 2013


Build Status Dependency Status Code Climate Coverage Status

Sharetribe is a peer-to-peer marketplace platform built with Ruby on Rails.

See for more info and links to example communities

NOTE: The open source community of Sharetribe is still young and some things like installation may not yet be the smoothest you've encountered. However, we're eager to welcome new people to use the open source Sharetribe, and if you decide to install it yourself, feel free to ask for support at the Sharetribe Developers Flowdock


NOTE: If you try installing and encounter problems, please report them for example in Issues or at Flowdock. We try to help you and enhance the documentation.

Below the installation instructions there is space for Operating system-specific tips, so if you have problems, check there, and if you get your problem solved, add instructions to the tips section.

  • Before you get started, you need to have or install the following:
    • Ruby (we use currently version 2.1.1 and don't guarantee everything working with others. If you need multiple versions of Ruby, RVM can help.)
    • RubyGems
    • Bundler gem install bundler
    • Git
  • Get the code (git clone is probably easiest way: git clone git://
  • Go to the root folder of Sharetribe
  • Copy the example database configuration file as database.yml, which will be used to read the database information: cp config/database.example.yml config/database.yml
  • You need to have a database available for Sharetribe and a DB user account that has access to it. We have only used MySQL, so we give no guarantees of things working with others (e.g. PostgreSQL). (If you are going to do development you should have separate databases for development and testing also).
  • Edit details according to your database to config/database.yml (if you are not going to develop Sharetribe, it's enough to fill in the production database)
    • Probably you only need to change the passwords to the same that you used when creating the databases.
  • Copy the example configuration file as config.yml, which will be used to read the Sharetribe configuration information: cp config/config.example.yml config/config.yml
  • Edit details according to your system configuration to config/config.yml.
  • If you are planning to run Sharetribe in production mode on your local machine (without Apache or similar server in front) you'll need to set the value of serve_static_assets_in_production to true (to make images and CSS files show correctly). Otherwise leave it as it is.
  • Install Sphinx. Version 2.1.4 has been used successfully, but probably also bit newer and older versions will work. See Sphinx installation instructions (no need to start it yet. You can try running searchd command, but it should fail at this point complaining about missing config)
  • Install Imagemagick
  • run bundle install in the project root directory (sharetribe) to install required gems
  • (In the following commands, leave out the RAILS_ENV=production part if you want to get Sharetribe running in development mode.) Load the database structure to your database: rake RAILS_ENV=production db:structure:load
  • run sphinx index rake RAILS_ENV=production ts:index
  • start sphinx daemon rake RAILS_ENV=production ts:start
  • If you want to run Sharetribe in production mode (i.e. you are not developing the software) you'll need to precompile the assets. This puts the Javascript and CSS files in right places. Use command: rake assets:precompile
  • If you want to enable Sharetribe to send email locally (in the development environment), you might want to change the email settings in the config file. There is an example of configuring settings using a gmail account, but you can also use any other SMTP server. If you do not touch the settings, the development version works otherwise normally but might crash in instances where it tries to send email (like when sending a message to another user).
  • Invoke the delayed job worker on your local machine: rake RAILS_ENV=production jobs:work. The worker processes tasks that are done in the background, like processing images and sending email notifications.
  • Start the server. The simplest way is to use command rails server which will start it on Webrick, which is good option for development use.
    • To start the server in production environment, use command rails server -e production
  • Sharetribe server can serve multiple Sharetribe marketplaces (tribes) that are separated by subdomains. You need at least one community to use Sharetribe. To create a community and add some default transaction type and category there, start the Rails Console: rails console production and choose the name and subdomain for your community and insert them in the following commands:
c = Community.create(:name => "your_chosen_name_here", :domain => "your_chosen_subdomain_here")

tt = c.transaction_types.create(:type => "Sell",
 :price_field => 1,
 :price_quantity_placeholder => nil);

tt_trans = TransactionTypeTranslation.create(:transaction_type_id =>,
 :locale => "en",
 :name => "Sell",
 :action_button_label => "Buy");
ca = c.categories.create;
ca_trans = CategoryTranslation.create(:category_id =>,
 :locale => "en",
  :name => "Items");
CategoryTransactionType.create(:category_id =>, :transaction_type_id =>

  • go to your selected community address ( or and register as a user. The first registered user will be automatically made as an admin in that community.

Tips for different platforms and OS


  • The core team is doing development on macs and running servers on linux, so we don't have experience on running Sharetribe on Windows. It is possible, but with guidance you might have to rely on the community support.
  • Note that the installation instructions on this page are written for *nix-based systems so you need to change the commands a little to make them work in windows (e.g. cp becomes copy in Windows)
  • You may need to add few windows specific gems to Gemfile. Versions prior to 2.3.0 included these, but because they caused trouble running Sharetribe on Heroku, we decided to remove them from the default Gemfile. You can just add these lines to Gemfile and run bundle install.
gem 'win32console', :platforms => [:mswin, :mingw]
gem 'win32-process', :platforms => [:mswin, :mingw]

Mac Os X

  • If you are using MySQL, please note that Mac OS X 10.6 requires a 64-bit version of MySQL.
  • RVM requires both Xcode and Command Line Tools for Xcode to be installed
    • Install Xcode from App Store
    • To install Command Line Tools for Xcode, open Xcode and from the application menu, select Xcode > Open Developer Tools > More Developer Tools...

Ubuntu (and Linux in general)

  • If, during precompile, you face an error like Could not find a JavaScript runtime. See for a list of available runtimes., you have to install nodejs. Execute sudo apt-get install nodejs and run precompile again.

  • These are the bash commands I used to install Sharetribe on a fresh Ubuntu 12.10 box:

- sudo aptitude install ruby2.1.1
- sudo gem install bundler
- sudo aptitude install git
- git clone git://
- cd sharetribe
- cp config/database.example.yml config/database.yml
- sudo aptitude install mysql-server-5.5
- sudo mysql_secure_installation
- <execute 2 production SQL commands>
- emacs config/database.yml
    - edit the pw of "sharetribe_production"
- cp config/config.example.yml config/config.yml
- emacs config/config.yml
    - check all once
    - don't forget serve_static_assets_in_production = true (if not using Apache?)
- sudo aptitude install sphinxsearch
- sudo aptitude install imagemagick
- sudo aptitude install build-essential mysql-client libmysql-ruby libmysqlclient-dev
- sudo gem install mysql2 -v 0.2.7
- sudo aptitude install libxml2-dev libxslt-dev
- emacs Gemfile.lock
    - change money-rails (0.8.0) to money-rails (0.8.1)
- bundle install
- rake RAILS_ENV=production db:structure:load
- (note: if you ever want to uninstall all ruby gems)
    - sudo su
    - gem list | cut -d" " -f1 | xargs gem uninstall -aIx
- sudo aptitude install nodejs
- rake RAILS_ENV=production db:seed
- rake RAILS_ENV=production thinking_sphinx:index
- rake RAILS_ENV=production thinking_sphinx:start
- emacs app/assets/stylesheets/application.scss.erb
    - prepend this to the <% %> block at the top:
        require "#{Rails.root}/app/helpers/scss_helper.rb"
- rake assets:precompile
- to enable logs in production (Passenger+Apache)
    - emacs config/application.rb
    - comment out the lines:
        if Rails.env.production? || Rails.env.staging?
            config.logger =
            config.logger.level = Logger.const_get(ENV['LOG_LEVEL'] ? ENV['LOG_LEVEL'].upcase : 'INFO')
- emacs app/views/layouts/application.haml
    - delete the last include IE9 javascript imports
- sudo aptitude install apache2 libapache2-mod-passenger
- sudo gem install passenger
- edit the apache site config file
- rake RAILS_ENV=production jobs:work


See for information about what has changed and if special tasks are needed to update.


See for general contributing guide lines.

Known issues

See and please report any issues you find

Developer docs

MIT License

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

Something went wrong with that request. Please try again.