2

I have learnt java. I can write in C/C++. Recently i have been developing web applications in java. I was planning to learn ruby. Are there any prerequisites for ruby that i don't have.

saplingPro
  • 20,769
  • 53
  • 137
  • 195
  • 3
    You have to own a Mac, have some sort of facial hair, and enjoy coding at your local coffee shop. You have to hate PHP and Java with a passion. You also have to be willing to get trolled by assholes who have way too much time on their hands :-| – Peter Brown Jun 06 '12 at 12:17

4 Answers4

2

In terms of knowledge? No, not really. You'll just need to be prepared for when Ruby does things differently to C-type languages. You'll probably find your workflow changes too – Ruby doesn't have a compile stepº

What do you want to do?

  • If you want to build web apps, rails is the obvious and most popular choice, but there are other, lighter options (like Sinatra) available.
  • If you're interested in using it to build desktop apps, then Shoes is a good cross-platform option to explore.

If you're using Linux or OSX (and you probably should be), you should use RVM to keep things tidy, and using Bundler with your projects will protect you from gem versioning hell on any platform.


º Technically, it could, but none of the major distributions compile Ruby to anything…
andrewdotnich
  • 16,195
  • 7
  • 38
  • 57
  • 1
    "Ruby doesn't have a compile step" – Huh? With the exception of MRI, *every* Ruby implementation (YARV, JRuby, IronRuby, MacRuby, Rubinius, MagLev) has a compile step. Some of them even have multiple, for example, Rubinius first compiles Ruby to Rubinius byte code, then it compiles Rubinius byte code to native machine code. – Jörg W Mittag Jun 06 '12 at 08:04
  • 1
    "none of the major distributions compile Ruby to anything" – YARV compiles Ruby to YARV byte code, IronRuby to CIL byte code (which the CLI VES then may or may not compile to native code), JRuby to JVM byte code (which the JVM then may or may not compile to native code, or in the case of IKVM even compile to CIL byte code, or in the case of Android compile to Dalvik byte code), MagLev to GemStone/S byte code (which the GemStone/S VM then compiles to native code), MacRuby to native code, Rubinius to Rubinius byte code (which the Rubinius VM then compiles to native code). – Jörg W Mittag Jun 06 '12 at 09:43
  • 1
    @JörgWMittag: You are, of course, correct. What I meant (and I hope this is clear from what I wrote) is that Ruby does not have a compile step *that is distinct from the run step in a workflow sense*. OP Is used to Java & C/C++, where you write-compile-execute in three distinct steps. For most purposes, Ruby makes the middle step invisible… – andrewdotnich Jun 07 '12 at 01:21
0

I haven't learned any computer language before save Basic and similar vendorscript trash. I have been developing no web applications at all. I cannot write in C/C++. Yet it took me less than a year to learn Ruby, start using Emacs, Git, Heroku, Bundler, MongoDB and all those things developers are supposed to use. I'm doing it for my job (writing a simulator in Ruby). You have nothing to fear, as long as you are a mathematician.

Boris Stitnicky
  • 12,444
  • 5
  • 57
  • 74
0

Have a look at these sites:

Asherah
  • 18,948
  • 5
  • 53
  • 72
swapnilp
  • 491
  • 2
  • 6
  • 9
0

Unfortunately, you already missed the most important prerequisite to learn Ruby: not having learned Java ;-)

This may seem a bit inflammatory, but at least in my experience with learning Ruby myself as well as what I have observed from friends, it seems indeed to be harder to learn Ruby if you have learned Java beforehand than if you haven't learned to program at all. In my personal quest to learn Ruby, the hardest thing was unlearning everything I learned from Java.

Smalltalk (or even better Self and Newspeak) are much better languages to learn before learning Ruby, as are Scheme and Haskell.

Jörg W Mittag
  • 363,080
  • 75
  • 446
  • 653