2

How do I get rails to generate the default prototype javascript files in my public/javascripts folder? I have deleted them after experimenting with jQuery.

2 Answers 2

1

Resurrect them from a previous commit. You're using git right?

git reflog # find how many commits back your JS is. Let's assume 4.
git checkout master~4 public/javascripts
Sign up to request clarification or add additional context in comments.

2 Comments

Thought there might have been a way with rails. But thanks I got them back using git.
Yeah I looked for a rails way. Looks like there's only a generator for the jquery javascripts using the jquery-rails gem.
0

Not sure if there is a built-in way, but you could get them back out of your source repo, if you're using one, or generate a new rails project (being sure to use the same version of rails) and copy them over.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.