Alexey Poimtsev


3,930 Experience
37 Lessons Completed
0 Questions Solved


Posted in How to use Devise with Hotwire & Turbo.js Discussion

I have another problem - when i destroy my account from devise's Account page i see following error:

NoMethodError in Users::RegistrationsController#destroy
undefined method `users_url' for #Users::RegistrationsController:0x0000000002f058
Did you mean?


Rails.root: /Users/alec/Code/Internal/cosmoport
Application Trace | Framework Trace | Full Trace
config/initializers/devise.rb:27:in rescue in to_turbo_stream'
app/controllers/application_controller.rb:85:in `configure_time_zone'
Exception Causes
ActionView::MissingTemplate: Missing template users/registrations/destroy, devise/registrations/destroy, devise/destroy, turbo/destroy, application/destroy with {:locale=>[:en], :formats=>[:html], :variants=>[], :handlers=>[:raw, :erb, :html, :builder, :ruby, :jbuilder]}. Searched in: * "/Users/alec/Code/Internal/cosmoport/app/views" * "/Users/alec/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/blazer-2.4.3/app/views" * "/Users/alec/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/devise-i18n-1.10.0/app/views" * "/Users/alec/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/bundler/gems/devise-c82e4cf47b02/app/views" * "/Users/alec/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/view_component-2.38.0/app/views" * "/Users/alec/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/actiontext-" * "/Users/alec/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/actionmailbox-"

Any idea how to fix it?

Posted in Deploy rails project using subdirectories

You may try nginx rewrite module -

I'd like to split my rails application to microservices, such as

  • main app 1
  • main app 2
  • main app N
  • authentication and account management
  • administration console
  • marketing console (blazer & ahoy)
  • etc

As a reference - Spotify, Google, etc. All of them have a separate domain for authentication, so I'd like to ask you about best practices on how to organize application architecture

1 - how to navigate users from main apps, admin and marketing console to the authentication domain using devise? Should I use doorkeeper or ruby-cas or is there a better solution?
2 - should I store all data in one database and use database prefixes for main-app's (something like main_app1_comments or main_app_3_likes) or is it better to store data in separate databases?
3 - should I store users on in main database (which will contain authentication data, roles, stats, etc) or should i store users in their own databases and just replicate data from main database?

Any ideas?

Posted in New website design!

What do you think - which one is more perspective to use in projects? Alpine or Stimulus?

Posted in New website design!

Hi, Chris! As I see you’re using alpinejs on this site instead of stimulus from your videos. Is there any reason to switch from stimulus to alpine?

Is koala still alive? As i see - latest commit was in 2017

Posted in ActionText and Globalize error

Not yet :( I paused this task and started working on another issue. Will back with (i hope) a solution soon

Posted in ActionText and Globalize error

I have application which is using globalize gem and i planning to start using ActionText. So, for example i have model called Business

class Business < ApplicationRecord
  translates :name, :description

  has_rich_text :description

and i created an record in database. But on attempt to edit i see following error

undefined method `body' for "<div><strong>jfgjwhgewr</strong></div>":String

for my form

    - I18n.available_locales.each do |locale|
      = f.input :"name_#{locale.to_s}", label: "Name (#{locale.to_s})"
    - I18n.available_locales.each do |locale|
      = f.label "Description (#{locale.to_s})"
      = f.rich_text_area :"description_#{locale.to_s}"

Whats wrong with it and how can i solve this issue?

PS: I found but this solution looks little bit strange :(

Posted in Rails Application Templates Discussion

Is it possible to pre-configure rails template to use postgres as a default db, disable sprockets etc?

Of course i can create .railsrc file with following content


But can i hardcode those options in template?

Posted in Blazer and webpacker

Hi, lads!
It looks like blazer requires default asset pipeline and doesn't work with webpacker. Did you saw any hack/fork how to make them work together?