Thursday, December 04, 2014

Creating a Rails 4.1 app using JRuby

Notes around creating a Rails 4.1.8 application on JRuby

Creating application

Using RVM to manage my rubies.

rvm use jruby-
gem install rails
rails new .

Configuring Rails app for PostgreSQL and JDBC

Add the following to the Gemfile.

gem 'activerecord-jdbcpostgresql-adapter'

Also add the following towards the top of the Gemfile.
ruby '1.9.3', :engine => 'jruby', :engine_version => ''

My Gemfile as it currently stands:

source ''

ruby '1.9.3', :engine => 'jruby', :engine_version => ''

gem 'rails', '4.1.8'
gem 'activerecord-jdbcpostgresql-adapter'
gem 'sass-rails', '~> 4.0.3'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.0.0'
gem 'therubyrhino'
gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder', '~> 2.0'
gem 'sdoc', '~> 0.4.0', group: :doc
gem 'puma'

Configuring database.yml

Set up your databases environments, similar to what I have here:

default: &default
  adapter: jdbcpostgresql
  encoding: unicode

  <<: *default
  host: localhost
  database: foobar_development
  username: postgres
  password: postgres

  <<: *default
  host: localhost
  database: foobar_test
  username: postgres
  password: postgres

  <<: *default
  host: localhost
  database: foobar_production
  username: postgres
  password: postgres


  1. Being new to the blogging world I feel like there is still so much to learn. Your tips helped to clarify a few things for me as well as giving..
    Linux Training in Chennai

  2. I must thank you for the efforts you have put in penning this site. I am hoping to check out the same high-grade content by you later on as well. In truth, your creative writing abilities has inspired me to get my own, personal blog now..

    Corporate Training in Chennai

  3. Its fantatic explaintion lot of information gather it...nice article....
    seo company in Chennai


  4. This information is impressive; I am inspired with your post writing style & how continuously you describe this topic.

    Pawn Shop

    Pawn Loans

    Pawn Shops

    Pawn Loan

    Pawn Shop near me

  5. I’ve been browsing on-line greater than three hours today, but I never discovered any attention-grabbing article like yours. It is beautiful worth

    sufficient for me. Personally, if all webmasters and bloggers made good content material as you did, the net will be a lot more helpful than ever before.
    cloud computing training in chennai

  6. you are posting a good information for people and keep maintain and give more update too.
    Informatica Training in Chennai

  7. Its a wonderful post and very helpful, thanks for all this information. You are including better information regarding this topic in an effective way.Thank you so much
    SAP Training in Chennai
    SAP Basis Training in Chennai
    SAP SD Training in Chennai
    SAP FICO Training in Chennai

  8. Thank you for your is very useful for me .keep more updates.waiting for your new blog.
    Business Tax Return
    Cpa Tax Accountant
    Tax Return Services

  9. This information is impressive; I am inspired with your post writing style & how continuously you describe this topic.

    Eczema Treatment
    Psoriasis Oil
    Hyperpigmentation Treatment
    Herbal Tonic

  10. Thanks for sharing, Really it is an amazing article I had ever read. I hope it will help a lot for all. Thank you so much for this amazing posts and please keep update like this.
    SEO Company in Chennai

  11. It is really a great and useful piece of info. I’m glad that you shared this helpful info with us. Please keep us informed like this. Thank you for sharing.
    Seo Company in Chennai
    Digital Marketing Company in Chennai

  12. Its really an Excellent post. I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog. Thanks for sharing
    SAP Training in Chennai
    SAP ABAP Training in Chennai