[rspec-devel] [ rspec-Bugs-13411 ] & amp; quot; ./script/generate rspec& amp; quot; is freezing

noreply at rubyforge.org noreply at rubyforge.org
Thu Oct 18 21:56:59 EDT 2007


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

Category: rails plugin
Group: None
Status: Closed
Resolution: Rejected
Priority: 3
Submitted By: Scott Taylor (smtlaissezfaire)
Assigned to: Nobody (None)
>Summary: "./script/generate rspec" is freezing

Initial Comment:

Setup: 

Rails project (version 1.2.3), checked out in vendor/rails
Rspec + rspec_on_rails trunk (rev 2537) checked out in vendor/plugins
rspec gem, version 1.0.8
Mac OS X.4.10
(Am I missing anything else?)

Bug:

running "./script/generate rspec" first checks for the existence of the spec dir (which it finds), and then freezes.  

Oddly enough, running "rdebug ./script/generate rspec" allows the rest of the files to be created (after prompting), as usual.

I've uploaded a screencast of the bug here:

http://railsnewbie.com/files/script_generate_rspec.mov

I would try debugging this myself, but obviously my debugger has an effect on the debugging!



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

>Comment By: Scott Taylor (smtlaissezfaire)
Date: 2007-10-19 01:56

Message:
Sounds good, David.  I'm pretty sure it was actually a
problem with all rails generators (so it's a problem with
rails, and by association with rspec), but I haven't seen
this problem in a long time anyway.  I'll reopen this ticket
if I have any more problems.

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

Comment By: David Chelimsky (dchelimsky)
Date: 2007-10-19 00:45

Message:
Closing per OP (long ago).

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

Comment By: Scott Taylor (smtlaissezfaire)
Date: 2007-09-28 02:26

Message:
Ah - so some new insight.  Actually, this isn't a freeze, it
just appears to be.  It only occurs when the file to be
generated is already present, and not identical(exists, but
is different).  Basically, the gets() routine seems to be
called before the puts prompt occurs.  Here is a little
screen cast:

http://railsnewbie.com/files/rspec_generator_bug2.mov

This doesn't look like a bug with rspec - it looks like a
bug with rails (or more likely my configuration).  I'm
having exactly the same thing with ./script/generate model
ModelName when the file exists and is different.

This ticket can be closed.

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

Comment By: Scott Taylor (smtlaissezfaire)
Date: 2007-08-27 15:12

Message:
I wasn't sure which generators you were speaking of, so I
tried a bunch (all of them seemed to work):

euclid% ./script/generate model HelloWorld
      exists  app/models/
      exists  test/unit/
      exists  test/fixtures/
      create  app/models/hello_world.rb
      create  test/unit/hello_world_test.rb
      create  test/fixtures/hello_worlds.yml
      exists  db/migrate
      create  db/migrate/075_create_hello_worlds.rb
euclid% ./script/destroy model HelloWorld
    notempty  db/migrate
    notempty  db
          rm  db/migrate/075_create_hello_worlds.rb
          rm  test/fixtures/hello_worlds.yml
          rm  test/unit/hello_world_test.rb
          rm  app/models/hello_world.rb
    notempty  test/fixtures
    notempty  test
    notempty  test/unit
    notempty  test
    notempty  app/models
    notempty  app
euclid% ./script/generate rspec_model HelloWorld
      exists  app/models/
      exists  spec/models/
      exists  spec/fixtures/
      create  app/models/hello_world.rb
      create  spec/fixtures/hello_worlds.yml
      create  spec/models/hello_world_spec.rb
      exists  db/migrate
      create  db/migrate/075_create_hello_worlds.rb
euclid% ./script/generate rspec_controller HelloWorld
      exists  app/controllers/
      exists  app/helpers/
      create  app/views/hello_world
      exists  spec/controllers/
      exists  spec/helpers/
      create  spec/views/hello_world
      create  spec/controllers/hello_world_controller_spec.rb
      create  spec/helpers/hello_world_helper_spec.rb
      create  app/controllers/hello_world_controller.rb
      create  app/helpers/hello_world_helper.rb
euclid% ./script/destroy rspec_model HelloWorld
    notempty  db/migrate
    notempty  db
          rm  db/migrate/075_create_hello_worlds.rb
          rm  spec/models/hello_world_spec.rb
          rm  spec/fixtures/hello_worlds.yml
          rm  app/models/hello_world.rb
    notempty  spec/fixtures
    notempty  spec
    notempty  spec/models
    notempty  spec
    notempty  app/models
    notempty  app
euclid% ./script/destroy rspec_controller HelloWorld
          rm  app/helpers/hello_world_helper.rb
          rm  app/controllers/hello_world_controller.rb
          rm  spec/helpers/hello_world_helper_spec.rb
          rm  spec/controllers/hello_world_controller_spec.rb
       rmdir  spec/views/hello_world
       rmdir  spec/views
Directory not empty - script/../config/../spec/views
euclid% ./script/generate rspec_scaffold HelloWorld
      exists  app/models/
      exists  app/controllers/
      exists  app/helpers/
      create  app/views/hello_worlds
      exists  spec/controllers/
      exists  spec/models/
      exists  spec/helpers/
      exists  spec/fixtures/
      create  spec/views/hello_worlds
      create  spec/controllers/hello_worlds_controller_spec.rb
      create  app/controllers/hello_worlds_controller.rb
      create  spec/helpers/hello_worlds_helper_spec.rb
      create  app/helpers/hello_worlds_helper.rb
      create  app/views/hello_worlds/index.rhtml
      create  app/views/hello_worlds/show.rhtml
      create  app/views/hello_worlds/new.rhtml
      create  app/views/hello_worlds/edit.rhtml
      create  app/models/hello_world.rb
      create  spec/fixtures/hello_worlds.yml
      create  spec/models/hello_world_spec.rb
      create  spec/views/hello_worlds/edit.rhtml_spec.rb
      create  spec/views/hello_worlds/index.rhtml_spec.rb
      create  spec/views/hello_worlds/new.rhtml_spec.rb
      create  spec/views/hello_worlds/show.rhtml_spec.rb
      exists  db/migrate
      create  db/migrate/075_create_hello_worlds.rb
       route  map.resources :hello_worlds
euclid% ./script/destroy rspec_scaffold HelloWorld
       route  map.resources :hello_worlds
    notempty  db/migrate
    notempty  db
          rm  db/migrate/075_create_hello_worlds.rb
          rm  spec/views/hello_worlds/show.rhtml_spec.rb
          rm  spec/views/hello_worlds/new.rhtml_spec.rb
          rm  spec/views/hello_worlds/index.rhtml_spec.rb
          rm  spec/views/hello_worlds/edit.rhtml_spec.rb
          rm  spec/models/hello_world_spec.rb
          rm  spec/fixtures/hello_worlds.yml
          rm  app/models/hello_world.rb
          rm  app/views/hello_worlds/edit.rhtml
          rm  app/views/hello_worlds/new.rhtml
          rm  app/views/hello_worlds/show.rhtml
          rm  app/views/hello_worlds/index.rhtml
          rm  app/helpers/hello_worlds_helper.rb
          rm  spec/helpers/hello_worlds_helper_spec.rb
          rm  app/controllers/hello_worlds_controller.rb
          rm  spec/controllers/hello_worlds_controller_spec.rb
       rmdir  spec/views/hello_worlds
       rmdir  spec/views
Directory not empty - script/../config/../spec/views
euclid% 

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

Comment By: Aslak Hellesøy (aslak_hellesoy)
Date: 2007-08-27 06:54

Message:
Can you confirm that this only happens for the rspec generator and none of the others?

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

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


More information about the rspec-devel mailing list