Articles

Some Leopard + Ruby Notes

Ruby developers may want to keep the following bits of information in mind when they install Leopard.

1. If you replaced Tiger’s horribly broken /usr/bin/ruby with your own custom build (most of you did), be aware Leopard will overwrite it (now it points to the 1.8.6 Ruby.framework in /System that comes bundled). The same issue exists for the gem and rails executable. Not a big deal; re-overwrite as you see fit (or use the framework version and reinstall some gems and libraries).

Leopard, Off the Cuff

So, today was Leopard release day. Showing up at work this morning and seeing a shrink-wrapped copy on my desk was a nice surprise.

Some initial reactions:

* It’s snappier. I’m sure cleaning out my 10.4 cruft helped, but it sure is faster than I expected.

* Spaces is a big deal. Multiple desktops are something I really missed from my days as a Linux junkie (Virtue Desktops didn’t perform well enough for my tastes)

* Cleaner UI. Very happy to get rid of the clunkier brushed-metal look. The window shadowing is definitely better in this release as well.

Attracting Users

So, the Dazlus appears to be successful in the sense that users are able to get the things done they need to do - set up an actors profile, add photos, and link to videos. I haven't had any complaints, and I have a pretty good conversion rate. So the next challenge, the real challenge is getting users to come to the site in the first place. I'm trying a number of strategies. My second post on

Sessions and cookies in Ruby on Rails

An important issue rarely talked about with little documentation on Internet. So, here we go ... a guide to session and cookies in Rails. Session and cookies are an integral part of any good web application and rails has a good support for them. Continuing with our DRY approach, this guide contains link to cool articles with good description wherever necessary.

Table of Contents

  1. Introduction

JRuby, not in its setting (or configuring jirb under Windows)

For a good while now, I’ve been using Ubuntu on my main home machine. Working with Ruby and JRuby on Linux is a charm.

Tonight, as I tried to set myself up to work with JRuby on Windows*, I bumped into an annoying problem. When I tried to configure jirb, the JRuby version of IRB, it didn’t always seem to find the .irbrc config file in my home directory. I looked a bit on the ‘net and found nothing that helped me solve my problem. I’ve worked out a fix, you can follow along in this wonderful adventure.

Using Windows? Try Powershell!

Recently, at work I’ve had to implement a couple of simple scripts. They were yet again not simple enough to be captured completely in a batch file. For example I needed to have an arbitrary precision and format date/time that I could use in a file name. date /t and time /t weren’t cutting it.

Creating a Mephisto Theme Using Liquid

Jon Baker wrote a great article on creating Mephisto themes. There’s also a nifty Liquid for Mephisto PDF cheatsheet by George that was released on the same day.

Finally, who posted as Dr Acula in the previous post? Totally awesome…

Exciting day

So I posted some details about Dazlus on craigslist - inviting people to try it out and to submit feedback. Here's my post...http://seattle.craigslist.org/see/tlg/449937289.htmlIt's gone really well. I was hoping to get 3 users at least, and that took about 4 hours. In the last hour of the day, we had another 4 sign up and create profiles giving us 7 on the day. Actors and performers appear to

Rails

This started as a comment on Geoff’s post but seemed to justify knocking the dust off this thing.

Rails Cookies in a view

I never really found an answer to this anywhere, but it looks like Rails does not allow access to the cookies object in the view. You have to access it as @cookies. I suspect this is so you won't set a cookie in the view, but I don't really know why that's an issue. I was trying to access it to see what was in it while testing.Also - it appears the default behavior of the cookie expires

Articles | Rails Fire

Articles

See You At The Hackfest!

A quick reminder to those of you attending MountainWest RubyConf this weekend: Engine Yard will be hosting it’s third annual MountainWest RubyConf Hackfest this Thursday night!

Rails Reminder: DATE_FORMATS

A friend of mine recently asked me about adding time formats to Rails apps. It’s not completely intuitive on how to add new "default" symbols for date and time formats or to get a list of the built in ones. The API has the built-in lists of constants under DATE_FORMATS but it’s a bit difficult to read on that page.

Michael Fogus talks to RubyLearning’s Clojure Course Participants

On the eve of the first free, online “Clojure 101” course, Michael Kohl of RubyLearning caught up with Michael Fogus, author of the forthcoming book – The Joy of Clojure. In this interview, Michael Fogus talks to the Clojure 101 course participants on Clojure.

Use the Cucumber

The Cucumber behavior-driven development framework is appreciated by developers from many languages. It makes it easy to write plain-text stories that run executable Ruby code against your application.

In this hour and ten minute screencast, you’ll learn the basics of Cucumber. You’ll learn the syntax, organization, and philosophy of writing Features, Scenarios, and Steps. You’ll build an application and learn where unit tests are a better fit.

"If you decide to use a library, you own it, and you’ll end up seeing it naked. Try to make..."

“If you decide to use a library, you own it, and you’ll end up seeing it naked. Try to make sure it’s not suffering from either obesity or gangrene well before this happens. If you can avoid using it entirely without making your specs worse or adding code, do.” - From David Lee’s rails-oceania thread on Testability Development

Stuart Halloway talks to RubyLearning’s Clojure Course Participants

On the eve of the first free, online “Clojure 101” course, Michael Kohl of RubyLearning caught up with Stuart Halloway, author of Programming Clojure and talked to him on Clojure, for the benefit of the Clojure 101 course participants.

return false considered harmful in live

Checkout following jQuery code written with jQuery.1.4.2. What do you think will happen when first link is clicked.

$('a:first').live('click', function(){
log('clicked once');
return false;
});
$('a:first').live('click', function(){
log('clicked twice');
return false;
});

I was expecting that I would see both the messages. However jQuery only invokes the very first message.

phpBB on GitHub

The phpBB team recently completed a move from SVN to Git and are now hosting their repositories on GitHub!

I remember phpBB being one of my first experiences with online programming — trying to setup a forum for my now dead drumming site.

Making Ruby Fast: The Rubinius JIT

In order to execute Ruby code as fast as possible, Rubinius has the ability to compile Ruby code all the way down to machine code when it detects that a method is heavily used. In Rubinius, the system that manages this process is its JIT.

In today’s post, I’ll be giving an overview of the various players involved in the path that code takes to get from source to machine code. Without further ado, I’ll jump right in.

360 Flex - Day 2 (Tuesday) - Live Blogging

As you saw yesterday afternoon I didn’t blog too much, so let’s how today goes. The party last night was really fun, lot’s of networking, rock band playing and just a nice general geek atmosphere.

Evolution of RIA Design Principals

Right now the “Evolution of RIA Design Principals” panel is about to start.

Panel is:

Episode 202: Active Record Queries in Rails 3 | Rails Fire

Episode 202: Active Record Queries in Rails 3

Send to friend

Rails 3 introduces a new query interface for performing finds in Active Record. See how it works along with the changes in named scopes.

Video: