Rails provides great tools to manage the application environment. Using gems instead of freezed librairies is usefull in many cases (when you’re using GitHub for example ). But it can become quickly painful too.
A specific situation makes the “all-in-gems” policy very painful : making a continuous integration server with a several rails projects. Adding a project, changing a config.gem, each time you need to make the required gem installs in a ssh session
rails_setup provides a simple solution.
You’re a new developer on a rails project ? Retrieve the project sources and make ./script/rails_setup. It will install :
- the rails gem (and “active” dependencies) (in the version required by the project)
- the gems configured in the application,
- the gems required by the database adapter (to be improved)
If you’re using a continuous integration tool (like CruiseControl.rb), build yours projects with ./scripts/rake_with_rails_setup (which runs rails_setup before rake). With the provided sudo support, your CruiseControl.rb daemon user will install required gems for you.
rails_setup is a very simple rails plugin which provides a small set of scripts and rake tasks :
./script/plugin install git://github.com/albanpeignier/rails_setup.git
More details in the rails_setup README file.
For the Bonnes-Ondes project, we want to allow users to follow their listener visits. The solution is simple : associate a Google Analytics tracker id to the Bonnes-Ondes host … but the Google Analytics ‘rubaidh’ plugin supports only a single Google Analytics account.
A recent patch allows to override the Google Anaytics tracker id, but we wanted to use several tracker ids in our case.
A small patch later and the Bonnes-Ondes controller can associate a Google Analytics account to the request. The after filter generates google code for several accounts. This plugin fork uses a GoogleAnalytics instance for each account and concats the code of each found instance.
The usage of a robots metatag into blog pages is often discussed. Most of blog posts suggest to modify your blog template to change the header.
To avoid this modification, I’ve tested the Meta Robots plugin created by Joost De Valk. But this plugin doesn’t provide exactly what I’m looking for.
Using recommendations like How to Make a WordPress Blog Duplicate Content Safe, my objective is adding the
"noindex,follow" to every page except posts, home and categories pages. Paged home and categories pages (
/page/2, …) should be tagged too.
Using the same way than the Joost De Valk’s plugin, I’ve created a simple robots meta WordPress plugin to make this simple job. Just install and activate.
PS: I’ve read a lot of posts which suggest robots Disallow directives with wildcards (
/*/feed, etc) .. But I’ve never seen a such thing in .. the robots.txt specifications
It seems easy to install a Trac plugin … No idea why but I’ve experienced several difficulties before finding this procedure : I retrieve the python plugin source and create the egg file.
Most of time, the trac plugin source are available via subversion. A small checkout and you can find the
To create the egg file, execute
python setup.py bdist_egg. You’ll find the egg file into the
Take care to use the same python version than your trac server. An egg file created with python 2.4 will not work with python 2.3.
Copy the egg file into the trac plugin directory (
/usr/share/trac/plugins under debian). Trac will make the end of work.