Skip to content

Instantly share code, notes, and snippets.

@Hakon
Created May 22, 2012 18:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Hakon/2770840 to your computer and use it in GitHub Desktop.
Save Hakon/2770840 to your computer and use it in GitHub Desktop.
Jruby-rack with rails send_file bug
%w(action_controller/railtie).map &method(:require)
run JrubyRackTest ||= Class.new(Rails::Application) {
config.secret_token = routes.append { root to: 'send_file#deliver' }.inspect
initialize!
}
class SendFileController < ActionController::Base
def deliver
send_file Rails.root.join("testdata.jpeg")
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment