Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A fully functional, deployable marketplace implementation using Balanced + Subledger API for Rails
branch: master

This branch is even with subledger:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
app
bin
config
db
lib
log
public
spec
vendor/assets
.env.sample
.gitignore
.ruby-gemset
.ruby-version
Gemfile
Gemfile.lock
Procfile
README.md
Rakefile
config.ru

README.md

rentmybike

Code Climate

Reference implementation of Balanced for collecting and charging credit cards, and collecting and crediting bank accounts.

Uses jQuery, Less, Ruby(>=1.9.3), Rails (>= 4.0.0.rc1), Devise, PosgreSQL, and Bootstrap.

If you'd like to deploy signup for a Heroku account if you dont already have one and install Toolbelt.

Live Site

http://rentmybikes.subledger.com/

Security Warning

Please note that the 'Share this' links on each page of this application causes a MAJOR security risk and should be removed from a production mareketplace

Resources

Install

$ git clone https://github.com/balanced/rentmybikes-rails.git
$ cd rentmybikes
$ bundle install
$ rake db:create
$ rake db:migrate
$ foreman run rake db:seed (if you want to seed database - also requires foreman gem)

Configure

Create an .env file for the app by renaming .env.sample to .env

  • Set BALANCED_SECRET to your secret key. Get one from Balanced if you dont have one.

Example:

BALANCED_SECRET='your-balanced-secret'

Edit the following in rentmybike/config/initializers/devise.rb:

  • Configure the e-mail address which will be shown in Devise::Mailer

Edit the following in rentmybike/config/database.yml:

  • Set all necessary fields for your database.

Example:

common: &common
adapter: postgresql
username:
password:
host: localhost
timeout: 5000
development:
<<: *common
database: rentmybike_dev
<<: *common
database: rentmybike_test

Run

$ foreman start

or if you dont have Toolbelt

$ rails s

Deploy

$ cd rentmybikes
$ heroku create
$ git push origin heroku
$ heroku ps:scale web=1
$ heroku open
Something went wrong with that request. Please try again.