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 is Sharetribe's old source-available marketplace software, which was also available as a hosted SaaS product. Sharetribe Go is no longer actively
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.
Before you get started, install the following:
gem install bundlerbrew 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.brew install sphinx --with-mysqlbrew install imagemagickGet the code. Clone this git repository and check out the latest release:
git clone [email protected]:sharetribe/sharetribe.git
cd sharetribe
git checkout latestInstall the required gems by running the following command in the project root directory:
bundle installNote: libv8 might fail to build with Clang 7.3, in that case you can try installing V8 manually:
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 installInstall node modules:
npm install && ( cd client && npm install )Create a database.yml file by copying the example database configuration:
cp config/database.example.yml config/database.ymlAdd your database configuration details to config/database.yml. You will probably only need to fill in the password for the database(s).
Create a config.yml file by copying the example configuration file:
cp config/config.example.yml config/config.ymlCreate and initialize the database:
bundle exec rake db:create db:schema:loadRun Sphinx index:
bundle exec rake ts:indexNote: 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.
Start the Sphinx daemon:
bundle exec rake ts:startStart the development server:
foreman start -f Procfile.staticInvoke the delayed job worker in a new console (open the project root folder):
bundle exec rake jobs:workCongratulations! 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.
Use Mailcatcher to receive sent emails locally:
Install Mailcatcher:
gem install mailcatcherStart it:
mailcatcherAdd the following lines to config/config.yml:
development:
mail_delivery_method: smtp
smtp_email_address: "localhost"
smtp_email_port: 1025Open http://localhost:1080 in your browser
To update your local database schema to the newest version, run database migrations with:
bundle exec rake db:migrateTests are handled by RSpec for unit tests and Cucumber for acceptance tests.
Install the following extra dependencies:
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.
Navigate to the root directory of the sharetribe project
Initialize your test database:
bundle exec rake test:prepareThis needs to be rerun whenever you make changes to your database schema.
If Zeus isn't running, start it:
zeus startTo run unit tests, open another terminal and run:
zeus rspec specTo run acceptance tests, open another terminal and run:
zeus cucumberNote 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 guardSome 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:
React component static build
foreman start -f Procfile.staticReact component & hot loading styleguide (http://localhost:9001/)
foreman start -f Procfile.hotIf 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.
React component static build, React client only
foreman start -f Procfile.client-staticReact component & hot loading styleguide (http://localhost:9001/), React client only
foreman start -f Procfile.client-hotBefore starting these steps, perform steps 1-5 from above.
Set secret_key_base
Generate secret key
rake secretAdd the following lines to config/config.yml:
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)
Create the database:
RAILS_ENV=production bundle exec rake db:createInitialize your database:
RAILS_ENV=production bundle exec rake db:schema:loadRun Sphinx index:
RAILS_ENV=production bundle exec rake ts:indexStart the Sphinx daemon:
RAILS_ENV=production bundle exec rake ts:startPrecompile the assets:
RAILS_ENV=production NODE_ENV=production bundle exec rake assets:precompileInvoke the delayed job worker:
RAILS_ENV=production bundle exec rake jobs:workIn a new console, open the project root folder and start the server:
bundle exec rails server -e productionThe 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.
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.
Change the value of the use_domain column to true (or 1) in the communities table.
If you wish
No open issues yet, or sync has not completed.