Sharetribe is a peer-to-peer marketplace platform built with Ruby on Rails.
See www.sharetribe.com 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
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:
- Get the code (git clone is probably easiest way:
git clone git://github.com/sharetribe/sharetribe.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
- 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
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
searchdcommand, but it should fail at this point complaining about missing config)
- Install Imagemagick
bundle installin the project root directory (sharetribe) to install required gems
- (In the following commands, leave out the
RAILS_ENV=productionpart 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 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 serverwhich 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
- To start the server in production environment, use command
- 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 productionand 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 => tt.id, :locale => "en", :name => "Sell", :action_button_label => "Buy"); ca = c.categories.create; ca_trans = CategoryTranslation.create(:category_id => ca.id, :locale => "en", :name => "Items"); CategoryTransactionType.create(:category_id => ca.id, :transaction_type_id => tt.id)
- go to your selected community address (your_chosen_subdomain_here.yourdomain.com or your_chosen_subdomain_here.lvh.me:3000) and register as a user. The first registered user will be automatically made as an admin in that community.
- 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.
- 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
gem 'win32console', :platforms => [:mswin, :mingw] gem 'win32-process', :platforms => [:mswin, :mingw]
- 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...
If, during precompile, you face an error like
sudo apt-get install nodejsand run precompile again.
These are the bash commands I used to install Sharetribe on a fresh Ubuntu 12.10 box:
See RELEASE_NOTES.md for information about what has changed and if special tasks are needed to update.
See CONTRIBUTING.md for general contributing guide lines.
See http://github.com/sharetribe/sharetribe/issues and please report any issues you find
Sharetribe is open source under MIT license. See LICENSE file for details.