Files not found when running github page locally

I cloned this github page pippim and I created a Gemifle with this content gem "github-pages", group: :jekyll_plugins.
Inspirated by http s: / /talk.jekyllrb.com/t/how-to-get-a-cloned-github-pages-repo-to-run-locally/6240.

I also tried from ht tps: //docs.github.com/en/pages/setting-up-a-github-pages-site-with-jekyll/creating-a-github-pages-site-with-jekyll#creating-your-site gem "github-pages", "~> 227", group: :jekyll_plugins .

There is also a guide but it doesn’t explain to how make a Gemfile: htt ps:/ /docs.github.com/en/pages/setting-up-a-github-pages-site-with-jekyll/testing-your-github-pages-site-locally-with-jekyll#building-your-site-locally.

I can run the site locally but the three stock alarms cannot be loaded: “Sound filename: Alarm_01.mp3 doesn’t exist. Check settings.” on htt ps:/ /www.pippim.com/programs/tim-ta.html.
I selected instead a custom one that I put in the same folder and it works.
The folder is assets/sound/.

Why the alarms can’t be found?

Another method to run this locally is to add the jekyll-cayman-theme that was missing:

  1. Make a new empty site jekyll new <site>
  2. Edit the Gemfile to use the missing theme: replace gem "minima", "~> 2.5" with gem "jekyll-cayman-theme".
  3. Install the theme: bundle install
  4. Create a Gemfile in the (pippim) repo it needs only the theme line gem "jekyll-cayman-theme".
  5. Run the site bundle exec jekyll serve

Same as above.

I’m sorry I don’t speak English, and I don’t understand so, I want to help, but I’m affairs that. I will going to register with some English class to learn before get back and answer all the question that I can.

I took a look at this repo and it does not contain a readme, nor does it seem to provide installation instructions. I know you are asking a lot of questions here for help and perhaps others can do so, but I think this particular website you are trying to clone requires specific configurations you will need to get from the developer.

Here is the URL to contact that developer:
https://www.pippim.com/programs.html

When you post in the future, please post full URLs. I am not sure why you are typing ht tps: //url.com

type it like this: https://url.com

Also, you can use markdown to make it easier to read as well. All of this makes it easier for all of us to help you.

I asked the dev of the site, he is not using any particular option.

As a new user I cannot post more than 2 links, that’s why I typed them like that.

1. Clone the repo.
2. Create a Gemfile with this line: `gem "github-pages", group: :jekyll_plugins`.
3. Run `bundle install`.
4. Run your Jekyll site locally `bundle exec jekyll serve`.

Is that how you do it for local pages?

I just tried to use the tim-ta program (https://www.pippim.com/programs/tim-ta.html), so I don’t know if other things aren’t working.

I couldn’t load the alarms but besides that it was fine.

I can use a custom one, I put it in the same folder and it works.
The same folder of the stock alarms that it can’t load.

that sounds like it should work. Did you check the browser dev tools console to see if there are errors? (right click any where on the page >> Inspect > console ).

My guess is you have some sort of JS or 404 error.

I have no experience with that actual site.

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://localhost:4000/assets/sound/Alarm_01.mp3. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing). Status code: 200.

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://localhost:4000/assets/sound/Alarm_02.mp3. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing). Status code: 200.

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://localhost:4000/assets/sound/Alarm_03.mp3. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing). Status code: 200.

Uncaught (in promise) TypeError: NetworkError when attempting to fetch resource. 3

ttaProject.use_popup_window: true fRunWindowAsPopup: true [tim-ta.js:1472:13](http://127.0.0.1:4000/assets/js/tim-ta.js)

Opening multiple popups was blocked due to lack of user activation. [tim-ta.js:4391:21](http://127.0.0.1:4000/assets/js/tim-ta.js)

Last-save setX: 499 setY: 480 setW: 600 setH: 401 [tim-ta.js:878:13](http://127.0.0.1:4000/assets/js/tim-ta.js)

FIRST sleepAndReportCoordinates() newX undefined newY: undefined newW: 841 newH: 560 lastH: 560 [tim-ta.js:890:21](http://127.0.0.1:4000/assets/js/tim-ta.js)

LAST sleepAndReportCoordinates() newX 1335 newY: 35 newW: 1209 newH: 1349 lastH: 560 Loop for 1s based i: 11 milliseconds: 220 [tim-ta.js:904:17](http://127.0.0.1:4000/assets/js/tim-ta.js)

thats a little outside the scope of jekyll - what url are you trying to view the site at? both 127.0.0.1 and localhost would normally work but it looks like there is a cors issue with one of them? if you are trying to look at it on 127.0.0.1 try doing it on localhost instead.

http://127.0.0.1 is local host.
What do you mean with " try doing it on localhost instead"?

When I use bundle exec jekyll serve it creates automatically a link to the site at http://127.0.0.1:4000.

lol, I think this is what his try to tell is http://127.0.0.1 and http://localhost

sure but try going to https://localhost and see if you get the same error. The site should still come up as it is the same thing under the hood.

CORS can prevent one domain from accessing another domain and in your case I think 127 is different from localhost and that may be why you are getting the cors error.

1 Like

Right you are.

I replaced the first alarm, that it is the default, with my custom alarm.

I see GitHub Metadata: No GitHub API authentication could be found. Some fields may be missing or have incorrect data. when I launch it.

I restarted it and somehow it is loading the default alarm, even If I replaced it in assets/sound.

maybe ask on the repo for that project? I have no idea what it is or how it works.

Maybe you are supposed to set an api key in the config file?
You might also try pushing it up to GH and see if it works there.

I asked the repo’s owner.
No special config is used.

That warning doesn’t seem to concern that.

I replaced the file that is played but somehow the older one is used.

source "https://rubygems.org"
gem "github-pages", group: :jekyll_plugins

The Gemfile should also have the source line, because on another machine I needed it.