Closed damuz91 closed 1 year ago
First of all thanks for providing a completely reproducible issue 🙏🏻
The 404 response from path "index.html"
issue is weird because isn't that just the root URL? Well apparently not because if you start the Rails server and visit /index.html
you get a 404. The offending link being crawled comes from:
I get it, there isn't an /index
route so Rails doesn't recognise an HTML version of a route that it doesn't know about. But it's still a surprise.
So if you fix that link you can build a static version of the site right? Not yet! Next I encountered a separate issue that's fixed in https://github.com/benpickles/parklife/pull/94.
But now if you update your Gemfile reference to gem 'parklife', github: 'benpickles/parklife'
you should be able to build with Parklife.
FYI you don't need to add the get products_path
route in your Parkfile
because it gets crawled via the root - though explicitly specifying it doesn't do any harm.
Awesome, it did work! Thanks for replying back. Now i see that these static files are meant to be opened in a web server since they convert all routes to absolute paths instead of relative, so opening in the web browser locally won't allow it to be navigatable. Still pretty impressive.
I noticed that even tho the build script has the assets precompile command it is not executing it, so I have manually executed the assets:precompile and moved the assets folder to the build folder, then the static page started showing assets. I see your note that Parklife does not know anything about the assets.
Thanks again!
Good day! Today I am playing around with Parklife. I just picked up a sample rails app i got published on github: https://github.com/damuz91/mi-bodega-rails Then i have added
parklife
to the Gemfile and tried to follow the step by step from the Readme. MyParklife
file looks like this:And i have included in my
development.rb
file:But when running
parklife build
I get the following error:My
routes.rb
file:My app contains no authentication at all. When accessing / it renders my home#index page.
Can you please tell my why is it showing this error or what I am not understanding from the build process? Thanks and nice gem!