Tuesday, January 17, 2012

Compiling Rails project for distribution in a WAR file with JRuby

I recently started using JRuby for a Rails project and overall the experience has been excellent.  Using RVM, you can just switch to jruby to build a new project (rvm use jruby), and just about everything will work the same.  One of the big features of JRuby is that you can bundle your entire app, including JRuby itself, in to a WAR file that Java servers like Tomcat and Glassfish can serve up, so your app can be distributed on to servers that only have Java.

After you have JRuby installed, simply install the gem warbler.  You'll then get a command line tool, warble, to generate war files from your project.  Simply run warble from your project's directory, and a war file will be produced.  It's as easy as that!

Another great feature is that the Ruby code can be compiled down to Java class files, so your source code is not visible.  This is great for distributing on to a server where other companies will have access that you don't want seeing your source code.  However, this is not working for me.  Warbler should support this, just run "warble compiled war" from the command line in your projects directory instead of "warble".  This will produce a war file with both .rb and .class files.  The .rb files however are simply stubs that require the .class file, none of your code is in there.  But, for me, it's not generating .class files on all of my controllers.  I've entered an issue for this at https://github.com/jruby/warbler/issues/72.


I will be making another post on how to do database migrations on the server you're deploying to.

58 comments:

Unknown said...

Great Article… I love to read your articles because your writing style is too good, its is very very helpful for all of us and I never get bored while reading your article because, they are becomes a more and more interesting from the starting lines until the end.

rpa training in bangalore
best rpa training in bangalore
RPA training in bangalore
rpa courses in bangalore

Unknown said...

I likable the posts and offbeat format you've got here! I’d wish many thanks for sharing your expertise and also the time it took to post!!
Python Online certification training
python Training institute in Chennai
Python training institute in Bangalore

rohini said...

That was a great message in my carrier, and It's wonderful commands like mind relaxes with understand words of knowledge by information's.
AWS Training in Bangalore

Maria said...


The class today has become the happiest person I managed to find a part-time job at home and I really get interesting? fine play casino games for real money you can not thank

Madhu Balan said...

Whatever we gathered information from the blogs, we should implement that in practically then only we can understand that exact thing clearly, but it’s no need to do it, because you have explained the concepts very well. It was crystal clear, keep sharing..
Java Training in Chennai
Java Training in Coimbatore
Java Training in Bangalore

SARATH KUMAR said...

great article....thanks for sharing waiting for next update..
Manual Testing Training in Chennai
Manual Testing courses in Chennai
testing courses in chennai
Manual Testing Training in Anna Nagar
Manual Testing Training in T Nagar
Mobile Testing Training in Chennai
core java training in chennai
DOT NET Training in Chennai
Hibernate Training in Chennai
Html5 Training in Chennai

Riya Raj said...

Good blog!!! It is more impressive... thanks for sharing with us...
Selenium Training in Chennai
Best selenium Training Institute in Chennai
selenium testing course in chennai
Selenium Course in Chennai
Selenium training in Thiruvanmiyur
Selenium Training in Velachery
Python Training in Chennai
Software testing training in chennai
Python Training in Chennai
JAVA Training in Chennai

lokeshivam said...

Great info. The content you wrote is very interesting to read. This will be loved by all age groups.
Blue Prism Training in Chennai
Blue Prism Training Institute in Chennai
Blue Prism course in Chennai
R Training in Chennai
Data Science Training in Chennai
RPA Training in Chennai
Blue Prism Training in Vadapalani
Blue Prism training in Thiruvanmiyur
Blue Prism training in Guindy

diya shivanya said...

Thank you for your efforts and I am inspiried with your written style.
IELTS Coaching in Chennai
Best IELTS Coaching in Chennai
german classes
learn Japanese in Chennai
Best Spoken English Class in Chennai
TOEFL Coaching Centres in Chennai
IELTS Coaching in OMR
IELTS Coaching in Porur

Sadhana Rathore said...

I gathered lots of information from your blog and it helped me a lot. Keep posting more.
ccna course in Chennai
ccna Training in Chennai
ccna Training institute in Chennai
AngularJS Training in Chennai
Ethical Hacking course in Chennai
PHP Training in Chennai
CCNA course in Thiruvanmiyur
CCNA course in Porur
CCNA course in Adyar

Tech News said...

Good Article
devops training in bangalore
hadoop training in bangalore
iot training in bangalore
machine learning training in bangalore
uipath training in bangalore

Sivanandhana Girish said...

A big thanks for this sharing this awesome post with us.Read it recently and felt very happy on reading every bit of the blog.
Spoken English Classes in Chennai
Best Spoken English Classes in Chennai
IELTS Coaching in Chennai
IELTS Coaching Centre in Chennai
English Speaking Classes in Mumbai
English Speaking Course in Mumbai
IELTS Classes in Mumbai
IELTS Coaching in Mumbai
IELTS Coaching in Anna Nagar
Spoken English Class in Anna Nagar

Bala said...

Very valuable post...! This information shared is helpful to improve my knowledge skill. Thank you...!
Oracle Training in Chennai
Oracle course in Chennai
Tableau Training in Chennai
Spark Training in Chennai
Advanced Excel Training in Chennai
Primavera Training in Chennai
Appium Training in Chennai
Power BI Training in Chennai
Pega Training in Chennai
Oracle Training in T Nagar
Oracle Training in Porur

Tech News said...

Visit Here => Big Data and Hadoop training in bangalore

Anbarasan14 said...

This was a great blog. Really worth reading it. Thanks for spending time to share this content with us.
Education Franchise India
Spoken English Franchise
Franchise For Spoken English Classes
Top Education Franchise In India
Best Education Franchise In India
Computer Education Franchise
Education Franchise India
Computer Center Franchise
Education Franchise Opportunities In India

subhashini said...

Nice blog! Thanks for sharing this valuable information
Ethical Hacking Course in Chennai
Hacking Course in Chennai
Ethical hacking course in bangalore
Ethical hacking course in coimbatore
Ethical Hacking Training in Chennai
Certified Ethical Hacking Course in Chennai
Ethical Hacking Training Institute in Chennai
Selenium Training in Bangalore

sasi said...

I really enjoyed this article. I need more information to learn so kindly update it.
Salesforce Training in Chennai
salesforce training in bangalore
Salesforce Course in Chennai
salesforce training institute in chennai
salesforce developer training in chennai
Salesforce Training Chennai
Big Data Course in Coimbatore
DOT NET Training in Bangalore

Pixies said...

Excellent blog thanks for sharing Pixies Beauty Shop is unlike any of the other cosmetic shops in Chennai. With tons of exclusive imported brands to choose from and the best value, this is the best shopping destination for your personal and salon needs.
Cosmetics Shop in Chennai

Adhuntt said...

Great blog thanks for sharing Online marketing has changed how businesses run and succeed in today’s highly competitive world. With Adhuntt Media, your E-commerce store can reach for the stars and find the right customers.
digital marketing company in chennai
seo service in chennai
web designing company in chennai
social media marketing company in chennai

Karuna said...

Nice blog thanks for sharing Karuna Nursery Gardens provides you with the best nursery solutions for setting you up with a glamorous landscape. That’s right, you have finally found the perfect nursery to set you up with the best house garden in Chennai.
plant nursery in chennai
rental plants in chennai
corporate gardening service in chennai

priya said...

best php training in chennai
best php developer institution chennai
best php training with placement in chennai
best php training center in chennai
best php course in chennai

priya said...

I have been reading for the past two days about your blogs and topics, still on fetching! Wondering about your words on each line was massively effective.
best appium training in chennai
appium online training
appium training centres in chennai
appium training institutes in chennai
appium training institutes for appuim in chennai
appium training content

Indpac said...

Very useful blog thanks for sharing IndPac India the German technology Packaging and sealing machines in India is the leading manufacturer and exporter of Packing Machines in India.

Unknown said...

Thanks for the interesting blog that you have implemented here. Very helpful and innovative. Waiting for your next upcoming article.
Java training in chennai
Java training institute in chennai
Java course in chennai
Java training classes
Java training
Java programming classes
core java coure
<a

w3webschool said...

Nice post. Thanks for sharing! I want people to know just how good this information is in your article. It’s interesting content and Great work.
Digital Marketing Course In Kolkata
Web Design Course In Kolkata

shreekavi said...

Really awesome blog. Your blog is really useful for me. Thanks for sharing this informative blog.
Software Testing Training in Chennai
Software Testing Training in Bangalore
Software Testing Course in Coimbatore
Software Testing Training in Madurai
Software Testing Training Institute in Bangalore
Software Testing Course in Bangalore
Testing Course in Bangalore
Ethical hacking course in bangalore

Priyanka said...

Attend The Machine Learning Courses in Bangalore From ExcelR. Practical Machine Learning courses in Bangalore Sessions With Assured Placement Support From Experienced Faculty. ExcelR Offers The Machine Learning courses in Bangalore.
Machine Learning courses in Bangalore

Keerthana said...

Attend Python Training With Placements and enhance your career with Python
python training in chennai | python training in annanagar | python training in omr | python training in porur | python training in tambaram | python training in velachery

Janu said...

Keep up the good work; I read few posts on this website, including I consider that your blog is fascinating and has sets of the fantastic piece of information

Dot Net Training in Chennai | Dot Net Training in anna nagar | Dot Net Training in omr | Dot Net Training in porur | Dot Net Training in tambaram | Dot Net Training in velachery






subha said...

Nice post. Thanks for sharing! I want people to know just how good this information is in your article. It’s interesting content and Great work. keep it up guy.
Ai & Artificial Intelligence Course in Chennai
PHP Training in Chennai
Ethical Hacking Course in Chennai Blue Prism Training in Chennai
UiPath Training in Chennai

Data Science Institute In Banglore said...

Awesome blog. I enjoyed reading your articles. This is truly a great read for me. I have bookmarked it and I am looking forward to reading new articles. Keep up the good work!
Data Science Institute in Bangalore

Data Science Institute In Banglore said...

After reading your article I was amazed. I know that you explain it very well. And I hope that other readers will also experience how I feel after reading your article.
Data Science Certification in Bangalore

DataScience Datascience said...

I have express a few of the articles on your website now, and I really like your style of blogging. I added it to my favorite’s blog site list and will be checking back soon…
Data Science Course in Bangalore

DataScience Datascience said...

I am sure that this is going to help a lot of individuals. Keep up the good work. It is highly convincing and I enjoyed going through the entire blog.
Data Science Training in Bangalore

Data Science pune said...

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.
Data Science Course in Pune
Data Science Training in Pune

Data Analytics Pune said...

I feel very grateful that I read this. It is very helpful and very informative and I really learned a lot from it.
Data Analytics Course in Pune
Data Analytics Training in Pune

Business Analytics Course said...

I am impressed by the information that you have on this blog. It shows how well you understand this subject.
Business Analytics Course in Pune
Business Analytics Training in Pune

rocky said...

I want people to know just how good this information is in your article. It’s interesting content and Great work.
Python Hyderabad

Python Training in Coimbatore
Python Training in Chennai

Python Training in Training

Python Training in Bangalore

Ethical Hacking Course said...

After reading your article I was amazed. I know that you explain it very well. And I hope that other readers will also experience how I feel after reading your article.
Ethical Hacking Course in Bangalore

Ethical Hacking Training said...

https://www.blogger.com/comment.g?blogID=822738186956251465&postID=6415184044874565566&page=1&token=1595414172140

Data Science Institute In Banglore said...

Great post i must say and thanks for the information. Education is definitely a sticky subject. However, is still among the leading topics of our time. I appreciate your post and look forward to more.
Data Science Training Institute in Bangalore

Best Data Science Courses In Bangalore said...
This comment has been removed by the author.
Best Data Science Courses In Bangalore said...

I feel very grateful that I read this. It is very helpful and very informative and I really learned a lot from it.
Best Data Science Courses in Bangalore

Cyber Security said...

Thumbs up guys your doing a really good job. It is the intent to provide valuable information and best practices, including an understanding of the regulatory process.
Cyber Security Course in Bangalore

DataScience Datascience said...

You re in point of fact a just right webmaster. The website loading speed is amazing. It kind of feels that you're doing any distinctive trick. Moreover, The contents are masterpiece. you have done a fantastic activity on this subject!
Data Science Course in Bangalore

DataScience Datascience said...

Regular visits listed here are the easiest method to appreciate your energy, which is why why I am going to the website everyday, searching for new, interesting info. Many, thank you!
Data Science Training in Bangalore

Ethical Hacking in Bangalore said...

I am impressed by the information that you have on this blog. Thanks for Sharing
Ethical Hacking in Bangalore

Cyber Security Course said...

Very nice blog and articles. I am really very happy to visit your blog. Now I am found which I actually want. I check your blog everyday and try to learn something from your blog. Thank you and waiting for your new post.
Cyber Security Training in Bangalore

sherlie said...

The information's are encouraging us to Enhance the careers...The content of your post is awesome...Thank you so much.
Web Designing Training in Chennai

Web Designing Course in Chennai

Web Designing Training in Bangalore

Web Designing Course in Bangalore

Web Designing Training in Hyderabad

Web Designing Course in Hyderabad

Web Designing Training in Coimbatore

Web Designing Training

Web Designing Online Training

Home Garden Blogs said...

Damien Grant
Damien Grant
Damien Grant
Damien Grant
Damien Grant
Damien Grant
Damien Grant
Damien Grant

Home Garden Blogs said...

Damien Grant
Damien Grant
Damien Grant
Damien Grant
Damien Grant
Damien Grant
Damien Grant
Damien Grant

sudhan said...

Nice article! It is really gave an valuable information and it is easy to understand.

Cyber Security Training Course in Chennai | Certification | Cyber Security Online Training Course | Ethical Hacking Training Course in Chennai | Certification | Ethical Hacking Online Training Course | CCNA Training Course in Chennai | Certification | CCNA Online Training Course | RPA Robotic Process Automation Training Course in Chennai | Certification | RPA Training Course Chennai | SEO Training in Chennai | Certification | SEO Online Training Course

Jayalakshmi said...

I think you have a long story to share and i am glad after long time finally you cam and shared your experience.
data science training in chennai

data science training in tambaram

android training in chennai

android training in tambaram

devops training in chennai

devops training in tambaram

artificial intelligence training in chennai

artificial intelligence training in tambaram

praveen said...

Good Post! Thank you so much for sharing this pretty post, it was so good to read and useful to improve my knowledge as updated one, keep blogging
data science training in chennai

data science training in porur

android training in chennai

android training in porur

devops training in chennai

devops training in porur

artificial intelligence training in chennai

artificial intelligence training in porur

deiva said...

Very valuable post...! This information shared is helpful to improve my knowledge skill. Thank you...!
web designing training in chennai

web designing training in omr

digital marketing training in chennai

digital marketing training in omr

rpa training in chennai

rpa training in omr

tally training in chennai

tally training in omr

Data Science certification in Bhilai - 360DigiTMG said...

Extraordinary blog went amazed with the content they have developed in a very descriptive manner. Hope you deliver the same near the future as well. Gratitude to the blogger for the efforts.

360DigiTMG Cloud Computing Course

Data Science certification in Bhilai - 360DigiTMG said...

Terrific post thoroughly enjoyed reading the blog and more over found to be the tremendous one. Infact, educating the participants with it's amazing content. Hope you share the similar content consecutively.

360DigiTMG Data Science Course

Data Science Hyderabad said...

Awesome article with top quality information and found very interesting looking forward for next blog thank you.
Data Science Course in Hyderabad 360DigiTMG