Sunday, August 29, 2010
I am freezing this blog - Ruby material will in the future be posted to my main blog
Please visit my general technology blog
Tuesday, August 24, 2010
I am getting excited about the Rails 3 release
I spent some time with Rails 3 pre last December but I have not done much since - I have been very busy this year. I installed the second release candidate tonight and have been kicking the tires again by starting a new application from scratch, getting used to the new command line interface, and reading a few online articles about new features and migration issues.
I used to use Merb a lot, and ever since the announcement of the Merb and Rails merge, I have been looking forward to the 3.0 release. I invested a lot of time learning Rails version 1.x, then 2.x, and I am enthusiastic about putting in the time for digging into 3.x.
I used to use Merb a lot, and ever since the announcement of the Merb and Rails merge, I have been looking forward to the 3.0 release. I invested a lot of time learning Rails version 1.x, then 2.x, and I am enthusiastic about putting in the time for digging into 3.x.
Wednesday, August 18, 2010
Great news: Ruby 1.9.2 released
I am doing an install from svn head right now:
rvm install 1.9.2-headand it is picking up the latest release OK:
http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_9_2As an aside: I wonder how much Oracle's law suit against Google for a non-standard Java in Android will affect Java, Clojure, Scala, etc.? Probably not much at all, but this might be another small reason to favor Ruby :-)
Monday, July 12, 2010
Another way to do text search on MongoDB
I wrote an article on my main technology blog last November on doing indexing and search using MongoDB with the MongoRecord ORM style gem.
Since then, I have preferred to use MongoDB closer to the metal using the mongo gem (and using lower level interfaces when I develop in Clojure). Here is a simple example:
Since then, I have preferred to use MongoDB closer to the metal using the mongo gem (and using lower level interfaces when I develop in Clojure). Here is a simple example:
require 'rubygems' # only for Ruby 1.8.*Because of the way indices are created, you should only do prefix wild card searches if you need good performance.
require 'mongo'
include Mongo
host = "localhost"
db = Connection.new(host,27017).db('my-db-name')
things = db.collection('things')
things.remove
things.insert('guid' => 102, :name => 'John Smith', :email => 'jsmith@example.com')
puts things.count
things.find(:name => /^john/i).each {|x| p x} # good performance
things.find(:name => /smith/i).each {|x| p x} # no so good performance
Wednesday, June 9, 2010
Datamapper 1.0 released
Here is the announcement.
I must say that I still use ActiveRecord slightly more often that Datamapper but that is largely due to working on legacy Rails apps. I have been using MongoDB more often because my largest customer uses it and the dm-mongo-adapter lets you mix data model backends of MongoDB and relational databases.
I must say that I still use ActiveRecord slightly more often that Datamapper but that is largely due to working on legacy Rails apps. I have been using MongoDB more often because my largest customer uses it and the dm-mongo-adapter lets you mix data model backends of MongoDB and relational databases.
Sunday, May 23, 2010
I have finally got with the program and installed rvm
I always have installed each version of Ruby in my local ~/bin directory and setup bash aliases to tweak my PATH to quickly switch when needed. I like having the source code to all of the gems I use ready at hand, so my installation scheme has always worked well for me. Being able to ZIP up all of my Ruby installations and move them to another system was another big win, as is not having to sudo gem install...
I spent the time today to install rvm on my fast i5 Ubuntu laptop, with Ruby 1.8.7, 1.9.1, Rubinius 1.0, and Jruby 1.5.0. Very satisfactory. I still have everything in my home directory where I want it, and my setup is easy to backup and copy.
I do almost all of my real work with 1.9.1 but I have been enjoying using Rubinius for casual coding.
I spent the time today to install rvm on my fast i5 Ubuntu laptop, with Ruby 1.8.7, 1.9.1, Rubinius 1.0, and Jruby 1.5.0. Very satisfactory. I still have everything in my home directory where I want it, and my setup is easy to backup and copy.
I do almost all of my real work with 1.9.1 but I have been enjoying using Rubinius for casual coding.
Saturday, May 15, 2010
If Rubinius if good enough for Ezra, it is good enough for me
On the Hacker News discusion of the new 1.0 release of Rubinius, Ezra Zygmuntowicz mentioned that he uses Rubinius for his day to day Ruby development. That really got my attention because Ezra's articles on Ruby, configuring nginx, etc. have been a great help to me over the years.
I just installed rbx, gem for rbx, and I am now installing the gems I need for the things that I usually work on.
I am super busy right now (doing artificial intelligence/text mining for a stealth startup, so I have almost no free time) so I'll have to stick with JRuby 1.5 and Ruby 1.9.1 for my Ruby work right now, but I think that Rubinius is the future.
BTW, a few years ago at a Merb Camp, Ezra asked me if I was into Clojure because of my long-time use of Lisp (I have been using Lisp for work since the early 1980s). At the time I had to say no, but recently most of my work has been using Clojure which is one reason the I started my new ClojurePla.net web blog. Ruby is still my favorite language but I am sensitive to what customers want to pay me to code in :-)
I just installed rbx, gem for rbx, and I am now installing the gems I need for the things that I usually work on.
I am super busy right now (doing artificial intelligence/text mining for a stealth startup, so I have almost no free time) so I'll have to stick with JRuby 1.5 and Ruby 1.9.1 for my Ruby work right now, but I think that Rubinius is the future.
BTW, a few years ago at a Merb Camp, Ezra asked me if I was into Clojure because of my long-time use of Lisp (I have been using Lisp for work since the early 1980s). At the time I had to say no, but recently most of my work has been using Clojure which is one reason the I started my new ClojurePla.net web blog. Ruby is still my favorite language but I am sensitive to what customers want to pay me to code in :-)
Subscribe to:
Posts (Atom)
