Blog

Filtering all blogs tagged as "rails."    Clear filter

Open Source Digital Signage Solutions Comparison4

Recently, I have been working on a project that materializes the Digital Signage concept. In fact, it was built from scratch based on the customer request. Later on, I have done a quick research to see if there are open-source or free solutions available in the market. Here are the conslusions of my comparison:
 

Solution Language Maintained Media Maturity
Concerto PHP Discontinued Text, Image Moderate
Concerto v2 Ruby/Rails High Text, Image Moderate
Xibo PHP High Text, image,
video
High
RiseVision N/A High Text, Image High
Vodigi C# High Text, image,
video
High
OpenSplash C# High
Low

 

(cont.)

Solution Distribution License Notes
Concerto Hosted GPL v3 Demo
Concerto v2 Hosted Apache v2
Xibo SaaS and
Hosted
AGPL v3 Supports Android clients
RiseVision SaaS Free
Vodigi Saas and
Hosted
Free and GPL v2 Interactive content
OpenSplash Hosted Custom license based on GPL v3  
 

 

Read More

Rails Translation Center Gem

A common task in most of Rails applications is to use internationalization. You have to work with yaml and text files to manage your web application translations. Sometimes, you need your system users to help you translating it to several languages. So, you need a user friendly and easy tool to translate your web application.

In BadrIT we solved this problem and developed Translation Center, A multi-lingual, GUI rich, community based, translation Center for Rails apps. It builds a translation center community with translators and admins from your system users.

 

 

Read More

Rails Helper including another helper problem in Development mode

I had a tough couple of hours fighting with Rails helpers , my desire was to include a helper inside another one to have a method of that other helper aliased, so I wrote the following:
 
module MyHelper

  include TheirHelper

  def their_method_with_my_mehtod
    puts their_method_without_my_method
  end

  alias_method_chain :my_method, :their_method

end
That worked with the first request, but subsequent requests, throwed a "Stack overflow error", because in development mode, helper is re-included and the two methods "their_method_with_my_mehtod" and "their_method_without_my_method" became pointing to the same thing, so the solution was:
 
 
module MyHelper

  include TheirHelper

  def their_method_with_my_mehtod
    puts their_method_without_my_method
  end

  alias_method_chain :my_method, :their_method unless method_defined?(their_method_without_my_method)

end

Another way to do that is through writing "unloadable" at the module start
module MyHelper

  unloadable # prevent it from being unloaded in development mode
             # other wise, a stack overflow exception will be 
             # thrown due to the alias method chain being called twice
  include TheirHelper

  def their_method_with_my_mehtod
    puts their_method_without_my_method
  end

  alias_method_chain :my_method, :their_method unless method_defined?(their_method_without_my_method)

end

Read More

Rasem, draw SVG images using ruby1

The web is moving to HTML 5 where SVG images are the standard images to use. But how to generate SVG images to include? You might draw static SVG images and include them in your web site but this will not help with generated SVG images with dynamic data. Of course,  you can read the complete specification of SVG and generate your own images; these are a few hundreds of pages; good luck with that :)

The elegant solution is to use Rasem, a pure ruby gem, to generate SVG images. Rasem allows you to describe your SVG images in pure ruby code. You can either save the generated image to a file or output it to a string to use it with your HTML 5 page. Rasem generates standard SVG images that are compliant with the W3C standard.

gem install rasem

and have fun!

Checkout the project main page at: http://github.com/aseldawy/rasem

You can find examples and usage instructions there.

Read More

Heroku currently active username, How to change on Mac OSX or Linux ?!

If you are already using Heroku on your Mac or Linux with some email like me@x.com and you want change the currently active username on your Mac to other like me@y.com, you should do the following:

Read More
« Previous Entries