jrubyonrails

Jruby Rails app on Tomcat CPU Usage spikes

This might also belong on serverfault. It's kind of a combo between server config and code (I think) Here's my setup: Rails 2.3.5 app running on jruby 1.3.1 Service Oriented backend over JMS with activeMQ 5.3 and mule 2.2.1 Tomcat 5.5 with opts: "-Xmx1536m -Xms256m -XX:MaxPermSize=256m -XX:+CMSClassUnloadingEnabled" Java jdk 1.5.0_19 ...

Rails Warbler Deployment

I am doing some testing to determine resource usage of a rails war. I have used Warbler to package the "15-minute Blog" application using Rails 2.3.5 and JRuby 1.4.0. I am deploying into Tomcat 6.0.24 and create multiple deployments by copying the blog.war file as blogN.war. This worked great for the first 4 deployments but I can't see...

Invalid SQL while Embedding HSQLDB into a Rails App

I am working on porting a Rails app to JRuby and HSQLDB. My goal is to embed a database and the site within a single JAR file for deployment at customer sites. I have the site working quite well from the JAR, with a few notable problems. When I do the following with a pretty mundane ActiveRecord model: @total = SessionLog.count(:id) ...

Why does jruby complain about valid java_opts

I have set my java min/max heap size to be the same as outlined in the Sun Docs for precise heap sizing using the following: -Xms768m -Xmx768m This works fine when I start tomcat, but if I run jruby from the command line it complains saying: Error occurred during initialization of VM Incompatible minimum and maximum heap sizes s...

Lazy loading of ESB in a jruby rails app

I have a jruby/rails app using: jruby 1.4.0 Rails 2.3.5 ActiveMQ 5.3.0 Mule ESB 2.2.1 Currently in our environment.rb file we start up Mule in the initializer. This becomes a big pain when we go to do normal rake tasks that don't require JMS/Mule such as db:migrate as it takes a long time to startup/shutdown Mule everytime. The code...

AppEngine JRuby - OutOfMemoryError: Java heap space - can it be solved?

I use AppEngine JRuby on Rails (SDK version 1.3.3.1) - a problem I encounter often is that after a few requests the server is getting really SLOW, until it dies and throws OutOfMemoryError on the terminal (OSX). The requests themselves are very lightweight, not more than looking for an entity or saving it, using DataMapper. On appspot,...

pickle on jruby

Does anyone know if pickle is compatible with jruby? I just installed cucumber and cucumber-rails. I then tried gem install pickle and it installs, but a script/generate pickle yields Couldn't find 'pickle' generator I did everything according to the readme no dice. Anyone have any experience with this: specs jruby-1.4.0 rail...

Cucumber-rails on jruby installs gem into my apps root directory with bundler

Just installed cucumber 0.7.2 and cucumber-rails 0.3.1 with jruby-1.4.0 on OSX. When I run a bundle install, it places a cucumber-rails directory in my main app with all of the gem code/dependencies. First off, this is definitely not what I want and I'm not sure why this happens for cucumber-rails only. Second, if I delete this folde...

Rails deployment strategies with Bundler and JRuby

I have a jruby rails app and I've just started using bundler for gem dependency management. I'm interested in hearing peoples' opinions on deployment strategies. The docs say that bundle package will package your gems locally so you don't have to fetch them on the server (and I believe warbler does this by default), but I personally th...

How to use bigint data type for primary keys in Rails 2.3 using activerecord-jdbc

Hi all I have a Rails app that I'm porting from Rails 1.2 to 2.3. I'm also moving from the Ruby MRI to the latest version of JRuby as well. In the existing (Rails 1.2) app I use the mysql_bigint plugin to provide support for 64-bit ints as primary keys. I need to to the same thing for the new application running against a MS SQL 2005 ...

How do I enable automatic reloading of view files in development mode in JRuby on Rails?

I am developing an app in JRuby on Rails. For some reason, when I edit the view files, the development JRuby Mongrel server doesn't reload them. The perplexing thing is that after editing the controller files, the server reloads them just fine on the next request. This would be annoying even when using MRI Ruby, however starting up JRub...

What Web Hosting Service do I use for JRuby on Rails?

I'm developing a website with JRuby on Rails because I need some Java functionality server-side. I figure to deploy it, I will need to use a hosting service that supports JSP. Am I right and is that all I need? Or is there something else I will need to deploy my site? How would I go about doing this? ...

How do you unpack gems using jruby on rails 2.3?

I'm trying to unpack all the system gems to end up with a standalone Rails directory including all the rails gems and all the system gems. I'm starting with a bare rails setup; just did a jruby -S rails and a 'generate jdbc'. I then add a config.gem 'jdbc-mysql' to environment.rb and do the jruby -S rake gems:unpack:dependencies. Afte...

Access Models from OUTSIDE rails app

I am writing a JRuby rails app that uses mysql-backed models. Now, I need to update the models from OUTSIDE the app (via EventMachine / similar), so that the Controllers etc IN the rails app can get access to the fresh data. So, is the Rails ORM available inside EventMachine? Will there be catastrophic consequences if I update the mysq...

ActiveResource maximum length ??

I've been getting some exceptions on my production machine (terrible i know!) and they are always XML parsing exceptions from ActiveResource. They always throw an error about invalid xml saying Couldn't find end of Start Tag c line 1337 When I look at line 1337 of the xml request (if I make that service request in my browser) the...

How can I set environment variables in glassfish for a specific application (or domain)

Okay here is my setup: Running JRUBY (and a JRuby on Rails application) on a glassfish server (not gem!!!). Jruby has been installed via RVM (http://rvm.beginrescueend.com/). The RoR application has it's own gemset. (managed by rvm) Now my problem is, that I don't know how to tell glassfish to use a different GEM_HOME and GEM_PATH env...

JRuby on Rails: Adding a folder to the classpath

I'm trying to add an entire folder to the JRuby 1.5 classpath for my Rails app. The JRuby Wiki suggests the following: "... add the config directory to the JRuby classpath in config/environment.rb:" $CLASSPATH << "file:///#{File.expand_path(File.join(RAILS_ROOT, 'config'))}/" That doesn't seem to work for me. It doesn't matter whether...

Convert a Ruby on Rails project to a JRuby on Rails project

Hi, is there any particular way to convert a Ruby on Rails project to a JRuby on Rails project? There now is a need to get the Rails side to talk to a Java server via RMI so was wondering how to make the conversion. Thanks. ...

JRuby: Rake fails with Gem::Version error

I get the following error on any call to rake. I am working on a Rails 3 running on JRuby (1.5.1) installed with RVM. I don't think this was always the case, but I'm not sure how to track it down. Am I correct in think this has something to do with the gems I have installed (listing included below)? $ rake metrics:all /Users/Eric/.rv...

Track down PermGen problem with JRuby on Rails in Tomcat

We're running a small web application written JRuby on Rails running under Tomcat. We're using a Spring back-end that's shared with another production web application. Unfortunately, we keep running into PermGen problems. OS: Ubuntu Linux 2.6.24-24-server #1 SMP x86_64 GNU/Linux Java: 1.6.0_21 Tomcat: 6.0.28 JRuby: 1.5.0 Rails: 2.3.7 W...