Learning Rails (on ubuntu)


As a java developer, learning ruby can be a daunting task. But I seem to have lived through the pain and hopefully this blog will help those who want to learn Ruby.

This blog will help you understand how to setup a development environment and the right places to look for to learn the language.

So to setup the ruby environment, I first started with a the correct editor. Sublime is it. Dont consider others (for now atleast). I then installed ruby language and all its other libraries as needed. After that I started with my Ruby On Rails learning. Rails is nothing but a deployment environment for Ruby. Helps to get started with Ruby faster.

      http://www.codelearn.org/ : Is a good place to start learning. They have one thing missing after the first Lesson, you will get help here. What you will need from this link is

      gem install bundler
      bundle init

      Now here you will find that rails server will create a new folder. DAMN!! why the hell does it do this shit?. Dont wonder too much, its just stupid. You need to follow this link to fix it.

      When you create your application with rails new myApp, there should be a myApp/script directory and in there will be a script named rails, this is the rails that understands server and console. So, do this:
      $ rails new MyApp
      $ cd MyApp
      $ script/rails server
      To create and start up your application. The naming is a little confusing.

      This also did not work, OK, try this then.

      cd script

      Now, you will need to run a command line “rails generate controller pages about help”. This too will not work since “rails” will run from the command instead you should run script/generate. Yeah!! Its that silly!!