<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" xml:lang="en-US">
  <title>Rails Boxcar Blog - Home</title>
  <id>tag:blog.railsboxcar.com,2009:mephisto/</id>
  <generator version="0.8.0" uri="http://mephistoblog.com">Mephisto Drax</generator>
  
  <link href="http://blog.railsboxcar.com/" rel="alternate" type="text/html" />
  <updated>2009-06-13T23:01:57Z</updated>
  <link rel="self" href="http://feeds.feedburner.com/railsboxcar" type="application/atom+xml" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><entry xml:base="http://blog.railsboxcar.com/">
    <author>
      <name>alex</name>
    </author>
    <id>tag:blog.railsboxcar.com,2009-06-13:10</id>
    <published>2009-06-13T23:01:00Z</published>
    <updated>2009-06-13T23:01:57Z</updated>
    <link href="http://feedproxy.google.com/~r/railsboxcar/~3/E-e-ri9K6y8/new-boxcar-default-nginx-passenger" rel="alternate" type="text/html" />
    <title>One-command deployments with Nginx and Passenger</title>
<content type="html">
            &lt;p&gt;Many people, myself included, learned to love the simplicity of &lt;a href="http://wiki.nginx.org/"&gt;nginx&lt;/a&gt; back in the mongrel days. When &lt;a href="http://phusion.nl"&gt;Phusion&lt;/a&gt; &lt;a href="http://modrails.com"&gt;Passenger&lt;/a&gt; was first released we grudgingly switched to Apache to get the new hotness. When the Phusion team announced support for nginx we immediately got to work testing it and getting our Boxcar images ready to use it.&lt;/p&gt;


	&lt;p&gt;Today we’re officially rolling out the new images! All new Boxcar accounts will now ship with Nginx + Passenger as the default web server. Apache is still installed and ready to roll, we’re just using nginx by default.&lt;/p&gt;


	&lt;p&gt;More importantly, this release now includes support for the latest release of our &lt;a href="http://github.com/planetargon/boxcar-conductor/tree/master"&gt;boxcar-conductor plugin&lt;/a&gt;. Our team has been hard at work simplifying deployments to our Boxcar platform, and the latest release of boxcar-conductor allows you to configure your Boxcar and deploy your application with a single command. We’ve made a brief screencast to show you this new feature in action:&lt;/p&gt;


	&lt;p&gt;&lt;a href="http://screencast.com/t/9UoB8oYy"&gt;&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;If you’ve been thinking about getting started with a Boxcar, or maybe getting a second account for another development project, now is the perfect time.&lt;/p&gt;
          &lt;img src="http://feeds.feedburner.com/~r/railsboxcar/~4/E-e-ri9K6y8" height="1" width="1"/&gt;</content>  <feedburner:origLink>http://blog.railsboxcar.com/2009/6/13/new-boxcar-default-nginx-passenger</feedburner:origLink></entry>
  <entry xml:base="http://blog.railsboxcar.com/">
    <author>
      <name>alex</name>
    </author>
    <id>tag:blog.railsboxcar.com,2009-06-11:11</id>
    <published>2009-06-11T17:36:00Z</published>
    <updated>2009-06-12T18:36:15Z</updated>
    <category term="security" />
    <link href="http://feedproxy.google.com/~r/railsboxcar/~3/VZfkUjQqhb0/ruby-bigdecimal-vulnerability" rel="alternate" type="text/html" />
    <title>Ruby BigDecimal vulnerability</title>
<content type="html">
            &lt;p&gt;A potential &lt;a&gt;DoS vulnerability&lt;/a&gt; was discovered in Ruby. Both &lt;span class="caps"&gt;MRI&lt;/span&gt; and Ruby Enterprise Edition are affected. An &lt;a href="http://blog.phusion.nl/2009/06/10/ruby-enterprise-edition-186-20090610-released-fixes-bigdecimal-dos-vulnerability/"&gt;updated version&lt;/a&gt; of &lt;span class="caps"&gt;REE&lt;/span&gt; that addresses the issue has been released.&lt;/p&gt;


	&lt;p&gt;&lt;del&gt;We are currently putting together an upgrade script that will allow all of our Boxcar customers to update their installations as quickly as possible. We will post an update here and &lt;a href="http://twitter.com/boxcar"&gt;on Twitter&lt;/a&gt; with instructions as soon as the fix is ready.&lt;/del&gt;&lt;/p&gt;


	&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt; (&lt;em&gt;2009/06/12 11:34 &lt;span class="caps"&gt;PDT&lt;/span&gt;&lt;/em&gt;): A fix has been deployed to all customer Boxcars. As this will make some pretty big changes we require that you manually run the upgrade so that you can respond to any issues that might happen. We have tested the upgrade with all “stock” Boxcar instances, but we cannot account for errors that might arise with customized Boxcar setups.&lt;/p&gt;


	&lt;p&gt;To run the upgrade, log into your Boxcar as &lt;code&gt;root&lt;/code&gt; and run &lt;code&gt;boxcar-ree-upgrade&lt;/code&gt;.&lt;/p&gt;


	&lt;p&gt;If you are using a Boxcar image that does not use Ruby Enterprise Edition, you can still use the script to get Ruby Enterprise Edition running on your Boxcar, but it will not be used by default. You will need to &lt;a href="http://railsboxcar.com/support"&gt;contact support&lt;/a&gt; to get the remaining few changes made.&lt;/p&gt;
          &lt;img src="http://feeds.feedburner.com/~r/railsboxcar/~4/VZfkUjQqhb0" height="1" width="1"/&gt;</content>  <feedburner:origLink>http://blog.railsboxcar.com/2009/6/11/ruby-bigdecimal-vulnerability</feedburner:origLink></entry>
  <entry xml:base="http://blog.railsboxcar.com/">
    <author>
      <name>alex</name>
    </author>
    <id>tag:blog.railsboxcar.com,2009-05-06:6</id>
    <published>2009-05-06T19:38:00Z</published>
    <updated>2009-05-06T19:39:29Z</updated>
    <category term="pdf" />
    <category term="tutorial" />
    <link href="http://feedproxy.google.com/~r/railsboxcar/~3/7VTi-bDOoVc/using-pdftk-to-work-with-pdfs-intelligently" rel="alternate" type="text/html" />
    <title>Transforming PDFs</title>
<content type="html">
            &lt;p&gt;If you have a Ruby/Rails app that needs to work with PDFs, you’ve probably used &lt;a href="http://ruby-pdf.rubyforge.org/pdf-writer/index.html"&gt;&lt;span class="caps"&gt;PDF&lt;/span&gt;::Writer&lt;/a&gt; at some point. It’s a very handy way of creating new PDFs. But what about working with pre-existing PDFs? Wouldn’t it be great if you could programmatically transform PDFs by splitting them up, putting them back together, etc? Well you can!&lt;/p&gt;
&lt;p&gt;Working on a recent project, input was provided in the form of a 6,000 page &lt;span class="caps"&gt;PDF&lt;/span&gt;. Worse yet, there was actual &lt;strong&gt;data&lt;/strong&gt; that needed to be extracted from these PDFs. So what do you do?&lt;/p&gt;
&lt;h3&gt;pdftk to the rescue!&lt;/h3&gt;
&lt;p class="footnote"&gt;&lt;sup&gt;1&lt;/sup&gt; Along with xpdf-tools for extracting text&lt;/p&gt;
&lt;p&gt;There’s a wonderful suite of programs called &lt;a href="http://www.accesspdf.com/pdftk/"&gt;pdftk&lt;/a&gt; (the &lt;span class="caps"&gt;PDF&lt;/span&gt; toolkit) that allows you to do all sorts of interesting things with PDFs. In this case, we’re going to use it to &lt;code&gt;burst&lt;/code&gt; the original &lt;span class="caps"&gt;PDF&lt;/span&gt; into individual files (1 per page), parse the &lt;code&gt;text&lt;/code&gt; inside of it, and then concatenate (&lt;code&gt;cat&lt;/code&gt;) individual pages into larger files.&lt;/p&gt;
&lt;h3&gt;Installation&lt;/h3&gt;
&lt;p&gt;If you’re working on a Mac (and are using &lt;a href="http://www.macports.org/"&gt;MacPorts&lt;/a&gt;) installation is quite simple. You will also want to install the xpdf-tools package to allow you to access the actual text data in the &lt;span class="caps"&gt;PDF&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;sudo port install pdftk&lt;/code&gt;&lt;br /&gt;
Download the &lt;a href="http://users.phg-online.de/tk/MOSXS/xpdf-tools-3.dmg"&gt;pre-compiled xpdf-tools binaries&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;If you’re on a Debian-based Linux distribution (like Ubuntu or if you’re using a &lt;a href="http://railsboxcar.com"&gt;Rails Boxcar&lt;/a&gt;), just do:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;aptitude install pdftk xpdf-utils&lt;/code&gt;&lt;/p&gt;
&lt;h3&gt;Bursting the input&lt;/h3&gt;
&lt;p&gt;The first step is to “burst” the input file into individual pages. This can be done simply:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;pdftk inputfile.pdf burst&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;This will produce individual PDFs named pg_X.pdf (where X is the page number).&lt;/p&gt;
&lt;h3&gt;Extracting text&lt;/h3&gt;
&lt;p&gt;Next, we will use the pdftotext utility from xpdf-tools to get actual &lt;strong&gt;data&lt;/strong&gt; from these files:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;pdftotext pg_001.pdf -&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;This will output pg_001.pdf as plain text on standard output, from here you can parse the data and use anything you need.&lt;/p&gt;
&lt;h3&gt;Concatenating PDFs into a single file&lt;/h3&gt;
&lt;p&gt;Finally, what if you need to concatenate a few different files into a single &lt;span class="caps"&gt;PDF&lt;/span&gt;? Once again, pdftk to the rescue:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;pdftk pg_001.pdf pg_002.pdf cat mynewfile.pdf&lt;/code&gt;&lt;/p&gt;
&lt;h3&gt;Conclusion&lt;/h3&gt;
&lt;p&gt;That’s all there is to it. Do you have any interesting solutions for dealing with PDFs in your applications? Share them with us!&lt;/p&gt;
          &lt;img src="http://feeds.feedburner.com/~r/railsboxcar/~4/7VTi-bDOoVc" height="1" width="1"/&gt;</content>  <feedburner:origLink>http://blog.railsboxcar.com/2009/5/6/using-pdftk-to-work-with-pdfs-intelligently</feedburner:origLink></entry>
  <entry xml:base="http://blog.railsboxcar.com/">
    <author>
      <name>alex</name>
    </author>
    <id>tag:blog.railsboxcar.com,2009-04-06:2</id>
    <published>2009-04-06T18:45:00Z</published>
    <updated>2009-04-06T18:46:11Z</updated>
    <link href="http://feedproxy.google.com/~r/railsboxcar/~3/bSWM0n1yrZg/welcome" rel="alternate" type="text/html" />
    <title>Welcome!</title>
<content type="html">
            &lt;p&gt;Welcome to the Rails Boxcar blog! We heard this “Internet” thing was cool, and someone mentioned this “blogging” thing, so we figured we’d get our feet wet! ;)&lt;/p&gt;
&lt;p&gt;One of the things that we’ve noticed with most of our customers is that we speak with them briefly when they first sign up, and then have very little communication moving forward. While we are, of course, glad to see that our Boxcars are working so well for everyone that they don’t need to contact us, we also wanted to help establish more of a community presence for our customers. We will occasionally be putting up service-specific updates here moving forward, but the goal of this blog is for us to share information about deploying Rails apps and get feedback from the community.&lt;/p&gt;
&lt;p&gt;But we know that introductory posts with no real content are boring, so we’ll leave it at that for now. In the future you can look forward to seeing more posts from &lt;a href="http://planetargon.com/who-we-are/alex-malinovich"&gt;Alex&lt;/a&gt; and &lt;a href="http://planetargon.com/who-we-are/robby-russell"&gt;Robby&lt;/a&gt;, as well as any other &lt;a href="http://planetargon.com/who-we-are"&gt;Planet Argon&lt;/a&gt; peeps that feel like dropping in.&lt;/p&gt;
          &lt;img src="http://feeds.feedburner.com/~r/railsboxcar/~4/bSWM0n1yrZg" height="1" width="1"/&gt;</content>  <feedburner:origLink>http://blog.railsboxcar.com/2009/4/6/welcome</feedburner:origLink></entry>
</feed>
