Text 21 Dec cucumber, webrat visit method triggers undefined method `match’ for #<Array:> (NoMethodError)

Cucumber weird errors

today when I was running my cuke features on a Rails app I had exactly the same problem you had.

undefined method `match’ for #<Array:> (NoMethodError)

This was a fresh install, the same features were running fine on my office workstation.

These are the gems of my Rails (2.3.4) app [1]:

And after two hours of hammering my head, and right before deciding to stop working in IT and open a bar on a lonely beach on a remote island… I found out that the error was caused by:

rack (1.2.1)

rolling it back to rack 1.0 (and even 1.0.1) solved the problem for me.

[1]

autotest (4.4.6)
autotest-growl (0.2.9)
builder (3.0.0)
columnize (0.3.2)
cucumber (0.6.2)
cucumber-rails (0.2.4)
database_cleaner (0.4.3)
diff-lcs (1.1.2)
factory_girl (1.2.3)
faker (0.3.1)
fakeweb (1.3.0)
gherkin (2.3.2)
json (1.4.6)
json_pure (1.4.6)
linecache (0.43)
mysql (2.8.1)
newrelic_rpm (2.13.4)
nokogiri (1.4.4)
polyglot (0.3.1)
rack (1.1.0)
rack-test (0.5.3)
rake (0.8.7)
RedCloth (4.2.3)
rspec (1.3.0)
rspec-core (2.3.1)
rspec-expectations (2.3.0)
rspec-mocks (2.3.0)
rspec-rails (1.3.2)
ruby-debug (0.10.4)
ruby-debug-base (0.10.4)
term-ansicolor (1.0.5)
timecop (0.3.5)
treetop (1.4.9)
webrat (0.7.0)
ZenTest (4.4.2)

Text 17 May RVM warning: getc is obsolete; use STDIN.getc instead

I had a message hanging rack and rails install on my machine (osx 10.5.8) today:

.rvm/rubies/ruby-1.8.7-p248/lib/ruby/site_ruby/1.8/rubygems/spec_fetcher.rb:254: warning: getc is obsolete; use STDIN.getc instead

somehow installing rspecv solved it, here’s what I’ve done:

http://gist.github.com/404492

Text 12 Apr delete directories with git-svn

Sometime when you remove directories like:

vendor/gems/acts-as-taggable-on-2.0.0.rc1

git leaves the empty directories behind.

When you work with git svn this can leave the svn repository in an incongruous state. You can remove empty dir during svn dcomit via:

git svn dcommit —rmdir vendor/gems/acts-as-taggable-on-2.0.0.rc1

which I think is the only way to undo something that is already been committed in svn.

Text 1 Apr paperclip 2.3.1.1 validates_attachment_presence gotcha

today I had a paperclip validation error:

/vendor/gems/paperclip-2.3.1.1/lib/paperclip.rb:284:in `validates_attachment_presence’: You have a nil object when you didn’t expect it! (NoMethodError)

but the image was there, and I really didn’t get what the problem was.

I am glad I commented it out and worked on something else. After a bit I had a second look and I found out the validation was set before the has_attached_file.

Make sure of the following order have:

  1. has_attached_file :hero_image
  2. validates_attachment_presence :hero_image
Text 24 Mar revert a previous version of a file via git

So, you want to roll back a file change in GIT.

check on which revision the change was introduced with a bit of:

git log

and double check with:

git show 0a9462908bbf14a3c68bf4a0d49f9770477ad068

checkout that file version before the found revision:

git checkout 3abac75f9eaa63bd5ab7b63457fc9fb570b34039 — db/seeds.rb

it’s now ready to be added and committed.

Quote 29 May
5.9 inches of pumping trainor
— Tim Trainor said in the office
Photo 28 May dialogue between designer and non designer: http://www.fukung.net/images/2674/designer.gif is soooo true

dialogue between designer and non designer: http://www.fukung.net/images/2674/designer.gif is soooo true

Photo 28 May my personal website on a mobile phone&#8230; FAILtime spent for mobile testing: 0s 

my personal website on a mobile phone… FAIL

time spent for mobile testing: 0s 


Design crafted by Prashanth Kamalakanthan. Powered by Tumblr.