ninajansen.dk

ninajansen.dk header image 1

Entries Tagged as 'tips'

Do not use apt-get to install passenger on Ubuntu

februar 14th, 2009 · Comments

So I wanted to experiment with Phusion Passenger on my home server. The server runs Ubuntu 8.10 and serves a bunch of small low-traffic sites through apache (including this blog). I saw that there was a package from brightbox for passenger on ubuntu and tried to install it. However, this package automatically disables the php5 [...]

[Read more →]

Tags: Ubuntu · apache · rails · tips

Cache sweepers in Rails, put them in app/models!

maj 14th, 2008 · Comments

So i’ve been spending hours tracking this one down: I wanted to have cache sweepers in rails and followed the advice from railscasts and railsevny. Those tutorials tell you to put sweepers in an app/sweepers directory and add that directory to your load path. DON’T DO THAT. That simply did not work for me (using [...]

[Read more →]

Tags: Ruby on Rails · cache · sweepers · tips

In place editing in rails

maj 13th, 2008 · Comments

So basically, the official plugin is old and cant really deal with restful routing. For some reason, when I used the url_for method in my views, the in place editor javascript function couldn’t interpret the (restful) route properly and sent a post request to ‘/controller/1/edit’ to an action named “1″ with an id set to [...]

[Read more →]

Tags: REST · Ruby on Rails · tips

Rails tips #1

maj 2nd, 2008 · Comments

These might be completely obvious to everyone, but I found them useful:

If you want to migrate a specific database, you can do it by setting RAILS_ENV on the command line. Like this:
rake db:migrate RAILS_ENV=production
If you want to see all the rake tasks in your application with a description of what they do, execute:
rake [...]

[Read more →]

Tags: Ruby on Rails · tips