-
Notifications
You must be signed in to change notification settings - Fork 82
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
Workout page in gym needs pagination #208
Comments
@s-edwards I would like to work on this issue. |
Excellent. We would appreciate the contribution. Right now, you can find pagination support already on the exercises page in the gym, and all that is required is to duplicate that feature on the workouts page. If you aren't sure which views are the two relevant ones to look at, let us know. Thanks! |
@s-edwards I am getting this error while setting up the docker container. How do I solve this? |
Hmmm ... haven't seen that error yet, no doubt because of the way docker caches the image stack as it builds a new image. To fix, edit the Gemfile and search for the "github:" clause (it appears on three gems). replace with "git:" and include a full URL instead of just the github user name/repo. For example, try replacing this: gem 'andand', github: 'raganwald/andand' With something like this instead: gem 'andand', git: 'https://github.com/raganwald/andand.git' Do the same for the other two gems that use "github:", and then you can include the fix as part of your pull request (or even use a second pull request to fix this error!). For more info, google "gemfile unauthenticated git protocol on port 9418 is no longer supported" and you'll find more info and examples. |
@s-edwards I got another error while trying to run the docker image. How do I solve this? |
Try executing "docker compose build" to see if that clears it. The error message is being produced because of the earlier bundle install failure message you received, I think--it looks like the docker image just needs to be rebuilt with the Gemfile fix you made. Let us know if that doesn't fix it. |
I think that this is due to the old docker compose run web bundle install // this will update the Gemfile.lock based on the changes you made to Gemfile
docker compose up |
I think I see the root of the problem in the Dockerfile, so I'm going to see if I can fix it quickly. |
OK, I was looking at the Dockerfile in a different branch. When I do a fresh pull of the staging branch (after merging your pull request), docker compose up builds and runs fine for me. Try using git status to see what files are changed locally. You may try checking out staging directly and see if that fixes the issue for you. I think the problem is that somewhere in trying to fix the other errors, your local Gemfile.lock in your repo is out of sync and is causing problems, but pulling a clean copy of Gemfile / Gemfile.lock from staging should work. |
@s-edwards Sorry for the delay, But I tried every possible way and it is still not working. It shows the same error as #208 (comment) this. How do I solve this? |
Does "git status" show any changes to Gemfile.lock (or Gemfile) compared to what is in the staging branch? If so, use "git checkout -- Gemfile.lock" to overwrite the local copy with what is in staging, then try "docker compose build web" to rebuild the docker image with the Gemfile.lock from staging. That is working on my end and launches correctly. If that does not work, please reply with the output from "git status" so we can see what might be different in your local environment. |
OK, so from the git status output, it is clear you have changes in your Gemfile.lock that are not in the repo. I believe this is the source of the problem. The steps you've tried so far have not resolved the problem because your current working (changed) copy of the file has already be staged using "git add", and git usually protects those pending changes ... but they're keeping your docker image broken. Try "git restore --staged --worktree Gemfile.lock" to unstage your "git add" of the file, and also refresh the local working copy from the repository contents. This should fix your Gemfile.lock by unstaging the pending changes, throwing away the bad contents, and restoring it from from the repository HEAD. Then try the "docker compose build web" and "docker compose up" again. The suggestions above were all aimed at fixing this file, but I didn't realize you had "git add"ed the file. Sorry! |
OK, the screen you're showing doesn't appear to be due to the earlier docker issues. The docker container output shows an error from the database container reading a connection. The connection is presumably from the web application. Notice the green line, which indicates the web application actually exited, which would be unexpected at this point. That's also why the second image shows your browser unable to connect--because the app quit. Please look in your log/development.log file to see if there are any messages or indications of what may have happened to cause the web app to quit. If you don't find anything there, check the other files in the log/ folder. For simplicity, you can easily delete everything within the log/ folder and re-run "docker compose up", and then you'll know the only messages you are looking at are from the most recent failed run. I'm not seeing this error myself using the docker image on my end from the staging branch--everything is working properly here. Also, your Dockerfile and Gemfile appear to be working as intended. So this issue looks like something else. Just to be safe, you might also want to check whether you have any firewall constraints preventing the web application from opening/using the intended ports for either the web app or the database, since that could potentially prevent things from communicating correctly and lead to an early (unexpected) exit. |
Hello. I'm new to OS and I'd like to learn a little more about this issue. This may seem like a silly question, but what are the files that will have the focus for this? I'd like to look them over, and see what language they are written in also. Thank you for any feedback. |
When viewing the list of workouts in the gym, pagination should be used, just like when viewing the list of exercises in the gym. Currently, the workout index page is unpaginated.
We should just port the pagination approach from the exercise index page over to the workout index page as well.
The text was updated successfully, but these errors were encountered: