Rails application crashing when trying to upload files with mod_passenger

If you are using Ruby on Rails with Apache (or Apache ITK) and mod_passenger and you get an error while you are trying to upload a file through Rails application, you are probably facing the problem of wrong permissions set in the webserver_private directory of passenger.
Passenger is not currently supporting ITK and is not changing the ownership of the files/dirs correctly.

Mysql::Error: query: not connected with Rails ActiveRecord

If you run rake db:migrate and experience that error:

rake aborted!
Mysql::Error: query: not connected: CREATE TABLE `schema_migrations` (`version` varchar(255) NOT NULL) ENGINE=InnoDB
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activerecord-3.0.0/lib/active_record/connection_adapters/abstract_adapter.rb:202:in `rescue in log'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activerecord-3.0.0/lib/active_record/connection_adapters/abstract_adapter.rb:194:in `log'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activerecord-3.0.0/lib/active_record/connection_adapters/mysql_adapter.rb:289:in `execute'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activerecord-3.0.0/lib/active_record/connection_adapters/abstract/schema_statements.rb:167:in `create_table'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activerecord-3.0.0/lib/active_record/connection_adapters/mysql_adapter.rb:445:in `create_table'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activerecord-3.0.0/lib/active_record/connection_adapters/abstract/schema_statements.rb:430:in `initialize_schema_migrations_table'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activerecord-3.0.0/lib/active_record/migration.rb:487:in `initialize'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activerecord-3.0.0/lib/active_record/migration.rb:433:in `new'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activerecord-3.0.0/lib/active_record/migration.rb:433:in `up'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activerecord-3.0.0/lib/active_record/migration.rb:415:in `migrate'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activerecord-3.0.0/lib/active_record/railties/databases.rake:142:in `block (2 levels) in '
C:/Ruby192/lib/ruby/1.9.1/rake.rb:634:in `call'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:634:in `block in execute'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:629:in `each'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:629:in `execute'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:595:in `block in invoke_with_call_chain'
C:/Ruby192/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:588:in `invoke_with_call_chain'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:581:in `invoke'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:2041:in `invoke_task'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:2019:in `block (2 levels) in top_level'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:2019:in `each'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:2019:in `block in top_level'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:2058:in `standard_exception_handling'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:2013:in `top_level'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:1992:in `run'
C:/Ruby192/bin/rake:31:in `'

then try to do this to solve the problem:

  1. download an older libmysql library dll, e.g. from here
  2. put it in your rails installation directory, e.g. C:/Ruby192/bin/
  3. restart the rails server

Top WordPress Plugins you probably have to use

Resource booking

This WordPress plugin will enable online booking services for your site. Visitors to your site will be able to book or to check availability of apartments, houses, hotel rooms, or services you offer. They can also make reservations and appointments with the ability to choose from multi-day, single day, or by the hour booking. Your clients can even view and register for upcoming events. With integrated Paypal/Sage payment support your clients can pay online!

kPicasa Gallery

This plugin displays your Picasa Web Galleries in a post or in a page simply by creating a post or a page with a special keyword. All the images are kept on the Picasa Web Gallery server.

qTranslate

Writing multilingual content is already hard enough, why make using a plugin even more complicated? I created qTranslate to let WordPress have an easy to use interface for managing a fully multilingual web site. qTranslate makes creation of multilingual content as easy as working with a single language.

Fluency Admin

Bored of your wp-admin panel crunchy look? Move to a better one by using fancy Fluency Admin! Check out the screenshots!

Google Maps support – mapress

The MapPress plugin makes it easy to add Google Maps and driving directions to your blog.  Just type some addresses in the post edit screen and click the ‘insert’ button.  The plugin will insert a great-looking map with markers and directions right into your post.

Ultimate Google Analytics

Plugin to add Google Analytics JavaScript to each page on your weblog without making any changes to your template. The plugin can also add tracking to outbound links, downloads from your own site and mailto: links.

The plugin is highly configurable. Read trough the list of features below to get a feeling of what this plugin can do. You can enable and disable all features individually, although the default configuration will suffice for 90% of the users.

wp-bannerize

WP Bannerize is an Amazing Banner Image Manager. One can use it by PHP function in a template or as a widget. Very powerful, very flexible, a must have for sites that do banners exchange!

WordPress Audio Player

Viper Quicktags – video embedding

Tired of copying and pasting the embed HTML from sites like YouTube? Then this plugin is for you.  Yes, WordPress 2.9 and WordPress 3.0 feature native easy embeds. However this plugin offers more customization than allowed without the plugin (player colors, etc.). It will work fine side by side with the new code and you can opt to use either embed method.

WP Syntax Highlighter

SyntaxHighlighter Evolved allows you to easily post syntax-highlighted code to your site without having to escape the code or anything. It uses the SyntaxHighlighter JavaScript package by Alex Gorbatchev to do the highlighting and supports all of the package’s parameters via shortcode attributes.

SEO: Google XML Sitemap Generator

Ubuntu 9.04 on Intel Itanium2 hangs after upgrade

This is a hint for all those who are happy users of IA-64 and Ubuntu 8.04 (hardy) and would like to upgrade to 9.04 (karmic).

The upgrade process is as simple as editing /etc/apt/sources.list,  changing hardy to karmic and doing apt-get dist-upgrade. After that however, you will experience a blank screen with flashing cursor after initrd is loaded. It seems that there is a problem with some changed features in the kernel.

As I didn’t have enough patience and time to recompile the kernel  milion times, I thought about a little trick. I have used the config of the working kernel from hardy as a base and built a new kernel for 9.04.

I have used the same approach to upgrade from 8.04 to 9.04. Firstly, from hardy to karmic, and then from karmic to lucid. And it works perfectly!