Help with getting development version running

0 views
Skip to first unread message

Joe Cohen

unread,
Mar 23, 2008, 6:35:20 PM3/23/08
to PDX Tech Calendar
1. I'll buy lunch for someone who willing to spend a few minutes to
help me get the development version running on my (Win32) machine.
See error message below.

2. I previously bewailed the lack of a working newbie tutorial on
Rails 2.0. I finally found one at
http://fairleads.blogspot.com/2007/12/rails-20-and-scaffolding-step-by-step.html

3. While I earlier knew nothing aobut Ruby or Rails, I'm now starting
to feel that I know enough to be dangerous. I'd like to try swatting
some of the easier issues. Thus my desire for a locally running
development environment.

Joe
-------

I get this error when I start the application locally:


NoMethodError in Admin/venues#index
Showing layouts/admin.html.erb where line #55 raised:

You have a nil object when you didn't expect it!
The error occurred while evaluating nil.match

Extracted source (around line #55):

52: <div id="top_footer">
53: Calagator.org
54: <% if File.directory?(File.join(RAILS_ROOT, ".svn")) %>
55: - SVN Version: <%= $svn_revision ||= `svn info`.match(/
^Revision: (\d+)/s)[1] %>
56: <% elsif File.directory?(File.join(RAILS_ROOT, ".git")) %>
57: - Git Timestamp: <%= $git_date ||= `git log -1`.match(/
^Date: (.+?)$/s)[1] %>
58: <% end %>

RAILS_ROOT: C:/ruby/rails_apps/calagator

Parameters:
None

Show session dump

---
as:admin/venues:
:list: {}

:csrf_id: a6753ca2e5063193f4ac0aeea29b9069
flash: !map:ActionController::Flash::FlashHash
:failure:
:success:

Response
Headers:

{"Status"=>"200 OK",
"cookie"=>[],
"Content-Type"=>"text/html",
"Cache-Control"=>"no-cache"}

Anselm Hook

unread,
Mar 24, 2008, 12:18:26 AM3/24/08
to pdx-tech...@googlegroups.com
Are you under cygwin?

Ping me tomorrow if not fixed 415 215 4856 . I am downtown all day -
can help out. Pretty familiar with swatting win32 / rails setup kinds
of bugs.

a

Igal Koshevoy

unread,
Mar 25, 2008, 11:16:14 PM3/25/08
to pdx-tech...@googlegroups.com
On Sun, Mar 23, 2008 at 3:35 PM, Joe Cohen <jdc...@stoel.com> wrote:
>> Extracted source (around line #55):
>>
>> 52: <div id="top_footer">
>> 53: Calagator.org
>> 54: <% if File.directory?(File.join(RAILS_ROOT, ".svn")) %>
>> 55: - SVN Version: <%= $svn_revision ||= `svn info`.match(/
>> ^Revision: (\d+)/s)[1] %>
>> 56: <% elsif File.directory?(File.join(RAILS_ROOT, ".git")) %>
>> 57: - Git Timestamp: <%= $git_date ||= `git log -1`.match(/
>> ^Date: (.+?)$/s)[1] %>
>> 58: <% end %>
>>
Joe,

Thanks for reporting the problem and including the backtrace because
that helped me immediately identify the problem.

I checked in r442, which should fix this. Basically the layout wanted to
display the SVN version of the code being used, but blindly assumed that
just because it saw the .svn directory that the "svn" command existed.
However, on Windows, there's no "svn" command, so it was failing.

Tell me if that worked.

-igal

PS: Sorry that it took me so long to get back to you, I've been sick and
wasn't paying enough attention to mail.

Joe Cohen

unread,
Mar 26, 2008, 1:57:14 PM3/26/08
to PDX Tech Calendar
Thanks very much for the help. I hope you're feeling better.
Unfortunately, I'm still getting essentially the same exception, and
I'm not sure how to fix it. But, as you've helped me understand the
problem, I have a work-around. It's ugly and crude enough so you may
not want to read the next paragraph.

Within source_code_version, I simply comment out all the
code, and substitute an arbitrary value, like "450".

Because nobody else is running into this problem, and I have a work-
around, it seems to me that a fix is low priority. Maybe wait until
the next code sprint, or never bother with it.

If you are interested in looking at it, (1) I am using TortoiseSVN
(don't know if that's relevant, and (2) here's the exception report:
-------
NoMethodError in Home#index
Showing layouts/application.html.erb where line #56 raised:
You have a nil object when you didn't expect it!
The error occurred while evaluating nil.match
Extracted source (around line #56):
53: </div>
54:
55: <div id="top_footer">
56: Calagator.org <%= source_code_version %>
57: </div>
58: </body>
59: </html>
RAILS_ROOT: C:/ruby/rails_apps/calagator
app/helpers/application_helper.rb:51:in `source_code_version'
app/views/layouts/application.html.erb:56:in
`_run_erb_47app47views47layouts47application46html46erb'



On Mar 25, 8:16 pm, Igal Koshevoy <i...@pragmaticraft.com> wrote:

Igal Koshevoy

unread,
Mar 26, 2008, 8:17:49 PM3/26/08
to pdx-tech...@googlegroups.com
Joe: Thanks for the feedback and backtrace. I've committed a fix for the
source_code_version issue you're having on Windows. It seems that
Windows can return a nil when running a shell command, whereas UNIX
always returns a string.

Anselm: Thank you for volunteering to assist Joe.

Bryan: Thanks for the Google map fixes, I've reviewed and deployed them.

Joe & Reid: Thanks for cleaning up the Issues queue.

-igal

Cohen, Joseph

unread,
Mar 26, 2008, 8:38:54 PM3/26/08
to pdx-tech...@googlegroups.com
Igal: Thanks for helping me out on such a low-priority issue. As you
probably know, it now works fine.

This will help me be more productive: with a working local copy, I can
test changes to code. So hopefully I can deal with the simplest of the
31 open issues.

I hope I'll see everyone Saturday at Startupalooza.

-Joe

Igal Koshevoy

unread,
Mar 26, 2008, 9:34:15 PM3/26/08
to pdx-tech...@googlegroups.com
Joe: Glad to hear it's working. Thanks for pressing on and working on
these issues. :)

All: Do we want to consider a mini code sprint of a couple hours some
evening, before the next full-day code sprint, dedicated to just closing
outstanding issues? I realize many of these are small and low-priority,
but I'd like to whittle the list down a bit. I also think that pair
programming has worked outstandingly well for us, and that we'd be able
to get more done by working together on these if possible.

-igal

Audrey Eschright

unread,
Mar 26, 2008, 9:54:09 PM3/26/08
to pdx-tech...@googlegroups.com

On Mar 26, 2008, at 6:34 PM, Igal Koshevoy wrote:

> All: Do we want to consider a mini code sprint of a couple hours some
> evening, before the next full-day code sprint, dedicated to just
> closing
> outstanding issues? I realize many of these are small and low-
> priority,
> but I'd like to whittle the list down a bit. I also think that pair
> programming has worked outstandingly well for us, and that we'd be
> able
> to get more done by working together on these if possible.

I might be able to do an evening next week (not Tuesday) or maybe
some kind of working lunch session? It's a good idea.

Audrey

Joe Cohen

unread,
Mar 26, 2008, 11:42:39 PM3/26/08
to PDX Tech Calendar
FWIW, I'd like to do this. (Having gotten past the version display
problem that Igal just fixed, I'm running into many other problems.
So it's unlikely I can do any bug squashing on my own.)

Bryan Stearns

unread,
Mar 27, 2008, 12:16:33 PM3/27/08
to pdx-tech...@googlegroups.com
I'd like to do this, too (any day at lunch would be good, but only
Thursday or Friday evenings are open for me).

...Bryan

Sam Livingston-Gray

unread,
Mar 27, 2008, 12:20:02 PM3/27/08
to pdx-tech...@googlegroups.com
I could easily stick around CubeSpace for a few hours of
bug-squishing. I haven't been keeping up with the project, but that's
not necessarily a disadvantage for that sort of thing... (=

Any evening next week (except Tuesday, obviously) would work for me.

-Sam

Reid Beels

unread,
Mar 27, 2008, 4:11:14 PM3/27/08
to pdx-tech...@googlegroups.com
I'm available most lunches and evenings except Tuesdays.
-Reid

Audrey Eschright

unread,
Mar 31, 2008, 12:24:45 PM3/31/08
to pdx-tech...@googlegroups.com
Let's try this Wednesday (4/2), noon, Backspace. We'll work on some of the things in the issue tracker, and eat lunch.

--
Audrey Eschright

Igal Koshevoy

unread,
Mar 31, 2008, 1:01:44 PM3/31/08
to pdx-tech...@googlegroups.com
Audrey Eschright wrote:
> Let's try this Wednesday (4/2), noon, Backspace. We'll work on some of
> the things in the issue tracker, and eat lunch.
FYI, I just sent a message to CubeSpace to see if they had an opening on
Thursday, 4/3, 7-9pm.

-igal

Reid Beels

unread,
Mar 31, 2008, 6:03:52 PM3/31/08
to pdx-tech...@googlegroups.com
I'll be there.
Reply all
Reply to author
Forward
0 new messages