Giter Club home page Giter Club logo

demo_mode's Issues

`RecordNotFound` after `rake db:reset`

When running with demo mode enabled in local development, running rake db:reset will clear out any existing DemoMode::Session record. This can cause the application to break due to an ActiveRecord::RecordNotFound error triggered by one of the controller before_actions. Instead of raising a hard error, we could probably force a logout instead. We'd just need to think about whether this wouldn't mask real lookup issues.

Issue with rake task when setting up demo_mode in new Rails app.

I'm trying to set up demo_mode in a new Rails app (tried with an older one as well, but same issue).

Running it on a Rails 7 app with Ruby 3.0.3.

What I'm getting is a failure with the rake task.

bundle exec rails generate demo_mode:install
      create  config/initializers/demo_mode.rb
      create  config/personas/sample_persona.rb
        rake  demo_mode:install:migrations
rake aborted!
Don't know how to build task 'demo_mode:install:migrations' (See the list of available tasks with `rake --tasks`)

And running it with --trace:

  rake  demo_mode:install:migrations --trace

rake aborted!
Don't know how to build task 'demo_mode:install:migrations' (See the list of available tasks with `rake --tasks`)
/home/daniel/.rbenv/versions/3.0.3/lib/ruby/gems/3.0.0/gems/rake-13.0.6/lib/rake/task_manager.rb:59:in `[]'
/home/daniel/.rbenv/versions/3.0.3/lib/ruby/gems/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:159:in `invoke_task'
/home/daniel/.rbenv/versions/3.0.3/lib/ruby/gems/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `block (2 levels) in top_level'
/home/daniel/.rbenv/versions/3.0.3/lib/ruby/gems/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `each'
/home/daniel/.rbenv/versions/3.0.3/lib/ruby/gems/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `block in top_level'
/home/daniel/.rbenv/versions/3.0.3/lib/ruby/gems/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:125:in `run_with_threads'
/home/daniel/.rbenv/versions/3.0.3/lib/ruby/gems/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:110:in `top_level'
/home/daniel/.rbenv/versions/3.0.3/lib/ruby/gems/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:83:in `block in run'
/home/daniel/.rbenv/versions/3.0.3/lib/ruby/gems/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:186:in `standard_exception_handling'
/home/daniel/.rbenv/versions/3.0.3/lib/ruby/gems/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:80:in `run'
/home/daniel/.rbenv/versions/3.0.3/lib/ruby/gems/3.0.0/gems/rake-13.0.6/exe/rake:27:in `<top (required)>'
/home/daniel/.rbenv/versions/3.0.3/bin/rake:25:in `load'
/home/daniel/.rbenv/versions/3.0.3/bin/rake:25:in `<main>'

Thank you in advance! Demo_mode looks amazing!

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.