You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Daniel Kehoe edited this page Apr 30, 2013
·
8 revisions
Rails Cleanup
by Daniel Kehoe
Last updated 1 March 2012
This is a guide for developers using the example apps from the Rails Apps repository. Others may find it helpful as well.
Background
Several unneeded files are generated in the process of creating a new Rails application.
Additionally, you may want to prevent search engines from indexing your website (“ban spiders”) if you’ve deployed it publicly while still in development.
Remove Unneeded Files
If you are creating an application template, this step uses the cleanup recipe from the rails_apps_composer repository.
Remove various unneeded files from your application:
In Rails 3.1 and newer:
$ rm app/assets/images/rails.png
Delete public/index.html
To run and test your application, you likely already deleted the default home page from your application. But if you didn’t already:
$ rm public/index.html
Ban Spiders
If you are creating an application template, this step uses the extras recipe from the rails_apps_composer repository.
You may want to modify the file public/robots.txt to prevent indexing by search engines if you plan to have a development version on a publicly accessible server:
# To ban all spiders from the entire site uncomment the next two lines:
User-Agent: *
Disallow: /