‹ jan0sch.de

Page 8


Since some time it seems to be somewhat impossible to install the ruby-debug gem into your rails app. The error message will most likely look similar to this one:

When using Linux it is often helpful to use the following command if an application crashes:

If you’re using Drupal 7 and Organic Groups (2.x) you probably have the OG extras module enabled.

The documentation to enable the “create content” links for your organic group nodes is sparse. Therefore a short howto:

When testing has_and_belongs_to_many models using rspec and factory girl you should setup your factory the following way:

If you run MySQL you probably use the innodb storage engine because it provides a number of advantages over MyIsam.

The official documentation recommends giving 50-80% of your ram to innodb_buffer_pool_size which can easily go above 10 gb because ram is cheap nowadays. The same documentation recommends settings innodb_log_file_size to 25% of innodb_buffer_pool_size meaning this can easily be 2 or more gb.

If you experience the error message bind: permission denied when you try to run Sylpheed on FreeBSD you most likely have the false permissions for /tmp and/or /var/tmp.

If you are using heroku you probably ran into some issues with rake assets:precompile. When using active admin bringing it’s assets into your app can also be quite tricky.

The method of precompiling your assets yourself and adding them to your git repository works for sure but it isn’t really best practice.

Another way to get the needed assets to be compiled is as follows:

If you’re using cucumber you should be carefully examining your tests to make sure you’re really writing acceptance tests and not integration tests.

If you want to use another test framework for rails like rspec and factories instead of fixtures. You should adapt config/application.rb as follows:

Sometimes you’ll want or have to split a git repository into two. This is usually a sign of not thinking forward enough but hey sh.. happens. If your repository is structured in a way that you just need a subdirectory of it into a new repository you can follow the steps below.

If you are using lighttpd as webserver and host drupal websites you probably have used some lua script and mod_magnet to get clean urls. Recent versions of lighttpd (1.4.26+) are able to handle rewrites better through the url.rewrite-if-not-file command. The config for your [virtual] server should look like this:

« ältere Beiträge neuere Beiträge »