background preloader

15 Things for a Ruby Beginner

15 Things for a Ruby Beginner
The following is a post I had recently sent the Bangalore Ruby User Group. It has been slightly modified to address a larger audience. There were many Ruby beginners in last week's meetup, and the common question we heard was 'after the very basics, what next?' The best way to learn Ruby best practices is to pair with an experienced dev; the way I learned was by inheriting a reasonably small, but well-written codebase from an amazing colleague. In the absence of either, here is a checklist of 15 things (since 'N things that you need to know about X' is the in-thing these days!) that I'd recommend a Ruby beginner to consider: 1. Our very own rubymonk.com has a Ruby primer which was written for exactly this purpose; we open our inbox everyday to gushing feedback from people who've found it to be a great way to learn Ruby. tryruby.org also has a basic introduction to Ruby, and has been around longer. I have heard good things about Learn Ruby the Hardway, but haven't tried it out myself. 2.

CouchDB with CouchRest in 5 minutes The other night, during our monthly SDRuby meetup, lots of people were very interested in learning more about CouchDB and Ruby. I tried to show what Couch was all about but I didn’t have time to show how to use CouchDB with Ruby. Here is me trying to do that in 10 minutes or less. I’ll assume you don’t have CouchDB installed. Install CouchDB, if you are on MacOSX, you are in luck, download and unzip the standalone package called CouchDBX. That’s it you have couch ready to go, press play and play with the web interface. Next, let’s write a quick script. First, let’s install CouchRest: $ sudo gem install couchrest Now, let’s open a new file and write our script. In line 4 and 5 we are just setting up the server(by default, localhost is being used). SERVER = CouchRest.new DB = SERVER.database! Then, we define your ‘model’, we set the default database to use and define a list of properties. property :last_name, :alias => :family_name Line 14 does something that might seem strange at first.

Beginner's Guide To Ruby On Rails: Part 2 Advertisement Last week we published Getting Started With Ruby On Rails, the first part of our Ruby On Rails introduction. We explained basic ideas behind Ruby and presented concepts and essential components of the language. In this article you’ll learn more about Rails, you will learn how to get Ruby on Rails running on your computer, and get an overview of the basic functionality of Rails and demonstrate how Rails’ main parts work together. I assume you’re already familiar with some other form of Web development, whether PHP, Python, Perl or Java, and relational databases like MySQL. After reading these parts, you should have an idea of whether Rails is for you. You may want to take a look at the following related posts: Get Rolling To get your feet wet with Rails, it’s best to simply install it on your own machine and start playing around. On Windows do the following: Install Ruby 1.8.6 using the one-click installer from www.ruby-lang.org. To edit Ruby code, you can use any text editor.

Ruby on Rails Tutorial: Learn Rails by Example book and screencasts by Michael Hartl Michael Hartl Contents Foreword My former company (CD Baby) was one of the first to loudly switch to Ruby on Rails, and then even more loudly switch back to PHP (Google me to read about the drama). This book by Michael Hartl came so highly recommended that I had to try it, and the Ruby on Rails Tutorial is what I used to switch back to Rails again. Though I’ve worked my way through many Rails books, this is the one that finally made me “get” it. The linear narrative is such a great format. Enjoy! Derek Sivers (sivers.org) Founder, CD Baby Acknowledgments The Ruby on Rails Tutorial owes a lot to my previous Rails book, RailsSpace, and hence to my coauthor Aurelius Prochazka. I’d like to acknowledge a long list of Rubyists who have taught and inspired me over the years: David Heinemeier Hansson, Yehuda Katz, Carl Lerche, Jeremy Kemper, Xavier Noria, Ryan Bates, Geoffrey Grosenbach, Peter Cooper, Matt Aimonetti, Gregg Pollack, Wayne E. About the author Copyright and license 1.1 Introduction

Getting Started With Ruby On Rails Ruby on Windows 10 Useful Tips For Ruby On Rails Developers Advertisement By Greg Borenstein and Michael ‘MJFreshyFresh’ Jones Rails is an model-view-controller Web framework written in the Ruby programming language. One of its great appeals is being able to quickly crank out CRUD-based Web applications. Now, we love Rails. In the overview below we present 10 useful tips, ideas and resources for Ruby on Rails-developers (both newbies and professionals). 1. Rails has a well defined plug-in structure that enables you to easily install and use plug-ins in your application. There’s an old nugget of developer wisdom that “the best code is no code at all.” There are a few ways to install a plug-in in Rails, however the most common is using script: # Install from a git repo script/plugin install # Install from a url script/plugin install You can save yourself a ton of time and hassle by becoming good at searching the Web (and especially the almighty GitHub). 2. 3.

Why I Prefer Ruby on Rails over CakePHP by Jimmy Z Last year, I had a goal to learn Ruby on Rails and build an application in that framework. By learning CakePHP, I was able to wrap my mind around the rails framework concepts and make that transition a little easier. This year, I have made the full plunge into the Ruby on Rails, and I absolutely love it. [note: I still prefer to use CakePHP over no framework if a client requests an application be written in php. Here are some of the reasons why I prefer Ruby on Rails over CakePHP: Rails doesn’t require you to grab all of your data in the controller When working with CakePHP, you must retrieve all of your data from the database in the controller and pass it all to your View. All of the data that you will need from associated models must exist in the array(s) that you pass to your view. Lets say that you have an Author that has many Articles, Articles have many Comments and you would like to grab the Author, her articles, and comments to give to the view. Rails Has Superior Url Routing

Ruby Kickstart why’s (poignant) guide to ruby Read This Paragraph At my local Barnes and Noble, there is a huge wall of Java books just waiting to tip over and crush me one day. And one day it will. At the rate things are going, one day that bookcase will be tall enough to crush us all. It might even loop the world several times, crushing previous editions of the same Java books over and over again. And This Paragraph Too This is just a small Ruby book. But Don’t Read This One! Why’s (Poignant) Guide to Ruby is released under the Attribution-ShareAlike License. Now Back to Your Regularly Scheduled Paragraph I’ll try not to feel utterly rejected if this book doesn’t capture your fancy. Learning to Program A very basic, ground-level tutorial for the beginner to Ruby. Now, if you can’t seem to find the contents link on the left-hand side of the page, then here’s a link to the first page of the (Poignant) Guide. Welcome to the pirate radio of technical manuals.

Related: