Home


Welcome to RailsRocket, a community Ruby on Rails website! We have Ruby on Rails articles, tutorials, and even sample projects--so play around! We hope this will help you learn this great and fun website framework!

Newest Articles

  • PlainRL 1.0 Released [June 1, 2009]: PlainRL 1.0 is out! Download it now and give it a try–a full, working, albeit plain RogueLike game written entirely in Ruby.
  • Internationalizing Your Rails Application in 34 Languages eBook [January 26, 2009]: We’re very pleased to announce our very on Rails eBook: Internationalizing Your Rails Application in 34 Languages! The goal of this eBook is to help you get your Rails application internationalized–and to kick it off with not one or two, but 34 different languages–all without the expense of hiring a translator!
  • rake secret? [January 21, 2009]: Bort and Restful Authentication, require you to edit the REST_AUTH_SITE_KEY. What does this mean? Rake has a ’secret’ target which you can call; it generates a key. What about the ’secret’ value in environment.rb? Added in Rails 2.0, as part of moving session state to the client side, this key encrypts session data.
  • One-Shot Scaffolding Creation [January 9, 2009]: If you’re not that familiar with Rails, you might be creating your application domain entities (models, controllers, business objects, whatever you want to call them) by generating the model, then generating the controller, then populating the fields into the migration, and the new/edit views. There’s a one-line way to do all of this, though.
  • Private Member Variables in Ruby [December 17, 2008]: How can you create private member variables in Ruby? If you’re used to the attr_accessor helper, that won’t work–that makes your member variables public. You can use the @ notation, eg. @variable_name. (Attr_accessor just gives you free getters and setters.)
  • Internationalization (I18n) in Rails 2.2 [December 4, 2008]: Rails 2.2 introduces I18n, aka Internationalization, out-of-the-box. Now, it’s very, very easy to write an application that can be translated quickly into another language; all through the new I18n API. You can easily add strings, change strings, even change the language on the fly. We discuss a bit of the evolution of how such a
  • Rails 2.1: UTC-Timestamped Migrations [November 25, 2008]: Rails 2.1 introduces UTC-timestamped migrations–instead of a single, three-digit prefix to your number, you now get a timestamp (everything from the current year to the current second). This helps you resolve conflicts of the same-numbered migration showing up in multi-developer environments; but it’s annoying sometimes! How can you turn this off? Through environment.rb!
  • Looping Backwards in Ruby [November 19, 2008]: In Ruby, looping or iterating forwards is a simple task–you can use the bracket notation. But what if you want to loop backwards? Can you do it? Easily? Or what if you don’t know if you’re iterating forwards or backwards? Is there a generic solution you can use for this specific, albeit rare, case?
  • The Controversial Eval Function [November 11, 2008]: eval is a function in Ruby that allows you to execute arbitrary code. You pass in a string containing code, and voila! It’s very useful, for things like holding pointers of a sort to functions; but it’s also dangerous, because script-kiddies can format your hard-drive. So what’s the middle-path use-case of eval?
  • Block Comments in Ruby [November 5, 2008]: How do you comment out a chunk of code? Other programming languages (C++, Java, etc.) have a slash-star style of block comments, like so: /* */ … but what about Ruby? Does Ruby have a mechanism for this, too? The answer is YES; BUT, there’s a catch! If you don’t watch whitespace …

Most Popular

  • Block Comments in Ruby
  • Internationalization (I18n) in Rails 2.2
  • The Controversial Eval Function
  • Looping Backwards in Ruby
  • Internationalizing Your Rails Application in 34 Languages eBook
  • Private Member Variables in Ruby
  • Rails 2.1: UTC-Timestamped Migrations
  • rake secret?
  • One-Shot Scaffolding Creation
  • PlainRL 1.0 Released

  • Highest Rated

      Posted in Uncategorized


    Leave a Reply