Rails 2.3, cache_fu and the memcached session_store

Many Rails developers mistakenly assume that by installing defunkt’s cache_fu, Rails will be configured to use the settings found in the memcached.yml config YAML installed by the plugin. This was somehow true in earlier versions of Rails 2.*, but a couple of extra steps are required for 2.3.

Tim Connor’s branch has a commit that correctly sets the session_store config in Rails 2.3. I applied Tim’s patch to the most recent version of cache_fu:

http://github.com/jfernandez/cache_fu

If you’re also using Rails abstract cache_store (Rails.cache) and you want it to use the same settings as cache_fu, you will have to use the MemcachedConfig class. Just drop the class file in your RAILS_ROOT/lib folder and add the following code to your environment.rb file (or production.rb)

Now you have Rails 2.3 running with all Memcached stores configured under the same settings and namespace.

How to install Ruby 1.87 on EngineYard Flex

  • ezmobius: you can install 1.8.7
  • ezmobius: you need to do this:
  • ezmobius: echo "=dev-lang/ruby-1.8.7_p174 ~amd64 ~x86" >> /etc/portage/package.keywords/ec2
  • ezmobius: emerge -g =dev-lang/ruby-1.8.7_p174
  • ezmobius: as root
  • ezmobius: you may need to recompile any gems that have binary extensions

Compile the Passenger prefpane

Make sure you have the latest Xcode and RubyCocoa installed before continuing

  • git clone git://github.com/alloy/passengerpane.git
  • cd passengerpane
  • run ‘rake release’
  • cd pkg
  • open .
  • Find the compiled prefpane, double click on it.

Install Rubycocoa on Snow Leopard

  1. Download the Rubycocoa 0.13.2 installer from the official site: http://sourceforge.net/projects/rubycocoa/files/

  2. Mount the DMG file, copy the PKG anywhere that’s writeable.

  3. Right click on the PKG, select “Show Package Contents”. Navigate to the “Info.plist” file, double click to open.

  4. Modify the IFRequirementDicts, Item 1, TestOperator value to ‘=’ (as seen on the screenshot).

Info.plist
Uploaded with plasq's Skitch!
  1. Save the Info.plist file and re-run the installer.

Build and Install Github.com gems

Haml example

git clone git://github.com/nex3/haml.git

cd haml

gem build haml.gemspec

sudo gem install haml-1.9.0.gem

  • dirtyhand: sudo gem install cheat
  • dirtyhand: cheat vim | mate
  • dirtyhand: IRONY
  • faisal: i have aptana, i have netbeans, i mostly work in textmate anyway. but aptana has a good test runner and its code hints stuff overlaps (but isn't a subset of) netbeans'
  • faisal: so i use both
  • yaroslav: so you're on mac?
  • • yaroslav sighs
  • faisal: i'm on a mac
  • yaroslav: HOW CAN I REACH THESE KIDS
Mark is coding in the park. He will send his changes when he comes back.