#
#
Pagy Playground
You can showcase, clone, and develop a few Pagy apps without needing to set anything up on your side!
$ pagy --help
#
Pagy Apps
We have a few single-file apps ready to run in your browser for various purposes. These are all tested and used to run the E2e Test workflow.
You can use this app as a starting point to try Pagy or reproduce issues to get support or file bug reports.
repro
app
pagy clone repro
You should find the ./repro.ru
cloned app file in the current directory. Feel free to rename or move it as you wish.
This command runs your rackup
app with a puma
server. On Linux platforms, it also uses rerun
to auto-restart it when changes are made:
pagy path/to/your-repro.ru
Open a browser and navigate to http://127.0.0.1:8000
Edit it at will.
Tip
Bundler installs the required gems during the first run.
You can use this app as a starting point to reproduce Rails-related Pagy issues. It has the same usage as the
pagy clone rails
pagy ./rails.ru
This is the interactive showcase for all the pagy helpers and CSS styles.
Try it now!
Run the interactive demo from your terminal:
pagy demo
...and point your browser to http://127.0.0.1:8000
Run pagy clone demo
to inspect the app file
If you want to see how your CSS changes look, you can follow the same usage as the
This is the interactive showcase and reproduction tool for the :calendar
paginator:
Try it now!
Run the interactive demo from your terminal:
pagy calendar
...and point your browser to http://127.0.0.1:8000
Run pagy clone calendar
to inspect the app file.
If you need to reproduce any calendar-related issue, you can follow the same usage as the
These are the interactive showcase/repro for the :keyset
paginator with ActiveRecord
or Sequel
sets:
Try it now!
Run the interactive demo from your terminal:
pagy | grep key
keynav Showcase the Keynav pagination (ActiveRecord example)
keyset Showcase the Keyset pagination (ActiveRecord example)
keyset_sequel Showcase the Keyset pagination (Sequel example)
pagy keynav
pagy keyset
pagy keyset_sequel
...and point your browser to http://127.0.0.1:8000
Run for example pagy clone keyset
to inspect the cloned keyset app file.
#
Troubleshooting
All the pagy apps use bundler/inline.
Depending on your environment, you might get this message for some gem:
You have already activated GEMNAME v1, but your Gemfile requires GEMNAME v2.
Prepending `bundle exec` to your command may solve this.
If bundle exec
doesn't solve it, then try bundle update
and gem cleanup
.
If you encounter another error after that:
... `find_spec_for_exe': can't find gem GEMNAME (>= 0.x) with executable EXEC (Gem::GemNotFoundException)
then gem pristine GEMNAME
should solve the problem.
Rerun is used to restart your app automatically during development (only on Linux platforms).
That's very convenient, but it may still have some rough edges:
** ERROR: Directory is already being watched! **
Your app is in a directory with looping symlinks, and the listen
gem cannot handle it.