Using Ruby 2.0 With Rails

Ruby 2.0 seems to be fully backwards compatible so it should be safe to use with Rails 3 apps. We're already running it on two apps we're developing at the moment and haven't come across any problems at all!.

In two of the projects I'm working on just now I'm using plist files to store data. To save me from having to duplicate work in both apps, I created a module to make light work of reading and writing to plist files.

... and we want to copy it over to our app's documents directory so we can update/edit the plist.

# Check if the plist exists in our documents dirPListRW.exist?(:users,directory=:documentsDir)# => false# Check if the plist exists in our main bundlePListRW.exist?(:users,directory=:mainBundle)# => true# Copy the plist file from the main bundle to the documents dirPListRW.copyPlistFileFromBundle(:users)# Fetch the object from the plist file@users_hash=PListRW.plistObject(:users,Hash)# => A hash containing the User data# Update the data@users_hash[:jim]# => { name: "Jim", email: "jim@jimsemail.com" }@users_hash[:jim][:name]='James'# Store the data back in the plistPListRW.updatePlistFileWithObject(:users,@users_hash)# Check this worked OKPListRW.plistObject(:users,Hash)[:jim][:name]# => "James"