Based on what I've seen "in the wild", my current recommendation is to first learn the basics in Ruby (a week or two - from basic arithmetic through objects), and then jump to Javascript.
This is primarily because most of the "learn X" that I've seen for Javascript is pretty web-centric, while the "learn Ruby" things that I've seen are much more general CS. So the idea is to first get a basic grounding in general programming, and then jump into the thing you'll use a lot for your particular application.
Example: Learning about scope in JS versus basically anything else.
Also, Rails really does encode basically all the best-practices - so when you literally don't know any better, you can still succeed. And then when you move away from Rails, you have a known-good way to start anything.
This is primarily because most of the "learn X" that I've seen for Javascript is pretty web-centric, while the "learn Ruby" things that I've seen are much more general CS. So the idea is to first get a basic grounding in general programming, and then jump into the thing you'll use a lot for your particular application.
Example: Learning about scope in JS versus basically anything else.
Also, Rails really does encode basically all the best-practices - so when you literally don't know any better, you can still succeed. And then when you move away from Rails, you have a known-good way to start anything.