{"id":3417,"date":"2009-03-16T00:00:00","date_gmt":"2009-03-15T22:00:00","guid":{"rendered":"http:\/\/www.theill.com\/blog\/2009\/03\/16\/upgrading-rails-engines-project-to-rails-2-3-2\/"},"modified":"2019-04-14T20:40:59","modified_gmt":"2019-04-14T18:40:59","slug":"upgrading-rails-engines-project-to-rails-2-3-2","status":"publish","type":"post","link":"https:\/\/www.theill.com\/blog\/2009\/03\/16\/upgrading-rails-engines-project-to-rails-2-3-2\/","title":{"rendered":"Upgrading Rails Engines Project to Rails 2.3.2"},"content":{"rendered":"

My lifestyleapps<\/a> project (still in very early beta) was running Rails 2.2.2 with the Rails Engines plugin ten minutes ago. Today, Rails 2.3.2 was released so I decided to try if I could easily upgrade it and avoid using the Rails Engines plugin anymore. It was beautiful simple and took me less than ten minutes.<\/p>\n

First, I had to update our Apache Passenger module with a version supporting Rails 2.3 so I did a<\/p>\n

$ gem update passenger\n<\/code><\/pre>\n

and then run the install to build our apache module<\/p>\n

$ passenger-install-apache2-module\n<\/code><\/pre>\n

In my config\/environment.rb I changed<\/p>\n

RAILS_GEM_VERSION = '2.2.2' unless defined? RAILS_GEM_VERSION\n<\/code><\/pre>\n

to<\/p>\n

RAILS_GEM_VERSION = '2.3.2' unless defined? RAILS_GEM_VERSION\n<\/code><\/pre>\n

and asked Rails to update my various script files by issuing<\/p>\n

$ rake rails:update\n<\/code><\/pre>\n

Finally I remembered the application.rb should be named application_controller.rb now so I issued an explicit task for this as well<\/p>\n

$ rake rails:update:application_controller\n<\/code><\/pre>\n

In the Rails Engines plugin you need to have the \u201croutes.rb\u201d file in the root of your plugin but with Rails 2.3.2 you should have it in the \u2018config\u2019 folder under your plugin and its content should be wrapped in \u201cActionController::Routing::Routes.draw do |map|\u201d as the root routes.rb. So I changed this from<\/p>\n

\/vendor\/plugins\/life_intake\/routes.rb\n<\/code><\/pre>\n

to<\/p>\n

\/vendor\/plugins\/life_intake\/config\/routes.rb\n<\/code><\/pre>\n

The contents of this routes.rb was changed from<\/p>\n

map.resources :foods\n<\/code><\/pre>\n

to<\/p>\n

ActionController::Routing::Routes.draw do |map|\n  map.resources :foods\nend\n<\/code><\/pre>\n

Finally I had to update the root \u201croutes.rb\u201d to avoid using the \u201cfrom_plugin\u201d call e.g. I simply removed lines such as<\/p>\n

map.from_plugin :life_intake\n<\/code><\/pre>\n

Now I don\u2019t need the Rails Engines plugin anymore so I removed it with<\/p>\n

$ .\/script\/plugin remove engines\n<\/code><\/pre>\n

That\u2019s it .. I was now able to run my tests and start up my project and have it run on Rails 2.3.2.<\/p>\n

Enjoy!<\/p>\n","protected":false},"excerpt":{"rendered":"

My lifestyleapps project (still in very early beta) was running Rails 2.2.2 with the Rails Engines plugin ten minutes ago. Today, Rails 2.3.2 was released so I decided to try if I could easily upgrade it and avoid using the Rails Engines plugin anymore. It was beautiful simple and took me less than ten minutes. … Continue reading Upgrading Rails Engines Project to Rails 2.3.2<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"amp_status":"","spay_email":"","jetpack_publicize_message":""},"categories":[98],"tags":[101,99],"jetpack_featured_media_url":"","jetpack_publicize_connections":[],"yoast_head":"\nUpgrading Rails Engines Project to Rails 2.3.2 • Peter Theill Site<\/title>\n<meta name=\"robots\" content=\"index, follow\" \/>\n<meta name=\"googlebot\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<meta name=\"bingbot\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.theill.com\/blog\/2009\/03\/16\/upgrading-rails-engines-project-to-rails-2-3-2\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Upgrading Rails Engines Project to Rails 2.3.2 • Peter Theill Site\" \/>\n<meta property=\"og:description\" content=\"My lifestyleapps project (still in very early beta) was running Rails 2.2.2 with the Rails Engines plugin ten minutes ago. Today, Rails 2.3.2 was released so I decided to try if I could easily upgrade it and avoid using the Rails Engines plugin anymore. It was beautiful simple and took me less than ten minutes. … Continue reading Upgrading Rails Engines Project to Rails 2.3.2\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.theill.com\/blog\/2009\/03\/16\/upgrading-rails-engines-project-to-rails-2-3-2\/\" \/>\n<meta property=\"og:site_name\" content=\"Peter Theill Site\" \/>\n<meta property=\"article:published_time\" content=\"2009-03-15T22:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-04-14T18:40:59+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary\" \/>\n<meta name=\"twitter:creator\" content=\"@theill\" \/>\n<meta name=\"twitter:site\" content=\"@theill\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.theill.com\/#website\",\"url\":\"https:\/\/www.theill.com\/\",\"name\":\"Peter Theill Site\",\"description\":\"What\\u2019s going on in the personal life of Peter Theill\",\"publisher\":{\"@id\":\"https:\/\/www.theill.com\/#\/schema\/person\/d65d009363af2cc0a150b55dc20fa301\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":\"https:\/\/www.theill.com\/?s={search_term_string}\",\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.theill.com\/blog\/2009\/03\/16\/upgrading-rails-engines-project-to-rails-2-3-2\/#webpage\",\"url\":\"https:\/\/www.theill.com\/blog\/2009\/03\/16\/upgrading-rails-engines-project-to-rails-2-3-2\/\",\"name\":\"Upgrading Rails Engines Project to Rails 2.3.2 • Peter Theill Site\",\"isPartOf\":{\"@id\":\"https:\/\/www.theill.com\/#website\"},\"datePublished\":\"2009-03-15T22:00:00+00:00\",\"dateModified\":\"2019-04-14T18:40:59+00:00\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.theill.com\/blog\/2009\/03\/16\/upgrading-rails-engines-project-to-rails-2-3-2\/\"]}]},{\"@type\":\"Article\",\"@id\":\"https:\/\/www.theill.com\/blog\/2009\/03\/16\/upgrading-rails-engines-project-to-rails-2-3-2\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.theill.com\/blog\/2009\/03\/16\/upgrading-rails-engines-project-to-rails-2-3-2\/#webpage\"},\"author\":{\"@id\":\"https:\/\/www.theill.com\/#\/schema\/person\/d65d009363af2cc0a150b55dc20fa301\"},\"headline\":\"Upgrading Rails Engines Project to Rails 2.3.2\",\"datePublished\":\"2009-03-15T22:00:00+00:00\",\"dateModified\":\"2019-04-14T18:40:59+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.theill.com\/blog\/2009\/03\/16\/upgrading-rails-engines-project-to-rails-2-3-2\/#webpage\"},\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.theill.com\/#\/schema\/person\/d65d009363af2cc0a150b55dc20fa301\"},\"keywords\":\"rails,tip\",\"articleSection\":\"development\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.theill.com\/blog\/2009\/03\/16\/upgrading-rails-engines-project-to-rails-2-3-2\/#respond\"]}]},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/www.theill.com\/#\/schema\/person\/d65d009363af2cc0a150b55dc20fa301\",\"name\":\"Peter\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/www.theill.com\/#personlogo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/f4f96a08152550e603ee595403f3ba57?s=96&d=retro&r=g\",\"caption\":\"Peter\"},\"logo\":{\"@id\":\"https:\/\/www.theill.com\/#personlogo\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","jetpack_shortlink":"https:\/\/wp.me\/p8TYI1-T7","jetpack-related-posts":[{"id":3410,"url":"https:\/\/www.theill.com\/blog\/2010\/08\/18\/upgraded-shoutsms-from-rails-2-3-8-to-rails-3-in-five-minutes\/","url_meta":{"origin":3417,"position":0},"title":"Upgraded ShoutSMS from Rails 2.3.8 to Rails 3 in five minutes","date":"August 18, 2010","format":false,"excerpt":"Today I wanted to try how easy it would be to upgrade our existing ShoutSMS (pretty small) rails application from 2.3.8 to latest Rails 3 release candidate (currently rc3). Without taking our test suite into consideration it took around five minutes with help from the official rails_upgrade[1] plugin. This is\u2026","rel":"","context":"Similar post","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":4,"url":"https:\/\/www.theill.com\/blog\/2017\/05\/17\/shoutsms-sms-to-hundreds-of-people\/","url_meta":{"origin":3417,"position":1},"title":"ShoutSMS updated to latest Rails version","date":"May 17, 2017","format":false,"excerpt":"I just upgraded my\u00a0ShoutSMS service since Microsoft chose to use it for their Microsoft Inspire event this summer. It's a great project allowing people to send out bulk sms using their own phone number. It's a nice feature if you want to get immediate feedback on dispatched messages such as\u2026","rel":"","context":"In \"bulksms\"","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3414,"url":"https:\/\/www.theill.com\/blog\/2010\/01\/27\/facebook-css-for-will_paginate-gem\/","url_meta":{"origin":3417,"position":2},"title":"Facebook CSS for will_paginate gem","date":"January 27, 2010","format":false,"excerpt":"Today I needed to add pagination to my Danish beta application for handling your accounting called Hurtigmoms. Since I'm developing in Rails it was a logically choice to use \u201cwill_paginate\u201d to support pagination. Our prototype layout is using a Facebook header and so I wanted my pagination control to mimic\u2026","rel":"","context":"In "development"","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3402,"url":"https:\/\/www.theill.com\/blog\/2011\/04\/25\/use-sensible-defaults-when-building-a-web-mobile-or-desktop-application\/","url_meta":{"origin":3417,"position":3},"title":"Use sensible defaults when building a web, mobile or desktop application","date":"April 25, 2011","format":false,"excerpt":"While working on migrating \u201cgomore.dk\u201d, a Danish ridesharing service, to Rails 3, I figured it would make sense to look into the existing database to figure out if I could add some sensible defaults when creating e.g. new rides. The site already contains a decent database so I figured it\u2026","rel":"","context":"Similar post","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3418,"url":"https:\/\/www.theill.com\/blog\/2009\/03\/12\/extend-your-shell-toolbox-with-pbcopy\/","url_meta":{"origin":3417,"position":4},"title":"Extend your shell toolbox with pbcopy","date":"March 12, 2009","format":false,"excerpt":"I'm developing Rails applications on Mac and a command which isn\u2019t used enough in my opinion is \u201cpbcopy\u201d. This command will allow you to grab the standard input from a terminal and put it on the clipboard. I find myself using commands such as \u201cpwd | pbcopy\u201d a lot. This\u2026","rel":"","context":"In "development"","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3400,"url":"https:\/\/www.theill.com\/blog\/2011\/06\/08\/finding-apache-configuration-file-httpd-conf-location\/","url_meta":{"origin":3417,"position":5},"title":"Finding Apache configuration file (httpd.conf) location","date":"June 8, 2011","format":false,"excerpt":"Just a quick tip for programmers working with Apache. Sometimes I\u2019m asked where to find the Apache configuration file on a given server. Since it\u2019s possible to configure this there is no \u201cdefault location\u201d so I usually do: $ ps -ef | grep apache which gives me a list like\u2026","rel":"","context":"Similar post","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_likes_enabled":true,"amp_validity":null,"_links":{"self":[{"href":"https:\/\/www.theill.com\/wp-json\/wp\/v2\/posts\/3417"}],"collection":[{"href":"https:\/\/www.theill.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.theill.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.theill.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.theill.com\/wp-json\/wp\/v2\/comments?post=3417"}],"version-history":[{"count":1,"href":"https:\/\/www.theill.com\/wp-json\/wp\/v2\/posts\/3417\/revisions"}],"predecessor-version":[{"id":3423,"href":"https:\/\/www.theill.com\/wp-json\/wp\/v2\/posts\/3417\/revisions\/3423"}],"wp:attachment":[{"href":"https:\/\/www.theill.com\/wp-json\/wp\/v2\/media?parent=3417"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.theill.com\/wp-json\/wp\/v2\/categories?post=3417"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.theill.com\/wp-json\/wp\/v2\/tags?post=3417"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}