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


8 thoughts on “Getting Catarse to Build and Run

  1. This guide is extremely helpful. Could you make more guides along the way? I’m sure there are many people it would benefit from guides like this explaining the basics of how to customize the Catarse platform. Please consider it! Thanks!

    1. Thanks! At the moment I’m deep in the process of replacing things like the header, changing page content, and getting my head wrapped around Compass and grid-whatever, as the whole grid thing is a mystery to me — especially when I comment out the sass .grid lines and there’s no visible change!!!

  2. Hi Marc,

    Fantastic tutorial, many thanks! I was wondering about the step above “pgadmin3 -> connect -> create the database catarse_development and catarse_test “. What is the precise syntax for actually creating those databases?

    Kind Regards,

    1. I’m using pgadmin3, the UI for Postgres, so after connecting to my Postgres server (the power plug icon on the toolbar), I right-clicked on the “Databases” tree node and selected “New database…” fro the popup menu.

  3. Hi Marc

    Thanks for the advice & info! I’ve been reading your blogs, and I finally have Catarse up & running on ubuntu 12. Sorry to be a bother, but do you know if the admin function is meant to be working currently? I used the latest stable build, but when I go to /en/admin, I get some sort of routing error (“RecordNotFound in ProjectsController”). I’ve seen some blog & news posts indicating there may be problems with the admin function.

    I’ve created a base user, and registered them as admin in rails console, so I think I’ve done the prerequisite stuff. If by any chance it’s something you’re aware of I’d be very grateful.

    All the best,

    1. Hi Andrew,

      Thanks for your post on my blog.

      I find that the following pages work:


      However, en/adm/users does not work, giving me an “undefined method ‘provider’ ” error.

      (Note that all the URLS’s are “adm”, not “admin”)

      Provider seems to be a field that’s supposed to be in the users table, however migration 20130225141802_alter_user_drop_provider_uid_constrants seems to drop this field:

      ALTER TABLE users ALTER provider DROP NOT NULL;

      So, for the moment, I’ve simply commented out the references to the provider column in users\index.html.slim here:

      /th= t(‘.provider’)

      and here:

      /td= user.provider

      Hope that helps, and thanks for getting me to look through the admin pages again, it would have been a while before I saw that problem.

  4. HI Marc, great blog, this is invaluable.

    How long did it take you to get Catarse up and running to an acceptable level? I’ve been asked to quote for a job using the platform and I’m unsure whether 2 weeks is enough. Am I hideously naive?

    1. For the latest codebase, it’s quite fast. Except a weird subdomain config I think Catarse people need to put into the documentation. It takes me three hours to figure out.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s