Tags

The following entries are tagged with “rails”:

We're hiring!

Bucking the trend of interplanetary meltdown, we're looking for some 'awesome' people to join our team. We're fleshing out the full details right now and will be posting ads in all the predictable places in the next few weeks, but in the meantime if you fall into any of the following job descriptions and are interested in applying send your CV and examples of your work through to .

These are all permanent positions, salaries are to be decided based on experience and skills but will be based on market rates, as will the overall package on offer. We're currently based in Fareham, Hampshire but may also be relocating soon - wherever we go will be within 15 miles and will be near a mainline station. So if you're currently London based then you'll need to suffer a nice commute (we've all done it the opposite way round!) or perhaps a nice reloaction to the Hampshire countryside.

Openings:

User Interface/Web Designer
We need someone with strong skills in designing web based interfaces and graphics. Our clients require designs that are clean, professional and modern with a sprinkling of innovation and spark. We're also interested in people who dabble in pixel art as it's a current favourite of ours and will give us a head start on some of our current internal projects!
Ruby Developer (x2)
We predominantly work with Ruby based applications. Whether it be Rails, Sinatra or anything else, we need someone proficient in Ruby as a language with a strong foundation in clean, sensible programming. The more skills you have, the more chance you have of getting a job with us - make sure your CV's are full of the things you can do rather than the names of as many technologies you can think of!

Experience is beneficial, but if you can demonstrate a keen background in the scene or can bring along a strong portfolio of homegrown projects for review then we're happy to consider you. Qualifications are secondary to skill, attitude and enthusiasm.

We are also happy to accept interns/gap year students falling into any of the above skillsets - send us your details and we'll take a look!

Discuss this entry

Quick Pow Tip - "Cannot get /"

We've been using Pow for a while now - it's really taken a lot of the leg work out of setting up the various projects for development.

There's a few things that trip me up now and then, one of them is the 'Cannot get /' message after symlinking a project.

The simple answer is a missing config.ru - there is a ticket open for the issue. Just add the standard Rails file and you should be away (or at least one step closer!):

# Rails.root/config.ru
require "./config/environment"
 
use Rails::Rack::LogTailer
use ActionDispatch::Static
run ActionController::Dispatcher.new

Also be aware that older versions of Rails may not have ActionDispatch::Static defined so your config.ru might actually need to be:

# Rails.root/config.ru
require "./config/environment"

use Rails::Rack::LogTailer
use Rails::Rack::Static
run ActionController::Dispatcher.new

Discuss this entry

Revisited: Tamper-proof cookies in Rails 3

Here's a revisited post that's fairly short and sweet: way back in 2008 I blogged about my implementation of tamper-proof cookies which used a similar technique to that used by Rails for its cookie-based session store. Back then the solution involved a custom cookie jar, the OpenSSL library to generate a HMAC, overriding the ApplicationController#cookies method and a slightly unorthodox method signature for reading cookie values.

Read more of this entry

Revisited: roll your own pagination links with will_paginate and Rails 3

With a final release of Rails 3 edging closer every day it seems like a good time to revisit some of my old articles from the last few years and bring them up to date.

Back in the summer of 2008 I wrote about custom link renderers using will_paginate and, as it is still one of the most popular posts on the blog, it’s the one I’ve decided to refresh first. Don’t worry if you haven’t read the original article as I’ll be covering the same things here. So without further ado, let’s get stuck in!

Read more of this entry

Rails 2.3.8, Rack 1.1 and the curious case of the missing quotes

If you're using Rails 2.3.8 for your application and thought that you were safe after May's comedy of errors produced three point updates in as many days, think again. Unfortunately there's a little bug that can lead to parameters being altered or potentially even truncated without warning.

Read more of this entry

InfiniDB, Infobright and MonetDB - Day 3: MonetDB

Day 3 of my database exploration mission brings me to MonetDB. Binary downloads are available for Debian, Fedora, Ubuntu and (strangely!) Windows! If we still had any Windows users left here at HQ then it'd be a rare treat, but instead (as usual) our platform of choice (Centos 5) isn't directly available in binary form. We downloaded the Fedora source RPMs and built our own - in case they're of any use then i've put them up on a Google Code site for others to download.

After installing the RPMs then you're ready to get started - before you can do anything you have to start the merovingian process (you could either setup an init script, or run the binary manually for now). For information, the instructions say:

merovingian is a daemon process that controls a collection of database servers, i.e. mserver5 processes, each looking after a single physical database. Start this program to gain access to your MonetDB database farm. merovingian is designed to be used in a system initialisation script in production environments.

With merovingian running then you're ready to create a database - for this you use monetdb - and then start the database using the same command for example:

> monetdb create twf
successfully created database 'twf'

> monetdb status
     name        state     
twf            stopped              
  
> monetdb start twf
starting database 'twf'... done

> monetdb status
     name        state     
twf            running

You now have a running database and can connect to it using mclient. This is similar to most command line clients where you can perform changes to your database as well as query for data.

The first step to transferring the database was as usual - inspect the schema on our MySQL database and update it to make the correct use of the supported data types. As with the other systems, there's no support for unsigned values, it also wasn't immediately obvious to me what the maximum length of a varchar is.

With the tables created it was time to try and migrate some data. Given MonetDB has been around for quite a while then there seemed to be pretty scarce resources with any detailed instructions - I couldn't, for example, find any simple migration tools or documentation detailing the best path for migration. I guess this could be because MonetDB is more often tackled by people with bigger brains or with more time to figure things out.

I attempted to use the following to dump data from MySQL:

select * from h into outfile '/dbtmp/tmp/h' fields terminated by "|" enclosed by '"';

And then the following to import into my MonetDB table:

copy 1000000 records into h from '/dbtmp/tmp/h' using delimiters '|','\n', '"'  null as '';

This yielded reasonable results - though I did have to do some tidying up in the middle with sed - in the end I gave up as there were some string values causing me problems, so I decided to rest on it and went to bed!

In the morning I came back to find the merovingian process was dead, and the status of the database was showing as crashed. I started up the processes and took a look at the status - it said the health was 67% so i'm not really sure what's going on with it!

Performance

In the time I had available I was only able to get a 1 million row table imported successfully to play with - a shocking performance I know, but MonetDB was being quite fussy and I wasn't pressing the right buttons! I did run a few tests and also ran them against the same dataset in MySQL for comparison, all are run from cold - i.e. MySQL and MonetDB are both restarted before each query. I don't expect these queries to be representative of real world cases, I was just thinking of some nasty queries that I could throw at a single table in order to cause some pain.

Query 1

MySQL takes 250msec:

sql>select count(*) from h;
+---------+
| L1      |
+=========+
| 1000000 |
+---------+
1 tuple
Timer       1.532 msec 1 rows
Query 2

MySQL takes 420msec:

sql>select count(*) from h group by intcolumn;
+-------+
| L2    |
+=======+
+-------+
65 tuples
Timer     142.260 msec 65 rows
Query 3

MySQL takes 44,000msec:

sql>select count(*) from h group by varcharcolumn;
+-------+
| L1    |
+=======+
+-------+
12743 tuples
Timer    1464.389 msec 12743 rows
Query 4

MySQL takes 37,500msec:

sql>select count(*) as total from h group by varcharcolumn order by total;
+-------+
| L1    |
+=======+
+-------+
12743 tuples
Timer    1496.537 msec 12743 rows
Query 5

MySQL takes 373,000msec (not a typo, it's more than 6 minutes):

sql>select count(*) as total from h group by varcharcolumn, anothervarcharcolumn order by total;
+-------+
| L1    |
+=======+
+-------+
69696 tuples
Timer    4170.520 msec 69696 rows

Summary

Obviously this quick trial of each of these is not comprehensive enough to make any solid comparisons of performance - the next step will be for me to go through and come up with a proper test plan in order to be a little more methodical about things. However, it has given me a good grounding in how the 3 systems compare with respect to installing and getting started. I'll be keeping a close eye on InfiniDB - while not stable enough right now, i'm sure they'll keep things rolling and I look forward to taking another look. If I can overcome the import obstacles and also the different 'feel' of MonetDB then the basic query results make a compelling case for taking a further look - there's also more to learn here with respect to architecture, deployment techniques, monitoring, etc. Finally, Infobright - it would make my life easier if we could use it on an insert/update/delete basis - as it is I think we'd have a tough time getting clients to pay the license fee - perhaps if bundled with something like EC2 instances with a smaller incremental cost then it may be more palletable and help to increase adoption (it may be that Infobright have lots of customers with open wallets - in which case please share them!). In terms of immediate ease of use, with some visible performance improvements, Infobright fits the bill - but until i've had a chance to compare MonetDB and Infobright in a bit more detail then i'll reserve my final judgement!

Discuss this entry

InfiniDB, Infobright and MonetDB - Day 2: Infobright

Day 2 of my tour of column based storage brings me on to Infobright Community Edition (ICE). The first impressive point was that based on my blog post of yesterday then I already had an email from Mark in Community Relations at Infobright offering help and advice - despite me calling him the wrong name (I was having a bad day!) then he was immediately helpful and also offered to get some of his team to look into my queries.

As an aside, John from Calpont was also kind enough to drop by to respond to some of my points - to me this gives me a warm fuzzy feeling that both Infobright and Calpont are taking the community seriously - I guess for these products to gain traction they need to make sure people can get motoring with them to improve adoption.

Read more of this entry

InfiniDB, Infobright and MonetDB - Day 1: InfiniDB

We're taking a whistlestop tour of some of the column based storage systems out there for a project we're working on (where the use case seems to fit better with this form of storage rather than straight MySQL). After reading through the series of articles on the MySQL Performance Blog then we chose to look at InfiniDB, Infobright and MonetDB - with the two that talk MySQL coming first for ease of integration right now. I'm also going to do this as a three parter - so first up is InfiniDB.

Read more of this entry

Protecting your Paperclip downloads

Way back last November when I first blogged about Paperclip I included a brief mention of hiding files behind a controller rather than simply putting them in the public directory for all to see. Since then I’ve noticed that the question of how to actually do this has come up regularly over on Rails Forum and a couple of weeks ago I had to figure out how to update some of our code to protect assets that we had migrated from local file system to Amazon S3 storage. So I figured it’s probably a worthwhile technique to share.

Read more of this entry

Bugmash!

Picture of a masher mashing a bugWell it’s day two of the first ever Rails BugMash and so far I’ve managed to score a sneaky 1,000 points just by updating my one-line binary fixtures test patch. Meanwhile Matt Duncan and Rizwan Reza are on fire with 4,350 and 4,000 points at the time of writing.

Unfortunately the event has coincided with what may be the only nice weekend of the Great British summer, so I’ve been torn between the chance to mash bugs or to enjoy the sunshine. I’m currently trying to combine the two sat out in the garden squinting to see my laptop screen in the glare of the sun!

My next attempt to score some points is an updated patch, now improved and including a test case, for a lack of quoting of aliased table names in SQL joins which has been (too eagerly) marked as resolved even though it’s still broken. If you get the opportunity please do take a look and comment on the ticket as it’d be nice to get it fixed.

After that, I’m hoping to try and sneak my patch for anonymous extension modules for belongs_to and has_one associations into the bugmash as it has been sat on Lighthouse since March and already has three +1s. Even if it isn’t eligible for the bugmash, I still think it’s a worthy patch so again please take a look and comment on the ticket if you get chance.

And of course there are still plenty more tickets tagged with bugmash to be looked at so even if you’ve never contributed to Rails before, now is a pretty good time to start!

Discuss this entry

Recent entries

Archives

  1. May 2011
  2. January 2011
  3. August 2010
  4. July 2010
  5. April 2010
  6. January 2010
  7. November 2009
  8. September 2009
  9. August 2009
  10. July 2009
  11. June 2009
  12. May 2009
  13. April 2009
  14. March 2009
  15. February 2009
  16. December 2008
  17. November 2008
  18. September 2008
  19. August 2008
  20. July 2008
  21. June 2008
  22. May 2008
  23. April 2008
  24. March 2008
  25. February 2008
  26. January 2008
  27. December 2007
  28. November 2007

Tags

  1. 37signals
  2. actioncontrollerdispatcher (nameerror)
  3. actionview
  4. active messaging
  5. activerecord
  6. activesupport
  7. actverecord
  8. aes
  9. aggregation
  10. ajax
  11. akismet
  12. amazon
  13. amazon sqs
  14. ami
  15. apache
  16. api
  17. apple
  18. apr
  19. apr-util
  20. async
  21. attachments
  22. attachment_fu
  23. attr_accessible
  24. auto scaling
  25. autotest
  26. availability
  27. aws
  28. backgroundrb
  29. beanstalkd
  30. bindings
  31. bj
  32. block
  33. branding
  34. buckets
  35. bug
  36. bugmash
  37. cache
  38. caching
  39. callbacks
  40. cancer research uk
  41. cdn
  42. centos
  43. charity
  44. cloud
  45. cloudfront
  46. clusters
  47. column information
  48. columns
  49. community
  50. company name
  51. compatibility
  52. compiler
  53. composed_of
  54. config.ru
  55. consultancy
  56. content
  57. content delivery
  58. controller
  59. convert
  60. cookies
  61. csrf
  62. css
  63. data warehouse
  64. database
  65. dates
  66. defensio
  67. deployment
  68. design
  69. development
  70. dhtml
  71. docrails
  72. documentation
  73. donations
  74. drdb
  75. duplicate key
  76. ebs
  77. ec2
  78. elastic
  79. elastic block store
  80. elastic load balancing
  81. encoding
  82. encryption
  83. erb
  84. error
  85. european
  86. events
  87. exalead
  88. ezcrypto
  89. facebook
  90. fckeditor
  91. feedburner
  92. feeds
  93. ffmpeg
  94. filter
  95. fixes
  96. flash
  97. flickr
  98. flickr api
  99. flickr_fu
  100. fuse
  101. geekup
  102. gems
  103. geocode
  104. git
  105. github
  106. god
  107. great south run
  108. greenplum
  109. growl
  110. hacker
  111. haml
  112. haproxy
  113. helper
  114. hmac
  115. holiday
  116. hooks
  117. hosting
  118. howto
  119. hpricot
  120. html
  121. identity
  122. imagemagick
  123. imagescience
  124. infinidb
  125. infiniteftp
  126. infobright
  127. init.d
  128. insert
  129. invalid authenticity token
  130. italy
  131. javascript
  132. jobs
  133. jquery
  134. json
  135. leeds media
  136. limit
  137. linkrenderer
  138. linux
  139. load balancing
  140. logo
  141. mac
  142. markaby
  143. mass-assignment
  144. memcached
  145. mephisto
  146. messageverifier
  147. messaging
  148. middleware
  149. migrate
  150. migration
  151. model
  152. mod_rails
  153. mod_ruby
  154. monetdb
  155. mongrel
  156. mongrel_cluster
  157. monit
  158. monitoring
  159. mootools
  160. mp3
  161. mq
  162. multiple gems
  163. multiselect
  164. mysql
  165. neon
  166. new site
  167. nginx
  168. observer
  169. offset
  170. open source
  171. opensolaris
  172. openssl
  173. optimisation
  174. pagination
  175. paperclip
  176. parameters
  177. params
  178. passenger
  179. patch
  180. performance
  181. permanentredirect
  182. persistence
  183. persistent storage
  184. persistentfs
  185. php
  186. phusion
  187. plugin
  188. plugins
  189. post commit
  190. post-commit
  191. pow
  192. protomultiselect
  193. prototype
  194. query
  195. queues
  196. quotes
  197. race for life
  198. rack
  199. rails
  200. rails development
  201. rails patch
  202. rails plugin
  203. rails-doc
  204. rails3
  205. rake
  206. refresh
  207. renderer
  208. respond_to
  209. rich text editor
  210. rmagick
  211. ruby
  212. ruby on rails
  213. rubyinline
  214. running
  215. rvideo
  216. s3
  217. s3fs. elasticdrive
  218. scaling
  219. schema
  220. schwarzenegger
  221. scm
  222. search based applications
  223. security
  224. services
  225. session
  226. shorthand
  227. signed
  228. snarl
  229. social
  230. solaris
  231. spam filter
  232. sparrow
  233. specify
  234. sponsorship
  235. sql
  236. sqlite3
  237. sql_logging
  238. starling
  239. starter kit
  240. storage
  241. streaming
  242. subversion
  243. sue ryder care
  244. survey
  245. svn
  246. swfupload
  247. swig
  248. sysadmin
  249. tables
  250. tamper
  251. templates
  252. the webfellas
  253. thewebfellas
  254. thin
  255. thumbnail
  256. time zone
  257. tinymce
  258. tip
  259. tips
  260. to-done
  261. training
  262. transcoding
  263. twitter
  264. tzinfo
  265. ui
  266. uk
  267. uk rails
  268. unsigned
  269. update
  270. uploads
  271. url
  272. ux
  273. validation
  274. version
  275. video
  276. view
  277. vmdk
  278. vmware
  279. webfellas
  280. webfellows
  281. wedding
  282. welcome
  283. widgeditor
  284. will_paginate
  285. win32
  286. windows
  287. wysiwyg
  288. xen
  289. xhtml
  290. xvm
  291. youtube
  292. zenoss
  293. zentest
  294. zfs

Flickr snaps