Giter Site home page Giter Site logo

baban / flextures Goto Github PK

View Code? Open in Web Editor NEW
22.0 4.0 3.0 307 KB

This plug-in can load and dump test data in databases, loading function is very flexible, dump function is very simple

License: MIT License

Ruby 100.00%
fixtures ruby rails csv csv-export csv-import yaml yaml-export yaml-import

flextures's People

Contributors

baban avatar dependabot[bot] avatar takashibagura avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

flextures's Issues

NoMethodError: undefined method `configure' for RSpec:Module

Versions

  • ruby 2.7.0p
  • rails (6.0.3.4)
  • activerecord 6.0.3.4
  • activesupport 6.0.3.4
  • flextures 4.3.0
  • smarter_csv 1.2.6
  • rspec-core (3.10.0)
  • rspec-expectations (3.10.0)
  • rspec-mocks (3.10.0)
  • rspec-rails (4.0.1)
  • rspec-support (3.10.0)

Command

$ rails db:flextures:dump --trace

Trace

rails aborted!
NoMethodError: undefined method `configure' for RSpec:Module
./.rvm/gems/ruby-2.7.0/gems/flextures-4.3.0/lib/flextures/rspec_flextures_support.rb:19:in `<module:RSpec>'
./.rvm/gems/ruby-2.7.0/gems/flextures-4.3.0/lib/flextures/rspec_flextures_support.rb:2:in `<main>'
./.rvm/gems/ruby-2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
./.rvm/gems/ruby-2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
./.rvm/gems/ruby-2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
./.rvm/gems/ruby-2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
./.rvm/gems/ruby-2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
./.rvm/gems/ruby-2.7.0/gems/activesupport-6.0.3.4/lib/active_support/dependencies.rb:324:in `block in require'
./.rvm/gems/ruby-2.7.0/gems/activesupport-6.0.3.4/lib/active_support/dependencies.rb:291:in `load_dependency'
./.rvm/gems/ruby-2.7.0/gems/activesupport-6.0.3.4/lib/active_support/dependencies.rb:324:in `require'
./.rvm/gems/ruby-2.7.0/gems/flextures-4.3.0/lib/flextures.rb:12:in `<main>'
./.rvm/gems/ruby-2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
./.rvm/gems/ruby-2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
./.rvm/gems/ruby-2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
./.rvm/gems/ruby-2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
./.rvm/gems/ruby-2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
./.rvm/rubies/ruby-2.7.0/lib/ruby/site_ruby/2.7.0/bundler/runtime.rb:74:in `block (2 levels) in require'
./.rvm/rubies/ruby-2.7.0/lib/ruby/site_ruby/2.7.0/bundler/runtime.rb:69:in `each'
./.rvm/rubies/ruby-2.7.0/lib/ruby/site_ruby/2.7.0/bundler/runtime.rb:69:in `block in require'
./.rvm/rubies/ruby-2.7.0/lib/ruby/site_ruby/2.7.0/bundler/runtime.rb:58:in `each'
./.rvm/rubies/ruby-2.7.0/lib/ruby/site_ruby/2.7.0/bundler/runtime.rb:58:in `require'
./.rvm/rubies/ruby-2.7.0/lib/ruby/site_ruby/2.7.0/bundler.rb:174:in `require'
./…/config/application.rb:20:in `<main>'
./.rvm/gems/ruby-2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
./.rvm/gems/ruby-2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
./.rvm/gems/ruby-2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
./.rvm/gems/ruby-2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
./.rvm/gems/ruby-2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
./.rvm/gems/ruby-2.7.0/gems/activesupport-6.0.3.4/lib/active_support/dependencies.rb:324:in `block in require'
./.rvm/gems/ruby-2.7.0/gems/activesupport-6.0.3.4/lib/active_support/dependencies.rb:291:in `load_dependency'
./.rvm/gems/ruby-2.7.0/gems/activesupport-6.0.3.4/lib/active_support/dependencies.rb:324:in `require'
./.rvm/gems/ruby-2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:53:in `require_relative'
./…/Rakefile:4:in `<main>'
./.rvm/gems/ruby-2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:59:in `load'
./.rvm/gems/ruby-2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:59:in `load'
./.rvm/gems/ruby-2.7.0/gems/activesupport-6.0.3.4/lib/active_support/dependencies.rb:318:in `block in load'
./.rvm/gems/ruby-2.7.0/gems/activesupport-6.0.3.4/lib/active_support/dependencies.rb:291:in `load_dependency'
./.rvm/gems/ruby-2.7.0/gems/activesupport-6.0.3.4/lib/active_support/dependencies.rb:318:in `load'
./.rvm/rubies/ruby-2.7.0/lib/ruby/gems/2.7.0/gems/rake-13.0.1/lib/rake/rake_module.rb:29:in `load_rakefile'
./.rvm/rubies/ruby-2.7.0/lib/ruby/gems/2.7.0/gems/rake-13.0.1/lib/rake/application.rb:703:in `raw_load_rakefile'
./.rvm/rubies/ruby-2.7.0/lib/ruby/gems/2.7.0/gems/rake-13.0.1/lib/rake/application.rb:104:in `block in load_rakefile'
./.rvm/rubies/ruby-2.7.0/lib/ruby/gems/2.7.0/gems/rake-13.0.1/lib/rake/application.rb:186:in `standard_exception_handling'
./.rvm/rubies/ruby-2.7.0/lib/ruby/gems/2.7.0/gems/rake-13.0.1/lib/rake/application.rb:103:in `load_rakefile'
./.rvm/gems/ruby-2.7.0/gems/railties-6.0.3.4/lib/rails/commands/rake/rake_command.rb:22:in `block in perform'
./.rvm/rubies/ruby-2.7.0/lib/ruby/gems/2.7.0/gems/rake-13.0.1/lib/rake/application.rb:186:in `standard_exception_handling'
./.rvm/gems/ruby-2.7.0/gems/railties-6.0.3.4/lib/rails/commands/rake/rake_command.rb:20:in `perform'
./.rvm/gems/ruby-2.7.0/gems/railties-6.0.3.4/lib/rails/command.rb:48:in `invoke'
./.rvm/gems/ruby-2.7.0/gems/railties-6.0.3.4/lib/rails/commands.rb:18:in `<main>'
./.rvm/gems/ruby-2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
./.rvm/gems/ruby-2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
./.rvm/gems/ruby-2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
./.rvm/gems/ruby-2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
./.rvm/gems/ruby-2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
./.rvm/gems/ruby-2.7.0/gems/activesupport-6.0.3.4/lib/active_support/dependencies.rb:324:in `block in require'
./.rvm/gems/ruby-2.7.0/gems/activesupport-6.0.3.4/lib/active_support/dependencies.rb:291:in `load_dependency'
./.rvm/gems/ruby-2.7.0/gems/activesupport-6.0.3.4/lib/active_support/dependencies.rb:324:in `require'
bin/rails:4:in `<main>'

Cannot load table without id

Any ideas on the most appropriate way to fix this? This happens when trying to load to table without id on Postgres. Flextures was used to export.

loading...
try loading /Users/ijcd/work/anythingsocial/foundersnetwork/db/data/fixtures/refinery_roles_users.yml
rake aborted!
PG::Error: ERROR: column "id" does not exist
LINE 1: ...users" ("role_id", "user_id") VALUES ($1, $2) RETURNING "id"

from refinery

create_table :refinery_roles_users, :id => false do |t|
t.integer :user_id
t.integer :role_id
end

module Refinery
class RolesUsers < Refinery::Core::BaseModel
belongs_to :role
belongs_to :user
end
end

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.