Thursday, June 19, 2008

Tuesday, June 17, 2008

Rspec 1.1.4 gem and plugin with Autotest

I love Rspec and Rspec-rails. Trying to get much better at it. Also love Autotest. Ryan Zenspider Davis is a prolific genius.

Had issues today with a new project running 1.1.4 with autotest. It was easily fixable though.

Here was the error:

############################################################################
Your RSpec on Rails plugin is incompatible with your installed RSpec.

RSpec : 20080615141040
RSpec on Rails : 20080526202855

Make sure your RSpec on Rails plugin is compatible with your RSpec gem.
See http://rspec.rubyforge.org/documentation/rails/install.html for details.
############################################################################
from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:27:in `require'
from /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:496:in `require'
from /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:342:in `new_constants_in'
from /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:496:in `require'
from /Users/holtonma/git/golfap/vendor/plugins/rspec-rails/lib/spec/rails.rb:15
from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:27:in `require'
... 10 levels...
from /opt/local/lib/ruby/gems/1.8/gems/rspec-1.1.4/lib/spec/runner/example_group_runner.rb:13:in `load_files'
from /opt/local/lib/ruby/gems/1.8/gems/rspec-1.1.4/lib/spec/runner/options.rb:98:in `run_examples'
from /opt/local/lib/ruby/gems/1.8/gems/rspec-1.1.4/lib/spec/runner/command_line.rb:19:in `run'
from script/spec:5
/opt/local/bin/ruby -S script/spec -O spec/spec.opts spec/models/player_spec.rb
Here was the fix:

"go into rspec-rails/lib/spec/rails/version.rb and comment the code that's complaining about the version mismatch. The risk is fairly low at this point that you're going to have any trouble."
http://www.ruby-forum.com/topic/156080

To get it working with Aututest, had to slightly modify script/spec to require 'rubygems':
require 'rubygems'

http://railized.com/2008/4/20/running-autotest-with-rspec-gem

If you encounter that issue, hope this helps you fix it!

BusinessWeek article on Search

Interesting points about the gap between what we have now, and where much of the potential in Search remains, especially when it comes to the Semantic web:

http://www.businessweek.com/technology/content/jun2008/tc20080616_034849.htm

...Powerset is written in all OpenSource -- Ruby, Merb, Rails, god, Mongrel, Mootools, Memcache, Erlang, Fuzed*, YAWS, Hadoop... one of their developers is Kevin Clark, active Ruby/Rails developer: http://glu.ttono.us/articles/2008/05/12/holy-god-powerset-launches

More on Powerset:
http://searchengineland.com/080512-000100.php

Great stuff. Thanks to Kevin for sharing that info on his blog -- inspiring work.

MacRuby!

intriguing... definitely plan to keep an eye on this!!

http://mooseyard.com/Jens/2008/03/macruby/

http://www.infoq.com/news/2008/03/macruby-objectivec

http://ruby.macosforge.org/trac/wiki/MacRuby

http://ruby.macosforge.org/trac/wiki/MacRubyTutorial

http://ruby.macosforge.org/trac/wiki/WhyMacRuby

http://ruby.macosforge.org/trac/wiki/MacRubyRoadmap

Wednesday, June 11, 2008

a bit of ObjC and Cocoa history : web-related

Interested to learn that Tim Berners Lee (inventor of the WWW)... developed the first web browser and first server using NeXTSTEP ... didn't know that.

Some background: NeXTSTEP, which was built ontop of BSD Unix and ontop of the Mach kernel... many know this was the precursor to OS X.

NeXT (the company) wrote NeXTSTEP, which is an operating system and set of development tools. Included in that is a window server -- which takes events from the user, forward them to the applications, the application then sends drawing commands back to the window server to update what the user sees.

NeXTSTEP came with a set of libraries/frameworks to deal with the window manager in an elegant manner -- this became known as OpenStep, which is now known as Cocoa. Objective-C is the language that lets you program with those frameworks. (you can now also do that with various adapters/ports like RubyCocoa)