RVM – no such file to load — openssl

Installed ruby 1.9.2 via RVM and getting the following error? no such file to load -- openssl Try getting RVM to install the required openssl files. Unfortunately this means removing ruby and installing it again. rvm pkg install openssl rvm remove 1.9.2 rvm install 1.9.2 --with-openssl-dir=$HOME/.rvm/usr But...

Running Resque Workers from Upstart + RVM

I recently had the task of getting resque workings to start from Ubuntu’s upstart daemon. First I created a bash script with the following; #!/bin/bash # Load RVM into the shell source "$HOME/.rvm/scripts/rvm" # Switch to the right RVM version rvm 1.9.2 # CD to the rails app cd /home/myapp/ #...

Valum Fileupload +jQuery +csrf

I recently went to implement Valum’s Fileupload script with a Ruby on Rails jQuery project I was working on. One thing I figured out is that all requests in Rails3 must send also send the X-CSRF-Token. Now normally the rails.js jQuery adapter takes care of this; but Valum’s fileupload script...

Ruby On Rails AJAX File Upload With Valum

Some sample code I wrote with Andrew Valums’s AJAX uploader script and Ruby On Rails. Note; I use the prototype javascript library to manipulate the DOM during the onComplete event. If you need any help getting this to work, simply use the comments below. function createUploader(){ var...

rake db:seed | Don’t know how to build task error

So I ran into a little issue today, I wasn’t able to get my rake db:seed task to work. This is the error I was getting; rake db:seed don't know how to build task The solution? Update rails to 2.3.5 How? gem update rails Did you like this? Share it:Tweet

Will_paginate with multiple models

If you need to implement paging in your Ruby on Rails application, a quick and easy way is to use the fantastic “Will_Paginate” plugin (available here). However I came across a need to paginate multiple models on the same page, for example; a list of users and a list of groups. Luckily Google...

Capistrano issues – no such file or directory

So I was playing around with my new Slicehost the other day and following their guides to automate a Ruby on Rails deployment process using capistrano. For those that don’t know, capistrano comes as a ruby gem which allows you to completely automate tasks. In my case, I wanted to remotely tell...

Installing Postgres gem on Windows

So you’re trying to install the postgres gem for ruby on rails, but you’re getting the following message; Could not find PostgreSQL build environment (libraries & headers): Makefile not created This is most likely due to the fact that you’re not using the mswin32 gem for Ruby. Give...