XaoGao / Todoser

Clone trello
3 stars 11 forks source link

Добавить гем kaminari #74

Closed XaoGao closed 2 years ago

XaoGao commented 2 years ago

Если данных очень много (например у пользователя есть 100_000 проектов), то страница будет загружаться долго, нужно выгружать данные постранично, Сайт https://www.ruby-toolbox.com/categories/pagination показывает, что самое популярное решение для пагинации https://github.com/kaminari/kaminari, нужно: 1) Добавить гем

gem 'kaminari' (зафиксироваться на версии)

2) Запустить в терминале

bundle install

3) Проверить что гем успешно подключен(пока нас устроют настройки по умолчанию)

sas2job commented 2 years ago

`$ rails g kaminari:config Bundler could not find compatible versions for gem "nokogiri": In snapshot (Gemfile.lock): nokogiri (= 1.13.8)

In Gemfile: capybara (>= 3.26) was resolved to 3.37.1, which depends on nokogiri (~> 1.8)

cucumber-rails was resolved to 2.5.1, which depends on
  nokogiri (~> 1.10)

stimulus_reflex (~> 3.4) was resolved to 3.4.1, which depends on
  nokogiri

webdrivers was resolved to 5.0.0, which depends on
  nokogiri (~> 1.6)

Deleting your Gemfile.lock file and running bundle install will rebuild your snapshot from scratch, using only the gems in your Gemfile, which may resolve the conflict.`