Skip to content

An example rails4 app using carrierwave and the a9s Swift and PostgreSQL services

Notifications You must be signed in to change notification settings

fischerjulian/rails4_carrierwave_example

 
 

Repository files navigation

Rails 3.2.18 + Carrierwave + a9s Swift Service + PostgreSQL

A small application that demonstrates the work of these programs together. This application is a customized version of n0ne's Rails-Carrierwave-jQuery-File-Upload application which can be found here: https://github.com/n0ne/Rails-Carrierwave-jQuery-File-Upload .

You can use this application for a test run on anyines.com .

Install Codebase

Clone the git repository

$ git clone https://github.com/anynines/rails4_carrierwave_example.git
$ cd rails4_carrierwave_example
$ bundle

Create a database and run migrations

$ rake db:create db:migrate

Run the rails server

$ bundle exec rails s

View Application

From a web browser access the site via localhost:3000

Deploy the application to anynines

Service dependencies

  • PostgreSQL
  • Anynines Swift service

Ruby cli (v5)

Install the a9s gem

$ gem install a9s

Edit the deployment manifest

$ cp manifest.yml.v5 manifest.yml
$ vim manifest.yml -> exchange all occurences of your_app_name with your desired application identifier

The https://github.com/cloudfoundry/heroku-buildpack-ruby.git buildpack is referenced within the provided manifest.yml.v5. This buildpack is needed to support Rails 4 and Ruby 2.

Deploy the application

$ cf push

Visit the application url: http://your_app_name.de.a9sapp.eu .

Go cli (v6)

Install the cf go cli: https://github.com/cloudfoundry/cli/releases

Edit the deployment manifest

$ cp manifest.yml.v6 manifest.yml
$ vim manifest.yml # exchange all occurences of your_app_name with your desired application identifier

Create the needed services

$ cf create-service postgresql Pluto-free postgresql-your_app_name
$ cf create-service swift free swift-your_app_name

Deploy the application

$ cf push

Visit the application url: http://your_app_name.de.a9sapp.eu .

Test suite

RSpec and Capybara used for Integration and Unit tests

$ rspec

About

An example rails4 app using carrierwave and the a9s Swift and PostgreSQL services

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 72.8%
  • Ruby 22.2%
  • CSS 4.7%
  • CoffeeScript 0.3%