Monday, October 12, 2009

Deploying ImageScience to Debian

‹prev | My Chain | next›

After cleaning up a few minor issues, I have all of my RSpec examples passing:
jaynestown% rake                                      
(in /home/cstrom/repos/eee-code)

==
Sinatra app spec
.......................................................

Finished in 1.89 seconds

55 examples, 0 failures

==
Helper specs
..........................................................................................

Finished in 0.13 seconds

90 examples, 0 failures

==
View specs
..............................................................................................................

Finished in 1.37 seconds

110 examples, 0 failures
All of the Cucumber scenarios are passing as well:

jaynestown% cucumber features
...
39 scenarios (1 pending, 38 passed)
344 steps (1 pending, 343 passed)
0m43.335s
I have my various Rack middlewares configured so I think I am ready to deploy to the beta site:
jaynestown% rake vlad:stop_app
jaynestown% rake vlad:update vlad:migrate vlad:start_app
I run into a small problem with ImageScience and RubyInline. Specifically, I see errors similar to:
/home/cstrom/.ruby_inline/Inline_ImageScience_cdab.c:2:23: error: FreeImage.h: No such file or directory
/home/cstrom/.ruby_inline/Inline_ImageScience_cdab.c: In function ‘unload’:
/home/cstrom/.ruby_inline/Inline_ImageScience_cdab.c:8: error: ‘FIBITMAP’ undeclared (first use in this function)
/home/cstrom/.ruby_inline/Inline_ImageScience_cdab.c:8: error: (Each undeclared identifier is reported only once
...
I ultimately track that down to a missed system level package. I use Ubuntu for my development box, but Debian for the deployment server. On the former, the freeimage development packages was libfreeimage3-dev, but on Debian it should be libfreeimage-dev (without the 3). I had missed the no-such package warning in the apt-get output. No doubt this is the kind of thing that Chef would address.

At any rate, I now have the thumbnailing site up and running on the beta site, and the images are nice and small on the homepage:



I still need a proper 404 page and one last bit of seed data. Then I am done with my chain.

1 comment: