Ruby on Rails Application Deployment with Passenger on Fedora

Installation:

  • Install apache development libraries
    • yum -y install httpd-devel
  • Install Passenger (Ruby on Rails Server used for Deployment)
    • gem install passenger
  • Install passenger-apache module (Passenger binding with Apache)

Configure virtual host for your RoR apps on apache server

  • cd /var/www/html
  • ln -s ~/myapp/public myapp
  • edit /etc/httpd/conf/httpd.conf
    • LoadModule passenger_module /usr/lib/ruby/gems/1.8/gems/passenger-3.0.6/ext/apache2/mod_passenger.so
    • PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-3.0.6
    • PassengerRuby /usr/bin/ruby
    • <VirtualHost *:80>
    •       RailsBaseURI /myapp
    •       <Directory /var/www/html/myapp>
    •            Options -MultiViews
    •            Options FollowSymLinks
    •       </Directory>
    • </VirtualHost>

Modify apache configuration on the proxy server

  • edit /etc/httpd/conf/httpd.conf
  • add following lines
    • <VirtualHost *:80>
    •       ProxyPass /myapp http://myhost/myapp
    •       ProxyPassReverse /myapp http://myhost/myapp
    • </VirtualHost>

Some quick tips

  • Use rails helper tags instead of direct html tags (e.g. ‘image_tag’ in place of ‘img src’, ‘link_to’ or ‘url_for’ in place of ‘a href’, etc)
  • Use javascript_include_tag and javascript_include_tag when stylesheet, images, javascripts are not loading.
  • Make sure public directory of ‘myapp’ has necessary permissions for apache user
  • If you are dealing with SELinux enabled server, you might want to take care of SELinux permissions for passenger as well (though SELinux enabled, permissive mode runs without any error! Hint!!!)
  • sub-URI has to be same for the host machine as well as proxy, when you are doning proxypass and reverse.
  • when you get “NameError: uninitialized constant ActiveSupport::Dependencies::Mutex ” error for Rails 2.3.x versions add line: require ‘thread’ to script/sever file
  • Helpful documentation: http://www.modrails.com/documentation/Users guide Apache.html

Feedback, expert comments welcome!

Thank You!
Ankit

Posted in Fedora, Ruby On Rails | 2 Comments

RT (Request Tracker) comments via command-line

I have RT3 installed on my Fedora 14 and have configured it to make it work. There are certain things that I had to go through while setting up RT3. I won’t got into those details as instructions are available and provided along with your RT3 installation.

yum -y install rt3

Now, I wanted to use RT3 via command-line, as it’s quicker for me, especially when I am connected with low-speed internet. Moreover to automatically create, update, modify multiple tickets together it’s always helpful.

I found this link: http://requesttracker.wikia.com/wiki/CLI pretty helpful for command-line usage of RT3

However, there’s one thing I couldn’t find neither I could get an answer on RT3 mailing list is, formatted commenting via RT3 command line: http://lists.bestpractical.com/pipermail/rt-users/2011-March/069554.html

In unix based systems, you have ‘cat’ command to get the file’s content on STDOUT. So, I did following to make it working

cat RT_MSG_FILE | rt comment 6977 -m -

It worked!

Still playing with RT3 command-line to get more easier solutions for my needs!

Thanks!
Ankit

Posted in Linux | Leave a comment

Translation CopyNPaste Finder for Firefox

Localizers use various translation tools for their needs and suits. Firefox localization requires translations of DTD and PROPERTIES files, where plain text editors are most common in use. Plain text editors can not serve translation tool features like, Translation Memory, Terminology management, accelerator checking or Identical messages to English ones. L10n Dashboard on Mozilla server does provide the number of entries that are Unchanged for each individual locale however the entire list of entries that are not changed is not available anywhere.

CopyNPaste Finder searches for translation messages that are identical to English ones, basically unchanged entries. So, you can translate those messages if they were missed. It does not check for CommandKeys, AccessKeys, or Keys in this search.

Many times it happens that while going through compare-locale results from dashboard, we tend to just copy and paste the English messages that are missing and forget to translate unintentionally. This tools helps us to figure out such untranslated message.

Result is not so accurate as this tool also includes messages that really need to keep as it is, just like English ones. Tool can not identify such messages. However, it would be really easy for Firefox localizers to quickly go through the results and identify the messages that are supposed to be translated.

Check results for your language: Translation CopyNPaste Finder for Firefox

Your feedback to improve the tool would be really helpful!

Thank You!
Ankit Patel

Posted in Firefox, Localization | 4 Comments

AccessKey Conflict Finder for Firefox Localization!

AccessKeys allow computer users to immediately jump to a specific part of an application via keyboard. e.g. hitting “Alt + F” keystroke via your keyboard takes you to “File” menu. This is only possible when AccessKeys could be hit through your keyboard.

For many of the languages we don’t have AccessKeys in local language for various reasons, rather available in English itself. Most of the Indic languages are among those examples!

Translators localizing software programs for such languages, manually takes care to ensure they have put correct AccessKeys for each entity so as to avoid conflicts with other AccessKeys. But there is no real automated way to figure out such conflicts. Few weeks ago, Mr. Henrik Skupin has released a tool called Mozmill for Firefox localization community. Mozmill Automation Test are meant to figure out AccessKeys conflicting with other AccessKeys on the same UI. Below image can make it little clear.

Now, there is one more thing localizers might want to take care in terms of localization of AccessKeys. That is, Keeping AccessKeys as it is. Basically, No AccessKey should differ from English ones. How to make sure of this? (especially when you don’t have any report available for such conflicts)

I tried to find out conflicting AccessKeys (from English) by making a small Shell Script and a PHP script to make that result available on the web. Here it is: AccessKey Conflict Finder for Firefox Localization!

Any Firefox localizer who wants to find out a report for his localization, can grab it from the above URL!

At the moment the results are produced by running script manually. Will be automated at regular interval soon!

Do let me know, when you want your language reports for AccessKeys to be updated!

Please also do provide your feedbacks about making things better for Firefox Localization!

Thank You!
Ankit Patel

Posted in Firefox, Localization | 2 Comments

Indic Localization Standardization Efforts!

Tuesday, 14th December there was a meet organized by Wikipedia team at Red Hat Pune office. Wikipedia team was basically interested in finding the facts about Indic localizations and ongoing efforts for l10n area, which could help them to figure out hurdles being faced by an ordinary person trying to write articles or pages in local content on Wikipedia.

Details about the event can be found from here.

I was supposed to present something on Indic Localization efforts that can help them understand the present state of the localization. For me it was more important to highlight the quality of the content rather than content only, as quality matters end of the day otherwise there will be no use of enormous amount of content you put. For improving the quality of the localizations that we (a language communities) do are different however in the same direction. I have tried to jot down major things in one presentation, where I can showcase the Indic Localization Standardization Efforts and made this presentation! Collected some good ideas about the improvisation of the quality of the content too and I am sure we will work on that.

A presentation is somewhat self explanatory, somewhat needs explanation, somewhat needs discussion.

Thank You!
Ankit Patel

Posted in Localization | 1 Comment