Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I see that <code>rspec-rails/lib/rspec/rails/tasks/rspec.rake</code> defines this for the <code>spec</code> task:</p> <pre><code>spec_prereq = Rails.configuration.generators.options[:rails][:orm] == :active_record ? "test:prepare" : :noop task :noop do; end task :default =&gt; :spec # other stuff desc "Run all specs in spec directory (excluding plugin specs)" RSpec::Core::RakeTask.new(:spec =&gt; spec_prereq) </code></pre> <p>...which runs:</p> <ul> <li><code>db:load_config</code></li> <li><code>db:test:purge</code></li> <li><code>db:test:load</code></li> <li><code>db:test:load_schema</code></li> <li><code>db:schema:load</code></li> </ul> <p>I see that, when running <code>rake db:schema:load</code>, I get:</p> <pre><code>-- enable_extension("plpgsql") -&gt; 0.0161s -- enable_extension("uuid-ossp") -&gt; 0.0063s -- create_table("growers", {:id=&gt;false, :force=&gt;true}) -&gt; 0.0049s -- initialize_schema_migrations_table() -&gt; 0.0062s </code></pre> <p>...which is different than when I run the migration:</p> <pre><code>== CreateGrowers: migrating ================================================== -- enable_extension("uuid-ossp") -&gt; 0.0050s -- create_table(:growers, {:id=&gt;:uuid}) -&gt; 0.0052s == CreateGrowers: migrated (0.0103s) ========================================= </code></pre> <p>Thus, it seems to me that the <code>db:schema:load</code> task isn't creating the table with the UUID primary key, thus causing the failures. Seems like a Rails bug??</p> <p><strong>Update:</strong> I guess I'll find out if it's a Rails bug: <a href="https://github.com/rails/rails/issues/11016" rel="nofollow">Issue 11016</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload