Pages

Thursday, December 04, 2014

Creating a Rails 4.1 app using JRuby

Notes around creating a Rails 4.1.8 application on JRuby 1.7.16.1.


Creating application

Using RVM to manage my rubies.

rvm use jruby-1.7.16.1
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 => '1.7.16.1'

My Gemfile as it currently stands:

source 'https://rubygems.org'

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

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

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

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

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

50 comments:

  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

    ReplyDelete
  2. 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

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

    ReplyDelete
  4. really Good blog post.provided a helpful information.I hope that you will post more updates like thisRuby on Rails Online Course Bnagalore

    ReplyDelete
  5. Were a gaggle of volunteers as well as starting off a brand new gumption within a community. Your blog furnished us precious details to be effective on. You've got completed any amazing work!
    Java training in Chennai | Java training institute in Chennai | Java course in Chennai

    Java training in Bangalore | Java training in Electronic city

    Java training in Bangalore | Java training in Marathahalli

    Java training in Bangalore | Java training in Btm layout

    ReplyDelete
  6. I found your blog while searching for the updates, I am happy to be here. Very useful content and also easily understandable providing.. Believe me I did wrote an post about tutorials for beginners with reference of your blog. 
    python Online training in chennai
    python Online training in bangalore
    python interview question and answers

    ReplyDelete

  7. بسم الله الرحمن الرحيم عميلنا العزيز نحن نقدم افضل خدمات تنظيف المجالس والشقق بافضل انواع التنظيفات المشهود لها عالميا
    شركة تنظيف مجالس بالطائف
    شركة تنظيف مجالس بجازان
    شركة تنظيف مجالس بحائل
    ونحن فى خماتكم 24 ساعة على مدار الشهر

    ReplyDelete
  8. I just got to this amazing site not long ago. I was actually captured with the piece of resources you have got here. Big thumbs up for making such wonderful blog page!
    data scince course malaysia big data course malaysia

    ReplyDelete
  9. I was just browsing through the internet looking for some information and came across your blog. I am impressed by the information that you have on this blog. It shows how well you understand this subject. Bookmarked this page, will come back for more.
    date analytics certification training courses
    data science courses training
    data analytics certification courses in Bangalore
    ExcelR Data science courses in Bangalore

    ReplyDelete
  10. It should be noted that whilst ordering papers for sale at paper writing service, you can get unkind attitude. In case you feel that the bureau is trying to cheat you, don't buy term paper from it.
    iot training in malaysia

    ReplyDelete
  11. Really appreciate this wonderful post that you have provided for us.Great site and a great topic as well i really get amazed to read this. Its really good.
    www.technewworld.in
    How to Start A blog 2019

    ReplyDelete
  12. I like your post very much. It is very much useful for my research. I hope you to share more info about this. Keep posting ruby certification

    ReplyDelete
  13. Really i appreciate the effort you made to share the knowledge. The topic here i found was really effective...

    Softgen Infotech is the Best HADOOP Training located in BTM Layout, Bangalore providing quality training with Realtime Trainers and 100% Job Assistance.

    ReplyDelete
  14. Great post!I am actually getting ready to across this information,i am very happy to this commands.Also great blog here with all of the valuable information you have.Well done,its a great knowledge.RPA Training in Bangalore



    ReplyDelete
  15. Thanks for sharing this blog. This very important and informative blog. Puppet Training in Bangalore

    ReplyDelete
  16. Such a very useful article. Very interesting to read this article.I would like to thank you for the efforts you had made for writing this awesome article.

    Digital marketing course mumbai

    ReplyDelete
  17. Awesome Post!!! Attend The Data Science Courses From ExcelR. ExcelR experts have successfully trained over 100,000 students and professionals in multifarious domains which include Data Science
    Data Science Course in Marathahalli
    Data Science Course Training in Bangalore

    ReplyDelete
  18. This comment has been removed by the author.

    ReplyDelete
  19. ch a very useful article. Very interesting to read this article.I would like to
    사설토토사이트

    ReplyDelete
  20. I have to search sites with relevant information on given topic and provide them to teacher our opinion and the article.

    data science interview questions

    ReplyDelete
  21. I have thoroughly enjoyed reading your article. It is indeed brilliant to read such a piece of writing which would broaden your horizon of thinking.
    SAP training in Mumbai
    SAP course in Mumbai
    SAP training institute Mumbai

    ReplyDelete
  22. What an incredible writing is this! Totally amazed by such views which you have put into this content. It really made me to brood over the topic.
    SAP training in Kolkata
    SAP course in kolkata
    SAP training institute in Kolkata

    ReplyDelete
  23. It’s good to check this kind of website. I think I would so much from you. ExcelR Data Analytics Courses

    ReplyDelete
  24. Took me time to understand all of the comments, but I seriously enjoyed the write-up. It proved being really helpful to me and Im positive to all of the commenters right here! Its constantly nice when you can not only be informed, but also entertained! I am certain you had enjoyable writing this write-up.
    data scientist courses

    ReplyDelete
  25. It is perfect time to make some plans for the future and it is time to be happy. I've read this post and if I could I desire to suggest you some interesting things or suggestions. Perhaps you could write next articles referring to this article. I want to read more things about it!
    data science certification

    ReplyDelete
  26. This comment has been removed by the author.

    ReplyDelete
  27. I wanted to thank you for this great read!! I definitely enjoying every little bit of it I have you bookmarked to check out new stuff you post.
    data scientist training and placement

    ReplyDelete
  28. Thank you for sharing very useful & informative article.
    For sofa repair work contact thesofastore gives
    Best Sofa Repair Services in Yemalur,Bangalore

    ReplyDelete
  29. It is extremely nice to see the greatest details presented in an easy and understanding manner.
    data scientist certification malaysia

    ReplyDelete
  30. Nice post. Keep sharing. Thanks for sharing.
    Visit Best Astrologer in Nizamabad

    ReplyDelete
  31. Thank you for sharing valuable information
    Visit our website for best astrological services contact. Best Astrologer In Mahalakshmipuram

    ReplyDelete
  32. Very good article,Thank you.
    For sofa renovation contact thesofastore they gives best

    Best Furniture Repair in Bangalore

    ReplyDelete
  33. Thank you for sharing valuable information.
    Visit Resorts in Mysore.

    ReplyDelete
  34. Nice Blog. Thanks for Sharing!!! Wonderful blog & good post. It’s really helpful for me, waiting for a more new post. Keep Blogging!
    Visit Black Magic Astrologer in Hebbal.

    ReplyDelete
  35. Wow. That is so elegant and logical and clearly explained. Brilliantly goes through what could be a complex process and makes it obvious. Thanks for Sharing This Article. It is very so much valuable content. Digital marketing training

    ReplyDelete
  36. Informative blog and knowledgeable content. Thanks for sharing this awesome blog with us. If you want to learn data science then follow the below link.
    Data Science Course Training in Hyderabad

    ReplyDelete
  37. This comment has been removed by the author.

    ReplyDelete
  38. Great post! I've been looking for a blog like yours that covers this subject in-depth. Keep up the great work! Fire safety equipment plays a crucial role in safeguarding lives and property from the devastating effects of fire integral component is the BRANCH PIPE NOZZLE

    ReplyDelete