Maintenance pains
Posted on March 22, 2007 - Filed Under RubyOnRails, run-n-share
Write web application is no problem - keep it live through changing environment it is real challenge.
I have left Run-N-Share for a long time without any updates. Now I want to publish some new features from my development branch. But first I wanted to update code to work with current edge Rails. And troubles have begun.
First, changes to FCGI handler requires to add to config/environemnt.rb secret for generating sessions cookies and name for that cookie. When not set Rails complains about it in development log:
A session_key is required to write a cookie containing the session data. Use config.action_controller.session = { :session_key => "_myapp_session", :secret => "some secret phrase" } in config/environment.rb
This from Rails revision 6453. I was not so lucky when I did rake rails:freeze:edge few days ago this error message was following:
A secret is required to generate an integrity hash for cookie session data. Use config.action_controller.session = { :secret => "some secret phrase" } in config/environment.rb
Do You see subtle difference? Following instructions I have added only :secret and spend few hours trying to figure out what is going on. Finally I did upgrade to newest edge and have read new error message.
RNS uses acts as taggable plugin. It was used as local plugin in vendor/plugins but I decided to move to global gem instead. It was already installed, I did this change couple revisions ago. So when starting Rails application I found /usr/local/bin/rake:17:Warning: require_gem is obsolete. Use gem instead. I changed require_gem 'acts_as_taggable' to simple gem 'acts_as_taggable'. Result?
ActionView::TemplateError (undefined method `acts _as_taggable' for Route:Class) on line #22 of app/views/route/find_routes.rhtml
Well I have no idea why it does not load gem.
Popularity: 5% [?]
Hits for this post: 2901
Similar Posts
- Including gems with new rubygems
- Continuing with Rails version locking
- Dont use sessions table in rails
- Acts As Taggable gem and MySQL duplicate key
- Cookies and port in host’s location
Comments
One Response to “Maintenance pains”
Leave a Reply




thank you my friend its saved me lot of time, keep posting …..
once again thank you