views:

124

answers:

1

Hi, I am very new to ruby on rails. I've installed a complicated ruby on rails project via github clone and bundle install, and I was making minor changes to it until it reaches a point whereby it is not stable anymore, sass was throwing strange exceptions, so did other ruby gems. For a rails project, is there a way to clean up the project (aka, remove any "compiled or cached code") and just run again. My alternative now is to go thru github clone and bundle install again, but that means all of my modified changes have to be reapplied again. What is rails equivalent of "make clean" in Java? Is "rake clean" the answer? Do we need to run any bundle commands?

+1  A: 

For directories managed by git, you can run:

git clean -dfx

This command cleans out your working tree. The specified command-line options include:

  • -d: Remove untracked directories in addition to untracked files.
  • -f: Force the clean
  • -x: Don't use the ignore rules. This allows removing all untracked files, including build products. This can be used (possibly in conjunction with git reset) to create a pristine working directory to test a clean build.

See the git clean man page for more info.

Tim Henigan
thanks for the answer. Does this clean all the cached files in rails? I know rails cache the plugins, etc. Also, I have no clue what bundle does in the background...
hip10
@hip10: can you tell us which github project was cloned? It might help.
Tim Henigan
Its the teambox project
hip10