Running Padrino Tests on JRuby

This one tripped me up, and I thought others might run into it.

If you are trying to run a set of specs under Padrino, you usually run:

padrino rake spec -e test

But this was blowing up for me with the following error:

ArgumentError: Java package `java.sql' does not have a method `send'

You have to remember to run the tests in test mode, so try running padrino rake spec -e test

It also helps to have the rack-test gem in your Gemfile under the development block:

group :test do
  gem "rack-test", :require => 'rack/test'
end

Hope that helps you get your tests running.

Advertisements
This entry was posted in Uncategorized and tagged , , . Bookmark the permalink.

One Response to Running Padrino Tests on JRuby

  1. Joe Meirow says:

    Ciarán – it is downright eerie how similar our situations are! Your entire evolution…CF to Ruby, the need to run on Windows, eyeing JRuby as the “abstraction layer”, if you will, to cushion us from Windows to looking at, and in your case selecting, Padrino. I am just beginning this process so you’re about a year ahead of me. I will check back often to see how it’s going. Thanks so much for your willingness to blog about your experiences.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s