uninitialized constant Rails::Railtie

A few days ago my app just stopped working, after a quick google search I found a great site that explains why: Jamie van Dyke that pointed out that inherited_resources has now fully moved to Rails 3 and will no longer work on Rails 2.3 or lower. Now Jamie seems to point to use older versions of the gem because they changed the code for Rails 3.0, however I feel that his versions aren’t the latest version you could be running. So I wanted to add my 2 cents by...

uninitialized constant Test::Unit::TestResult::TestResultFailureSupport Error

Today trying to run my RSpec tests and I get an odd error: uninitialized constant Test::Unit::TestResult::TestResultFailureSupport (NameError) /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:105:in `const_missing’ /usr/local/lib/ruby/gems/1.8/gems/test-unit-2.0.3/lib/test/unit/testresult.rb:28 /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require’...

Error with fsevent and autospec (on Mac)

Today I’ve upgraded my gems and noticed that when running my autospec I get an odd error: [01:09:25 /usr/local/lib/ruby/gems/1.8/gems/ruby-ole-1.2.10/lib/ole/storage/base.rb:146:load] WARN   root name was “R” And my autospec would keep printing out: sh: line 1:  6303 Trace/BPT trap          /usr/local/lib/ruby/gems/1.8/gems/autotest-fsevent-0.1.2/fsevent/darwin/fsevent_sleep ‘/Users/andrew/rails_apps/example_com’ 2>&1 sh: line 1:...

Setting Session Cookie across your whole domain (in Rails 2.3)

I have an application that has subdomains based on account (i.e. user1.example.com) but I want one login for the whole system, no matter what subdomain/account your in. In rails 2.2 I’d set it up by setting: ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS[:session_domain] = '.domain.com' Notice the leading ‘.’ (very much needed) But in rails 2.3 it doesn’t work, so I found from Mark Gandolfo you can set it using:...

Rails 2.3 Templates on Windows

In Rails 2.3, templates are simple ruby files containing DSL for adding plugins, gems, initializers, etc. to your freshly created Rails project. To apply the template, you need to provide the rails generator with location of the template you wish to apply, using -m option. Reading up on the commands in the template system and watching the railscasts.com episode, I got fired up on the possibilities of such a simple yet amazing system. So I dove in and started creating...