Getting Catarse to Build and Run

I’m working on a crowd-funding website for a client out in Colorado, and we’re basing our work on Catarse, an open source Ruby on Rails crowd-funding website.  Getting a build of Catarse to actually run has not been easy, so I’m documenting the steps I’ve taken so far – there are still a couple kinks to work out, but it does come up.

Because I’m working on a Windows platform, I run Ubuntu in a VM, which does offer me the luxury of starting from a completely clean install – I was not able to get Catarse running with my other Ubuntu VM’s which already have other Ruby on Rails projects loaded in them, nor have I gotten Catarse to run natively in Windows, which is something I would very much like to succeed in doing.

Therefore, I started with a clean Unbuntu VM (see here).


“dev” Components

sudo apt-get install git-core
sudo apt-get install curl
sudo apt-get install zlib1g-dev
sudo apt-get install libyaml-dev
sudo apt-get install libsqlite3-dev
sudo apt-get install nodejs
sudo apt-get install build-essential
sudo apt-get install libxml2-dev
sudo apt-get install libxslt-dev
sudo apt-get install libcurl4-openssl-dev
sudo apt-get install libmagickwand-dev
sudo apt-get install postgresql
sudo apt-get install libpq-dev


curl -L | bash -s stable
source /home/ubuntu/.rvm/scripts/rvm

Download Catarse

git clone
cd catarse

Configure database.yml

cd config
cp database.sample.yml database.yml
[edit the username and password]
cd ..

Download Ruby & Rails

rvm install ruby-1.9.3-p448
gem install rails -v 3.2.12


bundle install

Install PostgreSql

sudo apt-get install pgadmin3

Create Database

sudo -u postgres psql
[enter password twice]

pgadmin3 -> connect -> create the database catarse_development and catarse_test

Install PostgreSql-Contrib

sudo apt-get install postgresql-contrib

(the database should restart automatically,
otherwise: sudo /etc/init.d/postgresql-8.4 restart)

Catarse DB Initialization and Additional Configuration

Migration and Seeding

rake db:migrate
rake db:seed

Change the Locale

In initializers\locale.rb, change:

I18n.default_locale = :pt


I18n.default_locale = :en

Other Useful Things

I use RubyMine as my development IDE, which requires a JDK.

JDK RubyMine

sudo apt-get-install openjdk-7-jre

or download from here:

and follow instructions here:

Catarse Issues

Route error

This is in app/views/devise/sessions/new.html.slim:

-> h3=t(‘.with_facebook_subtitle’)
-> = link_to t(‘layouts.login.login_with_facebook’), user_omniauth_authorize_path(provider: ‘facebook’, locale: nil), :class => ‘facebook_start’
h3=t(‘.google_step_1’, link: (link_to t(‘devise.links.forgot_password’), new_password_path(resource_name))).html_safe


Removed the indicated lines.

Strange tags at the top of the page:

Getting some strange tags at the top of each page:

Description” name=”description” />Keywords” name=”keywords” />

I removed these lines (23 & 24) from app/views/layouts/application.html.slim:

meta name=”description” content=t(‘site.description’)
meta name=”keywords” content=t(‘site.keywords’)

uservoice_sso issue:

undefined method `+’ for nil:NilClass

NoMethodError – undefined method `+’ for nil:NilClass:
ezcrypto (0.7.2) lib/ezcrypto.rb:550:in `get_key’
ezcrypto (0.7.2) lib/ezcrypto.rb:84:in `with_password’
lib/uservoice_sso.rb:13:in `generate’
app/controllers/application_controller.rb:45:in `display_uservoice_sso’

FIX (to be done):

Create a uservoice account, and see this example:

and read more here:

Alternatively, do as “ianfleeton” suggested (see issue ticket):

Configuration.create(name: 'uservoice_subdomain', value: 'xyzzyexample')
Configuration.create(name: 'uservoice_sso_key', value: 'xyzzyexample')

nil in User.has_facebook_authentication?


Add check for oauth == nil:

def has_facebook_authentication?
oauth = OauthProvider.find_by_name ‘facebook’
return false if oauth.nil? # <— added this line

Alternatively, get the facebook dev ID stuff set up?

ActionController::RoutingError – No route matches {:controller=>”omniauth_callbacks”, :action=>”passthru”, :provider=>”facebook”}:

In app/views/users/_current_user_fields.html.slim line 23:

= link_to t(‘layouts.login.login_with_facebook’), user_omniauth_authorize_path(provider: ‘facebook’, locale: nil), class: ‘facebook_start’

FIX (sort of):

Changed above (see “nil in User.has_facebook_authentication?) to return true!!!!

Finally, Launching the Server

at the terminal:

/bin/bash –login (I have to do this, you may not need to)
rails s

The website should now come up!

— Marc


Unit Testing Succinctly

Woohoo! If you want a refreshing view of unit testing (would you expect anything else, hahaha) download Unit Testing Succinctly[^].

Incidentally, I quite enjoyed working with SyncFusion – they paid decently for the book, did some great editing, and the entire experience was very pleasant.