Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
S

sharetribe

> 数据库
Open source

Sharetribe Go is Sharetribe's old source-available marketplace software, which was also available as a hosted SaaS product. Sharetribe Go is no longer actively

2.4K stars0 likes3 views
WebsiteGitHub

About

Sharetribe Go is Sharetribe's old source-available marketplace software, which was also available as a hosted SaaS product. Sharetribe Go is no longer actively

Sharetribe Go

IMPORTANT: Sharetribe Go is no longer actively maintained.

Sharetribe's new marketplace builder, The New Sharetribe, replaces Sharetribe Go as the easiest, fastest way to build a marketplace. Learn more about what The New Sharetribe means for Sharetribe Go.

Sharetribe Go remains source-available under the Sharetribe Community Public License.

To build and launch a marketplace without writing a single line of code, and extend indefinitely with custom code and scale to any size, head to the SaaS version of The New Sharetribe.

Contents

  • Technology stack
  • Installation
  • Payments
  • Custom Landing Page
  • Versioning
  • Changes
  • Upgrade
  • Contribute
  • Release
  • Translation
  • Bug tracker
  • Documentation
  • License

Technology stack

  • Ruby 3.4.8
  • Ruby on Rails 8.1.2
  • MySQL 8.4
  • React + jQuery
  • Node.js 18.16 (for compiling JavaScript assets)
  • "what you see is what you get" Editor Mercury
  • Deploy: Custom Script (not using Mina or Cap3)
  • Server: Heroku
  • Image hosting: Amazon S3
  • Background job: delayed_job
  • Gems:
    • devise | Authentication
    • omniauth-facebook | Third party login: Facebook
    • haml and ERB | HTML templating
    • mysql2 | MySQL library for Ruby
    • paperclip | Image upload management
    • passenger | Web application server
    • react_on_rails | Integration of React + Webpack + Rails
    • factory_bot, capybara, rspec-rails, cucumber-rails, selenium-webdriver | Testing

Installation

Requirements

Before you get started, install the following:

  • Ruby. See the version currently used above. We don't guarantee everything works with other versions. If you need multiple versions of Ruby, RVM or rbenv is recommended.
  • RubyGems
  • Bundler: gem install bundler
  • Node. See the version currently used above. We don't guarantee everything works with other versions. If you need multiple versions of Node, consider using n, nvm, or nenv.
  • Git
  • A database. Only MySQL (see the version currently used above) 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. Clone this git repository and check out the latest release:

    bash
    git clone [email protected]:sharetribe/sharetribe.git
    cd sharetribe
    git checkout latest
  2. Install the required gems by running the following command in the project root directory:

    bash
    bundle install

    Note: libv8 might fail to build with Clang 7.3, in that case you can try installing V8 manually:

    bash
    brew tap homebrew/versions
    brew install v8-315
    
    gem install libv8 -v '3.16.14.13' -- --with-system-v8
    gem install therubyracer -- --with-v8-dir=/usr/local/opt/v8-315
    
    bundle install
  3. Install node modules:

    bash
    npm install && ( cd client && npm install )
  4. Create a database.yml file by copying the example database configuration:

    bash
    cp config/database.example.yml config/database.yml
  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. Create a config.yml file by copying the example configuration file:

    bash
    cp config/config.example.yml config/config.yml
  7. Create and initialize the database:

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

    bash
    bundle exec rake ts:index

    Note: If your MySQL server is configured for SSL, update the config/thinking_sphinx.yml file and uncomment the mysql_ssl_ca lines. Configure correct SSL certificate chain for connection to your database over SSL.

  9. Start the Sphinx daemon:

    bash
    bundle exec rake ts:start
  10. Start the development server:

    bash
    foreman start -f Procfile.static
  11. Invoke the delayed job worker in a new console (open the project root folder):

    bash
    bundle exec rake jobs:work

Congratulations! Sharetribe should now be up and running for development purposes. Open a browser and go to the server URL (e.g. http://lvh.me:3000 or http://lvh.me:5000). 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.

Mailcatcher

Use Mailcatcher to receive sent emails locally:

  1. Install Mailcatcher:

    bash
    gem install mailcatcher
  2. Start it:

    bash
    mailcatcher
  3. Add the following lines to config/config.yml:

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

Database migrations

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

bash
bundle exec rake db:migrate

Running tests

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

Install the following extra dependencies:

  • Chromedriver. Make sure to install a driver version that matches your browser's.

Remember to follow all the steps listed in the Setting up the development environment paragraph before running tests because some tests depend on webpack assets.

  1. Navigate to the root directory of the sharetribe project

  2. Initialize your test database:

    bash
    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:

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

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

    bash
    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:

bash
bundle exec guard

Working with React, Webpack and Foreman

Some components are created with React (see documentation) and they need to be built with Webpack. We have Foreman Procfiles that can be used to run both Rails and Webpack:

  1. React component static build

    bash
    foreman start -f Procfile.static
  2. React component & hot loading styleguide (http://localhost:9001/)

    bash
    foreman start -f Procfile.hot
  3. If you need to debug the Rails parts of Sharetribe with Pry, it's not possible with Foreman due to a known compatibility issue. In this case we recommend running Rails with old-fashioned rails server and React builds with Foreman in a separate terminal. That way your binding.pry calls open nicely in the same window with the Rails process.

  4. React component static build, React client only

    bash
    foreman start -f Procfile.client-static
  5. React component & hot loading styleguide (http://localhost:9001/), React client only

    bash
    foreman start -f Procfile.client-hot

Setting up Sharetribe for production

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

  1. Set secret_key_base

    Generate secret key

    bash
    rake secret

    Add the following lines to config/config.yml:

    yaml
    production:
      secret_key_base: # add here the generated key

    (You can also set the secret_key_base environment variable, if you don't want to store the secret key in a file)

  2. Create the database:

    bash
    RAILS_ENV=production bundle exec rake db:create
  3. Initialize your database:

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

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

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

    bash
    RAILS_ENV=production NODE_ENV=production bundle exec rake assets:precompile
  7. Invoke the delayed job worker:

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

    bash
    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 not recommended to serve static assets from a Rails server in production. Instead, you should use a CDN (Content Delivery Network) service, such as Amazon CloudFront. To serve the assets from the CDN service, you need to change the asset_host configuration in the the config/config.yml file to point your CDN distribution.

You need to configure a couple scheduled tasks in order to properly run your marketplace in production. See the Scheduled tasks documentation.

For production use we recommend you to upgrade only when new version is released and not to follow the master branch.

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 http://mymarketplace.myhosting.com, then the domain is mymarketplace.myhosting.com.

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

  3. If you wish

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Rubymarketplaceplatform

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category数据库
PricingOpen source

> Related tools

P
PostgreSQL
功能强大的开源关系型数据库
R
Redis
内存数据结构存储,常用作缓存与队列
M
MySQL
广泛使用的开源关系型数据库