Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fresh install on Rails 7.0.4 can't setup #671

Open
almaron opened this issue Oct 8, 2022 · 2 comments
Open

Fresh install on Rails 7.0.4 can't setup #671

almaron opened this issue Oct 8, 2022 · 2 comments

Comments

@almaron
Copy link

almaron commented Oct 8, 2022

Steps to reproduce

  • fresh rails 7.0.4 application
  • add apartment to Gemfile and install
  • run the setup generator

Expected behavior

  • creates the config file and returns success

Actual behavior

➜  $ bundle exec rails generate apartment:install
/home/malkav/.rvm/gems/ruby-3.1.1@demiurge/gems/actionpack-7.0.4/lib/action_dispatch/middleware/stack.rb:37:in `build': undefined method `new' for "Apartment::Reloader":String (NoMethodError)

        klass.new(app, *args, &block)
             ^^^^
Did you mean?  next
	from /home/malkav/.rvm/gems/ruby-3.1.1@demiurge/gems/actionpack-7.0.4/lib/action_dispatch/middleware/stack.rb:166:in `block in build'
	from /home/malkav/.rvm/gems/ruby-3.1.1@demiurge/gems/actionpack-7.0.4/lib/action_dispatch/middleware/stack.rb:162:in `each'
	from /home/malkav/.rvm/gems/ruby-3.1.1@demiurge/gems/actionpack-7.0.4/lib/action_dispatch/middleware/stack.rb:162:in `inject'
	from /home/malkav/.rvm/gems/ruby-3.1.1@demiurge/gems/actionpack-7.0.4/lib/action_dispatch/middleware/stack.rb:162:in `build'
	from /home/malkav/.rvm/gems/ruby-3.1.1@demiurge/gems/railties-7.0.4/lib/rails/engine.rb:516:in `block in app'
	from /home/malkav/.rvm/gems/ruby-3.1.1@demiurge/gems/railties-7.0.4/lib/rails/engine.rb:512:in `synchronize'
	from /home/malkav/.rvm/gems/ruby-3.1.1@demiurge/gems/railties-7.0.4/lib/rails/engine.rb:512:in `app'
	from /home/malkav/.rvm/gems/ruby-3.1.1@demiurge/gems/railties-7.0.4/lib/rails/application/finisher.rb:52:in `block in <module:Finisher>'
	from /home/malkav/.rvm/gems/ruby-3.1.1@demiurge/gems/railties-7.0.4/lib/rails/initializable.rb:32:in `instance_exec'
	from /home/malkav/.rvm/gems/ruby-3.1.1@demiurge/gems/railties-7.0.4/lib/rails/initializable.rb:32:in `run'
	from /home/malkav/.rvm/gems/ruby-3.1.1@demiurge/gems/railties-7.0.4/lib/rails/initializable.rb:61:in `block in run_initializers'
	from /home/malkav/.rvm/rubies/ruby-3.1.1/lib/ruby/3.1.0/tsort.rb:228:in `block in tsort_each'
	from /home/malkav/.rvm/rubies/ruby-3.1.1/lib/ruby/3.1.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
	from /home/malkav/.rvm/rubies/ruby-3.1.1/lib/ruby/3.1.0/tsort.rb:431:in `each_strongly_connected_component_from'
	from /home/malkav/.rvm/rubies/ruby-3.1.1/lib/ruby/3.1.0/tsort.rb:349:in `block in each_strongly_connected_component'
	from /home/malkav/.rvm/rubies/ruby-3.1.1/lib/ruby/3.1.0/tsort.rb:347:in `each'
	from /home/malkav/.rvm/rubies/ruby-3.1.1/lib/ruby/3.1.0/tsort.rb:347:in `call'
	from /home/malkav/.rvm/rubies/ruby-3.1.1/lib/ruby/3.1.0/tsort.rb:347:in `each_strongly_connected_component'
	from /home/malkav/.rvm/rubies/ruby-3.1.1/lib/ruby/3.1.0/tsort.rb:226:in `tsort_each'
	from /home/malkav/.rvm/rubies/ruby-3.1.1/lib/ruby/3.1.0/tsort.rb:205:in `tsort_each'
	from /home/malkav/.rvm/gems/ruby-3.1.1@demiurge/gems/railties-7.0.4/lib/rails/initializable.rb:60:in `run_initializers'
	from /home/malkav/.rvm/gems/ruby-3.1.1@demiurge/gems/railties-7.0.4/lib/rails/application.rb:372:in `initialize!'
	from /home/malkav/work/demiurge/worlds/config/environment.rb:5:in `<main>'
	from /home/malkav/.rvm/gems/ruby-3.1.1@demiurge/gems/bootsnap-1.13.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
	from /home/malkav/.rvm/gems/ruby-3.1.1@demiurge/gems/bootsnap-1.13.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
	from /home/malkav/.rvm/gems/ruby-3.1.1@demiurge/gems/zeitwerk-2.6.1/lib/zeitwerk/kernel.rb:35:in `require'
	from /home/malkav/.rvm/gems/ruby-3.1.1@demiurge/gems/railties-7.0.4/lib/rails/application.rb:348:in `require_environment!'
	from /home/malkav/.rvm/gems/ruby-3.1.1@demiurge/gems/railties-7.0.4/lib/rails/command/actions.rb:28:in `require_environment!'
	from /home/malkav/.rvm/gems/ruby-3.1.1@demiurge/gems/railties-7.0.4/lib/rails/command/actions.rb:15:in `require_application_and_environment!'
	from /home/malkav/.rvm/gems/ruby-3.1.1@demiurge/gems/railties-7.0.4/lib/rails/commands/generate/generate_command.rb:21:in `perform'
	from /home/malkav/.rvm/gems/ruby-3.1.1@demiurge/gems/thor-1.2.1/lib/thor/command.rb:27:in `run'
	from /home/malkav/.rvm/gems/ruby-3.1.1@demiurge/gems/thor-1.2.1/lib/thor/invocation.rb:127:in `invoke_command'
	from /home/malkav/.rvm/gems/ruby-3.1.1@demiurge/gems/thor-1.2.1/lib/thor.rb:392:in `dispatch'
	from /home/malkav/.rvm/gems/ruby-3.1.1@demiurge/gems/railties-7.0.4/lib/rails/command/base.rb:87:in `perform'
	from /home/malkav/.rvm/gems/ruby-3.1.1@demiurge/gems/railties-7.0.4/lib/rails/command.rb:48:in `invoke'
	from /home/malkav/.rvm/gems/ruby-3.1.1@demiurge/gems/railties-7.0.4/lib/rails/commands.rb:18:in `<main>'
	from /home/malkav/.rvm/gems/ruby-3.1.1@demiurge/gems/bootsnap-1.13.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
	from /home/malkav/.rvm/gems/ruby-3.1.1@demiurge/gems/bootsnap-1.13.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
	from bin/rails:4:in `<main>'

System configuration

Ubuntu 22.04

  • Database: (Tell us what database and its version you use.)

Postgres 14.5

  • Apartment version: 0.24.3

  • Apartment config (in config/initializers/apartment.rb or so):

    • use_schemas: (true or false)
  • Rails (or ActiveRecord) version:
    *7.0.4

  • Ruby version:
    3.1.1

@shutooike
Copy link

@almaron
Use ros-apartment. It's a fork. Refer to: #638 (comment)

@Melaku05
Copy link

Steps to reproduce

I'm new here please help

Expected behavior

To run correctly

Actual behavior

Screenshot from 2023-09-26 18-54-00

Screenshot from 2023-09-26 19-04-13

System configuration

  • Database: (Tell us what database and its version you use.)
    postgres 15

  • Apartment version:

  • Apartment config (in config/initializers/apartment.rb or so):

require 'apartment/elevators/host'

Apartment.configure do |config|
 
end


Rails.application.config.middleware.use Apartment::Elevators::Host
  • use_schemas: (true or false)

  • Rails (or ActiveRecord) version:7.0.8

  • Ruby version: 3.2.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants