Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jvshahid/sample-jruby-pg

A sample app to demonstrate using jruby-pg
https://github.com/jvshahid/sample-jruby-pg

Last synced: about 1 month ago
JSON representation

A sample app to demonstrate using jruby-pg

Awesome Lists containing this project

README

        

## Sample jruby-pg app

### Gemfile setup

This is a sample app demonstrating using jruby-pg with a rails app. Add the
following to the `Gemfile`:

```ruby
platform :jruby do
gem 'pg', '0.18', :platform => :jruby, :git => 'git://github.com/headius/jruby-pg.git', :branch => :master
end
```

### Setup database.yml

```yml
development:
<<: *default
adapter: postgresql
database: foobar
```

### Create database

```
createdb foobar
```

### Migrate

The app has a `foobars` model, run the following to run the migration

```
rake db:migrate
```