Rails 3 RC injuries.
If you're going to run bleeding edge, you will bleed profusely. I nearly lost an arm today. I upgraded my application to Rails 3 rc from Rails 3 beta4. The list of problems I've encounter is not long but very annoying.
- gem install rails --pre on top of existing rails beta causes vague untraceable errors just like upgrading to beta2 and beta3.
- Solution is to remove all installed gems manually.
- Happily discover rvm has support for this. (rvm gemset clear)
- Install rails 3 rc and all dependencies.
- While gems download find out in #rails-contrib that rails 3 rc isn't loading the lib/ folder
- Add "config.autoload_paths += %W(#{config.root}/lib)" to application.rb
- Ruby 1.9.1 segfautls on load. Joy of joys but not surprising.
- Try ruby 1.9.2-preview1
- Remove all installed gems
- Install rails 3 rc and application gems
- Instant sigabrt on running rails server
- Discover in #rails-contrib that preview1 is buggy as hell... (then why does rvm install 1.9.2 install preview1?)
- Try ruby 1.9.2-head
- No gems to remove because I need to update the head anyway.
- Download, compile, and install ruby 1.9.2-head
- Install rails 3 rc and application gems
- Instant internal server errors relating to failsafe failing.
- #rails-contrib recommends 1.9.2-rc2
- Try ruby 1.9.2-rc2
- Not installed
- Download, compile, and install ruby-1.9.2-rc2
- Install rails 3 rc and application gems
- Instant internal server errors relating to failsafe failing.
- Swear quietly and profusely
- Start testing
- Build new rails 3 rc application
- launches okay with simple controller and view
- compare boot.rb, application.rb, environment/ and initializers/ with non-working app
- no difference...
- Test difference configurations with non-working application
- Throw exception in home#index
- Works, controllers are probably okay
- Render index view without layout
- 500 Error
- Render index using erb instead of haml
- Works...
- Back to new rails 3 rc app
- Add haml gem to Gemfile and make a basic haml view
- Works okay.
- Add haml configuration initializer from non-working application
- 500 Error
- Start playing around with different configuration options
- Discovered setting :encoding to :"utf-8" (notice the colon, :"" is a symbol, not a string)
- Using "UTF-8" (string) instead of :"utf-8" (symbol) works...
- Change :"utf-8" to "UTF-8" in non-working application
- Application works now.
- Build new rails 3 rc application
I am now able to continue working on singleforest.com but I'm ready for a nap. I estimated this morning I would spend several hours just getting my application working again. For once I was correct. It only took several hours instead of the entire day.
I would like to thank elux and nbibler in #rails-contrib on freenode for helping me out.
