[rspec-devel] [ rspec-Bugs-14543 ] rspec_scaffold broken with Rails 2.0

noreply at rubyforge.org noreply at rubyforge.org
Thu Oct 18 10:15:26 EDT 2007


Bugs item #14543, was opened at 2007-10-08 12:22
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3149&aid=14543&group_id=797

Category: None
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Steven Garcia (pimpmaster)
Assigned to: Nobody (None)
Summary: rspec_scaffold broken with Rails 2.0

Initial Comment:
Rails Edge r7774
Rspec Trunk r2701

Trying to run:

script/generate rspec_scaffold Thing

and I get

uninitialized constant Rails::VERSION::String

----------------------------------------------------------------------

>Comment By: David Chelimsky (dchelimsky)
Date: 2007-10-18 14:15

Message:
Not sure why I wasn't seeing this error when running the pre_commit, but I do see it when running outside the app.

One problem I'm having now is that the 2.0.0 pre-release says that it's Rails::VERSION::STRING is '1.2.3', which means we can't use that strategy to decide whether to use ";edit" or "/edit".

I'm tempted (out of pure frustration) to make the specs use a regexp that will match either, but that would be a bit too non-deterministic for my blood :)

I'll follow up as I learn.

Cheers,
David

----------------------------------------------------------------------

Comment By: Spencer Turner (spencer)
Date: 2007-10-15 15:36

Message:
I get the same thing (Also on OS X 10.4.10)

same error if I run from script/console:

However, Rails:VERSION:STRING returns a value.

Line 40 in rspec_scaffold_generator.rb should be:
    if Rails::VERSION::STRING =~ /^1\.2\.[123]/
not
    if Rails::VERSION::String =~ /^1\.2\.[123]/

confirmed working after that change on 1.2.5

Sorry, probably not the right format to submit this in

I'll read up on a more formal submission.



----------------------------------------------------------------------

Comment By: Steven Garcia (pimpmaster)
Date: 2007-10-08 12:23

Message:
BTW, this is on OS 10.4.10

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3149&aid=14543&group_id=797


More information about the rspec-devel mailing list