Closed benbagley closed 9 months ago
Same problem here.
Same here with rails 7.0.8 and ruby 3.3.0
Same issue here, Rails 7.1., Ruby 3.3.0. Really looking forward to using this Gem, seems super useful!
Same issue Rails 7.1.3 and ruby 3.2.2.
Sorry about that! I'll have a look this weekend. I must have missed something about auto loading.
Do you mind sharing your config/environment.rb? 🙏
Seeing the same with Ruby 3.3.0 and Rails 7.1.3
config/environment.rb
is simple:
# Load the Rails application.
require_relative "application"
# Initialize the Rails application.
Rails.application.initialize!
ActiveRecord::SchemaDumper.ignore_tables = ["spatial_ref_sys"]
Do you need the full development.rb
?
Apologies @julienbourdeau here is my environment.rb
# frozen_string_literal: true
# Load the Rails application.
require_relative "application"
# Initialize the Rails application.
Rails.application.initialize!
Here is my development.rb
# frozen_string_literal: true
require "active_support/core_ext/integer/time"
Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb.
# In the development environment your application's code is reloaded any time
# it changes. This slows down response time but is perfect for development
# since you don't have to restart the web server when you make code changes.
config.enable_reloading = true
# Do not eager load code on boot.
config.eager_load = false
# Show full error reports.
config.consider_all_requests_local = true
# Enable server timing
config.server_timing = true
# Enable/disable caching. By default caching is disabled.
# Run rails dev:cache to toggle caching.
if Rails.root.join("tmp/caching-dev.txt").exist?
config.action_controller.perform_caching = true
config.action_controller.enable_fragment_cache_logging = true
config.cache_store = :memory_store
config.public_file_server.headers = {
"Cache-Control" => "public, max-age=#{2.days.to_i}",
}
else
config.action_controller.perform_caching = false
config.cache_store = :null_store
end
# Store uploaded files on the local file system (see config/storage.yml for options).
config.active_storage.service = :local
# Don't care if the mailer can't send.
config.action_mailer.raise_delivery_errors = false
config.action_mailer.perform_caching = false
# Print deprecation notices to the Rails logger.
config.active_support.deprecation = :log
# Raise exceptions for disallowed deprecations.
config.active_support.disallowed_deprecation = :raise
# Tell Active Support which deprecation messages to disallow.
config.active_support.disallowed_deprecation_warnings = []
# Raise an error on page load if there are pending migrations.
config.active_record.migration_error = :page_load
# Highlight code that triggered database queries in logs.
config.active_record.verbose_query_logs = true
# Highlight code that enqueued background job in logs.
config.active_job.verbose_enqueue_logs = true
# Suppress logger output for asset requests.
config.assets.quiet = true
# Raises error for missing translations.
# config.i18n.raise_on_missing_translations = true
# Annotate rendered view with file names.
# config.action_view.annotate_rendered_view_with_filenames = true
# Uncomment if you wish to allow Action Cable access from any origin.
# config.action_cable.disable_request_forgery_protection = true
# Raise error when a before_action's only/except options reference missing actions
config.action_controller.raise_on_missing_callback_actions = true
# mailtrap
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
user_name: "xxxxxx",
password: "xxxxxx",
address: "sandbox.smtp.mailtrap.io",
host: "sandbox.smtp.mailtrap.io",
port: "2525",
authentication: :login,
}
# set action mailer default url options
config.action_mailer.default_url_options = { host: "localhost", port: 3000 }
end
Thanks! Nothing out of the ordinary.
As far as I understand, once the engine is required, the dir app/helpers
should be added to the autoloader.
https://guides.rubyonrails.org/autoloading_and_reloading_constants.html#autoloading-and-engines
I also added bootsnap to my demo app to be closer to yours.
I'd like to figure out what's going but in the meantime, I might just require explicitely all classes/modules in the app
folder 🤔
Do you mind running this please? 🙏
bin/rails runner 'pp Rails.autoloaders.zeitwerk_enabled?, ActiveSupport::Dependencies.autoload_paths'
This is what I get:
$ bin/rails runner 'pp Rails.autoloaders.zeitwerk_enabled?, ActiveSupport::Dependencies.autoload_paths'
true
["/Users/julien.bourdeau/Personal/rails/demo_app/lib",
"/Users/julien.bourdeau/Personal/rails/demo_app/app/channels",
"/Users/julien.bourdeau/Personal/rails/demo_app/app/controllers",
"/Users/julien.bourdeau/Personal/rails/demo_app/app/controllers/concerns",
"/Users/julien.bourdeau/Personal/rails/demo_app/app/helpers",
"/Users/julien.bourdeau/Personal/rails/demo_app/app/jobs",
"/Users/julien.bourdeau/Personal/rails/demo_app/app/mailers",
"/Users/julien.bourdeau/Personal/rails/demo_app/app/models",
"/Users/julien.bourdeau/Personal/rails/demo_app/app/models/concerns",
"/Users/julien.bourdeau/Personal/debugbar/debugbar/app/channels",
"/Users/julien.bourdeau/Personal/debugbar/debugbar/app/controllers",
"/Users/julien.bourdeau/Personal/debugbar/debugbar/app/helpers",
"/Users/julien.bourdeau/Personal/debugbar/debugbar/app/models",
"/Users/julien.bourdeau/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/actionmailbox-7.1.3/app/controllers",
"/Users/julien.bourdeau/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/actionmailbox-7.1.3/app/jobs",
"/Users/julien.bourdeau/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/actionmailbox-7.1.3/app/models",
"/Users/julien.bourdeau/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/activestorage-7.1.3/app/controllers",
"/Users/julien.bourdeau/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/activestorage-7.1.3/app/controllers/concerns",
"/Users/julien.bourdeau/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/activestorage-7.1.3/app/jobs",
"/Users/julien.bourdeau/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/activestorage-7.1.3/app/models"]
Can anyone please try v0.1.3 and see if it resolved the issue 🙏
Hi @julienbourdeau 0.1.13 works
Let me know if you still need the above command ran?
Not sure if this is another thing (after 0.1.13 install)
Looks to have an image with ActiveStorage images
Same goes for signing in with devise looks to pinpoint where the issue is though
Good news for TagHelpers!
The other one is a different error, I'm fixing it here #11 🙈
Ruby version: 3.2.2 Rails version: 7.1.2
This gem has some incredible potential, very much looking forward to using this.
I went through the installation steps and when running the server I got the following error.
uninitialized constant Debugbar::TagHelpers (NameError)
Here is the full error output:
The engine is mounted as shown in the installation guide + the rendering in the debugbar with the erb helper.