Alexey Poimtsev

Joined

3,820 Experience
36 Lessons Completed
0 Questions Solved

Activity

Posted in Deploy rails project using subdirectories

Hey!
You may try nginx rewrite module - https://www.nginx.com/blog/creating-nginx-rewrite-rules/

Hi!
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?

Hi!
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

Hi!
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
  globalize_accessors

  has_rich_text :description
end 

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

  .form-inputs
    - 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 https://github.com/rails/actiontext/issues/32#issuecomment-450653800 but this solution looks little bit strange :(

Posted in Rails Application Templates Discussion

Hi!
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

--skip-test
--database=postgresql
--skip-sprockets
--skip-javascript
--skip-system-test
--skip-active-storage
--webpack

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?

logo Created with Sketch.

Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

© 2021 GoRails, LLC. All rights reserved.