[rspec-users] Problems running pre-commit

David Chelimsky dchelimsky at gmail.com
Mon Feb 25 11:51:11 EST 2008


On Mon, Feb 25, 2008 at 10:24 AM, Rupert Voelcker <rupert at rupespad.com> wrote:
> On 25/02/2008, David Chelimsky <dchelimsky at gmail.com> wrote:
>  > On Mon, Feb 25, 2008 at 9:01 AM, Rupert Voelcker <rupert at rupespad.com> wrote:
>  >  > Have been having some probs getting the pre-commit to run so help
>  >  >  would be appreciated (then I can add some specs to my patch) - thanks
>  >  >  for the suggestion to post here Dave :)
>  >  >
>  >  >  I'm on OS X and have checked out the source from
>  >  >  svn://rubyforge.org/var/svn/rspec/trunk (rev 3317)
>  >  >
>  >  >  rake check_for_gem_dependencies (nothing to see here)
>  >  >  rake install_dependencies (long wait, much network activity, various
>  >  >  rails versions appear in example_rails_app)
>  >  >
>  >  >  rename database.sqlite3.yml to database.yml in example_rails_app/config
>  >  >
>  >  >  rake pre_commit --trace
>  >
>  >
>  > There are a couple of steps missing. Did you read the README
>  >  (http://rspec.info/rdoc/files/README.html)?
>  >
>  >  Also - I see you're using sqlite3. I can't run mine with sqlite3 right
>  >  now. It's probably been this way for a while, because it looks like
>  >  the error is the "You have 5 pending migrations:" error, which has
>  >  been around for some time.
>  >
>  >  Try following the directions in the README to the letter (including
>  >  using mysql instead of sqlite3) and see if that works.
>
>  Ah-ha - missed the readme, but unfortunately it hasn't helped.  I've
>  followed what it says and I'm still getting the same 4 failures and
>  the same stack trace at the end :(
>
>  I also cannot run the rails pre-commit and am getting the following
>  when I run rake -f Multirails.rake pre_commit --trace from inside the
>  example_app:
>
>  <snip>
>  running against rails 2.0.2
>  ** Invoke db:migrate (first_time)
>  ** Invoke environment (first_time)
>  ** Execute environment
>  ** Execute db:migrate
>  == 5 CreatePurchases: migrating ===============================================
>  -- create_table(:purchases)
>    -> 0.0274s
>  == 5 CreatePurchases: migrated (0.0275s) ======================================
>
>  ** Invoke db:schema:dump (first_time)
>  ** Invoke environment
>  ** Execute db:schema:dump
>  (in /Users/rupert/stuff/downloads/rspec/example_rails_app)
>  running against rails 2.0.2
>  ** Invoke spec (first_time)
>  ** Invoke db:test:prepare (first_time)
>  ** Invoke environment (first_time)
>  ** Execute environment
>  ** Invoke db:abort_if_pending_migrations (first_time)
>  ** Invoke environment
>  ** Execute db:abort_if_pending_migrations
>  ** Execute db:test:prepare
>  ** Invoke db:test:clone (first_time)
>  ** Invoke db:schema:dump (first_time)
>  ** Invoke environment
>  ** Execute db:schema:dump
>  ** Invoke db:test:purge (first_time)
>  ** Invoke environment
>  ** Execute db:test:purge
>  ** Execute db:test:clone
>  ** Invoke db:schema:load (first_time)
>  ** Invoke environment
>  ** Execute db:schema:load
>  ** Execute spec
>  running against rails 2.0.2
>  ................................................................................................
>
>  Finished in 0.649869 seconds
>
>  96 examples, 0 failures
>  rake aborted!
>  Command ruby -I"/Users/rupert/stuff/downloads/rspec/rspec/lib"
>  "/Users/rupert/stuff/downloads/rspec/rspec/bin/spec"
>  "vendor/plugins/rspec_on_rails/spec/rails/autotest/mappings_spec.rb"
>  "vendor/plugins/rspec_on_rails/spec/rails/autotest/rails_rspec_spec.rb"
>  "vendor/plugins/rspec_on_rails/spec/rails/example/assigns_hash_proxy_spec.rb"
>  "vendor/plugins/rspec_on_rails/spec/rails/example/configuration_spec.rb"
>  "vendor/plugins/rspec_on_rails/spec/rails/example/controller_isolation_spec.rb"
>  "vendor/plugins/rspec_on_rails/spec/rails/example/controller_spec_spec.rb"
>  "vendor/plugins/rspec_on_rails/spec/rails/example/example_group_factory_spec.rb"
>  "vendor/plugins/rspec_on_rails/spec/rails/example/helper_spec_spec.rb"
>  "vendor/plugins/rspec_on_rails/spec/rails/example/model_spec_spec.rb"
>  "vendor/plugins/rspec_on_rails/spec/rails/example/shared_behaviour_spec.rb"
>  "vendor/plugins/rspec_on_rails/spec/rails/example/test_unit_assertion_accessibility_spec.rb"
>  "vendor/plugins/rspec_on_rails/spec/rails/example/view_spec_spec.rb"
>  "vendor/plugins/rspec_on_rails/spec/rails/extensions/action_controller_rescue_action_spec.rb"
>  "vendor/plugins/rspec_on_rails/spec/rails/extensions/action_view_base_spec.rb"
>  "vendor/plugins/rspec_on_rails/spec/rails/extensions/active_record_spec.rb"
>  "vendor/plugins/rspec_on_rails/spec/rails/matchers/assert_select_spec.rb"
>  "vendor/plugins/rspec_on_rails/spec/rails/matchers/description_generation_spec.rb"
>  "vendor/plugins/rspec_on_rails/spec/rails/matchers/errors_on_spec.rb"
>  "vendor/plugins/rspec_on_rails/spec/rails/matchers/have_text_spec.rb"
>  "vendor/plugins/rspec_on_rails/spec/rails/matchers/redirect_to_spec.rb"
>  "vendor/plugins/rspec_on_rails/spec/rails/matchers/render_spec.rb"
>  "vendor/plugins/rspec_on_rails/spec/rails/mocks/mock_model_spec.rb"
>  "vendor/plugins/rspec_on_rails/spec/rails/sample_spec.rb"
>  "vendor/plugins/rspec_on_rails/spec/rails/spec_server_spec.rb"
>  "vendor/plugins/rspec_on_rails/spec/rails/spec_spec.rb" --options
>  "/Users/rupert/stuff/downloads/rspec/example_rails_app/spec/spec.opts"
>  failed
>  /Users/rupert/stuff/downloads/rspec/rspec/lib/spec/rake/spectask.rb:184:in
>
> `define'
>  /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1003:in `verbose'
>  /Users/rupert/stuff/downloads/rspec/rspec/lib/spec/rake/spectask.rb:153:in
>
> `define'
>  /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:546:in `call'
>  /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:546:in `execute'
>  /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:541:in `each'
>  /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:541:in `execute'
>  /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:508:in
>  `invoke_with_call_chain'
>  /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in `synchronize'
>  /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in
>  `invoke_with_call_chain'
>  /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:494:in `invoke'
>
> /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1931:in `invoke_task'
>  /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in `top_level'
>  /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in `each'
>  /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in `top_level'
>  /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1948:in
>  `standard_exception_handling'
>  /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1903:in `top_level'
>  /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1881:in `run'
>  /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1948:in
>  `standard_exception_handling'
>  /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1878:in `run'
>  /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.1/bin/rake:31
>  /usr/local/bin/rake:19:in `load'
>  /usr/local/bin/rake:19
>  (in /Users/rupert/stuff/downloads/rspec/example_rails_app)
>  running against rails 2.0.2
>  ** Invoke spec:plugins:rspec_on_rails (first_time)
>  ** Execute spec:plugins:rspec_on_rails
>  running against rails 2.0.2
>  .FF..............................................................................................................................................................P..........................................................................................P................
>  .........P................
>  .....................................
>
>  Pending:
>  should have_tag should report the correct line number for a nested
>  failed test/unit assertion (Doesn't work at the moment. Do we want to
>  support this?)
>  A controller spec a spec in a context without controller_name set
>  should fail with a useful warning (need a new way to deal with
>  examples that should_raise)
>  A controller spec a spec in a context without controller_name set
>  should fail with a useful warning (need a new way to deal with
>  examples that should_raise)
>
>  1)
>  Timeout::Error in 'script/spec_server file with TextMate bundle runs a spec'
>  execution expired
>
>
>  2)
>  Timeout::Error in 'script/spec_server file without TextMate bundle runs a spec'
>  execution expired
>
>
>  Finished in 24.2063 seconds
>
>  332 examples, 2 failures, 3 pending
>  rake aborted!
>  ERROR while running rake: rake spec:plugins:rspec_on_rails  --trace
>  /Users/rupert/stuff/downloads/rspec/rspec/pre_commit/lib/pre_commit/pre_commit.rb:19:in
>  `rake_sh'
>  /Users/rupert/stuff/downloads/rspec/rspec/pre_commit/lib/pre_commit/rspec_on_rails.rb:44:in
>  `rspec_pre_commit'
>  /Users/rupert/stuff/downloads/rspec/rspec/pre_commit/lib/pre_commit/rspec_on_rails.rb:10:in
>  `pre_commit'
>  /Users/rupert/stuff/downloads/rspec/rspec/pre_commit/lib/pre_commit/rspec_on_rails.rb:6:in
>  `each'
>  /Users/rupert/stuff/downloads/rspec/rspec/pre_commit/lib/pre_commit/rspec_on_rails.rb:6:in
>  `pre_commit'
>  /Users/rupert/stuff/downloads/rspec/example_rails_app/Multirails.rake:7
>
> /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:546:in `call'
>  /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:546:in `execute'
>  /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:541:in `each'
>  /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:541:in `execute'
>  /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:508:in
>  `invoke_with_call_chain'
>  /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in `synchronize'
>  /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in
>  `invoke_with_call_chain'
>  /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:494:in `invoke'
>  /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1931:in `invoke_task'
>  /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in `top_level'
>  /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in `each'
>  /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in `top_level'
>  /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1948:in
>  `standard_exception_handling'
>  /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1903:in `top_level'
>  /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1881:in `run'
>  /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1948:in
>  `standard_exception_handling'
>  /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1878:in `run'
>  /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.1/bin/rake:31
>  /usr/local/bin/rake:19:in `load'
>  /usr/local/bin/rake:19
>
>  Any ideas? - thanks for trying to get this sorted btw.

Yes - I sometimes get the spec_server timeout as well - but I usually don't.

Try running just against just one environment:

rake rspec:pre_commit

without the -f option.

>
>  Rupert
>
>
> _______________________________________________
>  rspec-users mailing list
>  rspec-users at rubyforge.org
>  http://rubyforge.org/mailman/listinfo/rspec-users
>


More information about the rspec-users mailing list