How to rename a Rails 3 Application
Tue Jan 19 14:01:00 -0800 2010
Renaming a Rails 3 application is something you have to think about now. No, really… :)
When you create a new Rails 3.0 app with “rails app_name” Rails will create the application for you like before, but with a major difference.
It will Classify your “app_name” and use this as the Ruby name space for your application.
So if you do:
rails new app_name
Then your Rails application will have sprinklings of AppName throughout the tree.
If you later decide that your application should be called something more specific than “AppName” you need to replace out AppName from the following files:
config/application.rb config/environment.rb config/environments/development.rb config/environments/test.rb config/environments/production.rb config/routes.rb config.ru initializers/secret_token.rb initializers/session_store.rb
Of course, if you are using TextMate, a simple Project wide search and replace for AppName with your new name, should do the trick. But it is something to be aware of.
blogLater
Mikel
Edited 21 Sept 2010: to update per reader comments below.
Leave a Reply
Latest posts
- Encrypting Another Partition Using FileVault 2 on OSX Lion
- Installing Home Folder on Second Drive on OSX Lion
- undefined local variable or method `version_requirements'
- A New World of Resources
- Rails Static Pages
- Twitter Replacing Rails? So?
- Engine Yard Cloud Backups Generating Zero Length Backups
- Our Rails Rumble Entry - StillAlive.com
- Renaming a controller and redirection in Rails 3
- Updating RailsPlugins.org to Rails 3 - Part 1
- A new protocol for social interaction
- What is a distributed social network?
- Bundler and Public Git Sources
- Getting Heroku, memcached and Rails 3 working
- Why Bundler?
- Rails Commit Access
- Introducing TellThemWhen
- rake RSpec & Cucumber uninitialized constant Rails::Boot::Bundler
- This Relationship is Worth Nothing
- Thank YOU...
- Inline Attachments for ActionMailer
- Upgrading RailsPlugins.org to Rails 3 - Part 1
- Stripping dollar signs and commas from a string
- Getting Rails 3 Edge with jQuery, RSpec and Cucumber using RVM
- Action Mailer, go Proc thyself
- The Real News Donation Drive
- ActionMailer ScreenCast and Article
- Installing RSpec for Rails 3
- I am speaking at RailsConf 2010
- Rails 3 Session Secret and Session Store
- If you're lazy and you know it write your specs!
- Bundler - uninitialized constant ActionController
- Bundle Me Some Sanity
- How to use Mail / ActionMailer 3 with GMail SMTP
- Put your mailer where the action is!
- Why Force a Choice?
- How to make an RSS feed in Rails
- Rails 3 Routing with Rack
- Bundle me some Rails
- Helping out in Haiti
- Watch your self
- Is Rails 3.0 a Game Changer?
- Where did the scripts go?
- validates :rails_3, :awesome => true
- New Rails Version 3.0 Guides Online
- New ActionMailer API in Rails 3.0
- Mail gem version 2 released
- Rails 3.0 Examples
- DECCA Driving Day
Latest comments
- buy camel cigarettes
Wonderful blog! I definitely lo...
- how to become a pilot
About this topic, I have been l...
- how to become a pilot
About this topic, I have been l...
- best cigarettes
This was a fantastic post. Real...
- best cigarettes
This was a fantastic post. Real...
Categories
Tag Cloud
AJAX ARGH! ActiveRecord Ajax Apache Apple Asterisk Australia Copy Database Development Feedburner Gem server Google Human Rights Javascript L. Ron Hubbard MS SQL Server MacOSX Mail Mephisto Not Programming OpenBSD Opensource Performance Personal Integrity PostgreSQL Programming Prototype Puzzle RDoc REST RESTful Rails RSPec RSpec Rails Rails Tips Rspec Ruby Ruby on Rails Ruby on Rails Tips Ruby on rails Tips SQL SQLServer SVN Scientologist Scientology Site Stats Soekris Soekris net5501 TMail Textmate Tips Windows World about mikel anti drug apache contributing daemon documentation drugs illustrator javascript lambda mail mephisto newspapers nitro open source opensource photoshop productivity programming railscasts rspec ruby ruby on rails rubyforge scientology seo sitemap sqlserver tips tmail tom cruise unix tricks vector graphicsArchives
- November 2009 (1)
- October 2009 (2)
- September 2009 (2)
- August 2009 (0)
- July 2009 (1)
- June 2009 (0)
- May 2009 (1)
- April 2009 (0)
- March 2009 (0)
- February 2009 (0)
- January 2009 (2)
- December 2008 (0)
- November 2008 (5)
- October 2008 (0)
- September 2008 (1)
- August 2008 (0)
- July 2008 (2)
- June 2008 (13)
- May 2008 (7)
- April 2008 (18)
- March 2008 (8)
- February 2008 (5)
- January 2008 (7)
- December 2007 (20)
- November 2007 (22)




Mon Jan 25 21:09:06 -0800 2010
There was a commit recently that eliminated some of these locations you need to change. The last 3 on your list (Rakefile, and script/*) now point to Rails::Application, Rails::Console, or Rails::DBConsole, and not AppName anymore.
Sat Nov 05 01:56:38 -0700 2011
This is a nice and precise info on the subject. legal studies degree online fire science school public administration school Law Degree Law and legal studies school Law Degree
Tue Nov 08 19:57:53 -0800 2011
The command is “rails new app_name” to create an app.
Tue Aug 31 11:09:35 -0700 2010
The command is “rails new app_name” to create an app.
good post though -
Mon Sep 20 09:00:36 -0700 2010
I realize this post is out of date, so here’s an update
remove:
script/console
script/dbconsole
from the list
add:
initializers/secret_token.rb
initializers/session_store.rb
to the list
Mon Sep 20 20:08:54 -0700 2010
@Kieran, @Daze and @eric thanks! I have updated. the post to match.
Sat Dec 04 14:07:55 -0800 2010
You should add the Rakefile to your list again. Thanks!
Sat Jul 02 11:30:02 -0700 2011
You can use the Rename plugin
https://github.com/get/Rename
Sat Nov 19 05:26:23 -0800 2011
This is exactly the good that I have been looking, Thanks for this. Thanks for the codes.
Sat Nov 19 05:27:49 -0800 2011
This is exactly the good that I have been looking, Thanks for this. Thanks for the codes.
Thu Dec 22 18:39:54 -0800 2011
There was a commit recently that eliminated some of these locations you need to change. The last 3 on your list (Rakefile, and script/*) now point to Rails::Application, Rails::Console, or Rails::DBConsole, and not AppName anymore sg ksygnnvhg hg tthjobhmt te zipoxihuu
Sat Jan 21 23:14:31 -0800 2012
I had joined a multicultural choir Suara Mas, where we sang songs in all the languages of Malaysia.
Thu Jan 26 03:29:25 -0800 2012
I had joined a multicultural choir Suara Mas, where we sang songs in all the languages of Malaysia.
Thu Jan 26 23:46:55 -0800 2012
However I’d like to think that it’s more to me than just sales and I have for example this winter acquired a taste for cross country skiing.
Sat Jan 28 00:03:44 -0800 2012
The Coffee Shop, operated by the Scudamores on Gloucester.
Mon Jan 30 22:05:25 -0800 2012
I have been looking, Thanks for this. Thanks for the codes.
Tue Jan 31 00:56:21 -0800 2012
Of course, if you are using TextMate, a simple Project wide search and replace for AppName with your new name, should do the trick.
Tue Jan 31 04:16:01 -0800 2012
The best person to give you medical advice about liver disease is your doctor. Best thing we can do is recommend perhaps a good doctor if you need a second or third opinion. casino