JRuby, Rails, Tomcat, ElasticBeanstalk and environment variables

I’ve been refactoring a Rails 3 application with a spaghetti configuration mess into something more in line with The Twelve Factor App where I’m using the dotenv gem for configuration. (One day we may want to use a service like Consul for configuration. That day is not yet today.) I also wanted to see what […]

JRuby on Rails and uninitialized constant in production

I recently solved a particularly troublesome issue where our QA environment (configured just like production) was unable to load a class that we kept in our lib/ directory in our Rails application. In application.rb I have this: # ./config/application.rb config.autoload_paths += %W(#{config.root}/lib) And you might think that ought to be enough. Classes defined under lib, […]

Trinidad + “SEVERE: A child container failed during start”

If you’re using Trinidad to run your JRuby/Rails application and you get SEVERE: A child container failed during start its likely that the JVM isn’t getting enough memory. Maybe you’re using Spring and a host of other jars that your application relies upon. You can get around this by running: # shell jruby -J-Xmx1024m -S […]