Rails script/performance/request needed a little help
While following another great Ryan Bates Railscast, I had a couple of problems on my Ubuntu 8.04 development machine:
Rails 2.1.0’s ActionController wants version 0.6.1 or later of the ruby-prof gem, but the usual gem repositories only have 0.6.0 now. I found suggestions to install Jeremy Kemper’s fork on Github, but though I’d added GitHub as a gem source, installing jeremy-ruby-prof didn’t work because that installed his version with that name, which didn’t help ActionController. What worked was:
Then, script/performance/request ran, but generated several strange error messages instead of producing results:
Couldnt get a file descriptor referring to the console
Could not get a file descriptor referring to the console
Couldnt get a file descriptor referring to the console
Could not get a file descriptor referring to the console
This turned out to be because script/performance/request
wants to use open
to open its output files (a text file and an HTML document), but on Ubuntu,
/usr/bin/open
is a link to /usr/bin/openvt
, which didn’t do what we want
(and generated those error messages). I’m not sure what else uses open
,
but this did the right thing: it lets Firefox open the files: