{"id":26086865,"url":"https://github.com/pspdfkit/pspdfkit-server-example-rails","last_synced_at":"2025-04-12T03:23:17.089Z","repository":{"id":41308829,"uuid":"67718990","full_name":"PSPDFKit/pspdfkit-server-example-rails","owner":"PSPDFKit","description":"Sample for PSPDFKit Server and Instant","archived":false,"fork":false,"pushed_at":"2025-03-19T05:38:49.000Z","size":151,"stargazers_count":10,"open_issues_count":0,"forks_count":3,"subscribers_count":30,"default_branch":"master","last_synced_at":"2025-03-19T06:29:44.709Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://pspdfkit.com/guides/ios/current/instant/getting-started/","language":"Ruby","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PSPDFKit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-09-08T16:07:17.000Z","updated_at":"2025-03-19T05:38:54.000Z","dependencies_parsed_at":"2023-01-30T03:30:58.362Z","dependency_job_id":"78c72d9a-9481-4502-817e-2a5c1d5b3569","html_url":"https://github.com/PSPDFKit/pspdfkit-server-example-rails","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PSPDFKit%2Fpspdfkit-server-example-rails","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PSPDFKit%2Fpspdfkit-server-example-rails/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PSPDFKit%2Fpspdfkit-server-example-rails/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PSPDFKit%2Fpspdfkit-server-example-rails/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PSPDFKit","download_url":"https://codeload.github.com/PSPDFKit/pspdfkit-server-example-rails/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248510798,"owners_count":21116277,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-09T07:18:37.945Z","updated_at":"2025-04-12T03:23:17.067Z","avatar_url":"https://github.com/PSPDFKit.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Nutrient Document Engine Example – Rails\n\nThis example shows how to integrate Nutrient Document Engine and\n[Nutrient Web SDK](https://www.nutrient.io/sdk/web/) into a Rails app.\n\n_Note: This example demonstrates the usage of Nutrient Document Engine\nin a Rails application and is not optimized for production deployments.\nFor information on how to set up Document Engine in production, please\nrefer to\n[our guides](https://www.nutrient.io/guides/document-engine/deployment/)\ninstead._\n\n## Prerequisites\n\nWe recommend you use Docker to get all components up and running\nquickly.\n\n- [Docker](https://www.docker.com/community-edition)\n\nYou can easily run the example in trial mode without need for a license\nor activation key. Just make sure to check out this repository locally.\nThe provided `docker-compose.yml` and `Dockerfile` will allow you to\nedit the example app on your host, and it will live-reload:\n\n```sh\n$ git clone https://github.com/PSPDFKit/pspdfkit-server-example-rails.git\n$ cd pspdfkit-server-example-rails\n$ docker compose up\n```\n\nThe example is now running on\n[http://localhost:3000](http://localhost:3000). You can access the\nNutrient Document Engine dashboard at\n[http://localhost:5000/dashboard](http://localhost:5000/dashboard) using\n`dashboard` username and `secret` as a password.\n\nUpload a PDF via the button in the top-left, then click on the cover\nimage to see Nutrient Web SDK in action.\n\n## Using a license\n\nIf you have a Nutrient Document Engine license you can use it as well by\ngoing through the following steps:\n\n1. Open the [`docker-compose.yml`](docker-compose.yml) file in an editor\n   of your choice and replace the `YOUR_LICENSE_KEY_GOES_HERE` placeholder\n   with your standalone license key.\n\n2. Start environment with your Nutrient Document Engine activation key:\n\n```sh\n$ ACTIVATION_KEY=YOUR_ACTIVATION_KEY_GOES_HERE docker compose up\n```\n\nIf you are using Windows make sure to set the environment variables\naccordingly. For this replace the line starting with\n`ACTIVATION_KEY=\"...` with:\n\n```shell\n$ SET \"ACTIVATION_KEY=YOUR_ACTIVATION_KEY_GOES_HERE\"\n$ docker compose up\n```\n\nMake sure to replace `YOUR_ACTIVATION_KEY_GOES_HERE` with your Nutrient\nDocument Engine activation key. You only have to provide the activation\nkey once, after that the server will remain activated until you reset\nit.\n\n### Resetting the server\n\nYou can reset the server by first tearing down its containers and\nvolumes and then recreating them.\n\n```sh\n$ docker compose down --volumes\n$ docker compose up\n```\n\nIf using an activation key, you'd need to set it again so as to recreate\nthe containers:\n\n```sh\n$ docker compose down --volumes\n$ ACTIVATION_KEY=YOUR_ACTIVATION_KEY_GOES_HERE docker compose up\n```\n\nIf you are using Windows make sure to set the environment variables\naccordingly. For this replace the line starting with\n`ACTIVATION_KEY=\"...` with:\n\n```shell\n$ SET \"ACTIVATION_KEY=YOUR_ACTIVATION_KEY_GOES_HERE\"\n$ docker compose up\n```\n\n## Running the example locally\n\nYou can also run the example app directly on your machine, outside of a\nDocker container.\n\n### Prerequisites\n\n- Ruby 3.4.1 or newer (The sample is a Rails 8.0 app)\n- [Nutrient Document Engine](https://www.nutrient.io/getting-started/document-engine/)\n  running on [http://localhost:4000](http://localhost:4000) with the\n  default configuration\n\n### Getting started\n\n```sh\n$ git clone https://github.com/PSPDFKit/pspdfkit-server-example-rails.git\n$ cd pspdfkit-server-example-rails\n$ bundle\n$ bin/rails db:migrate\n$ bin/rails server\n```\n\nThe example app is now running on \u003chttp://localhost:3000\u003e.\n\nLogin using any user name and upload a PDF, then click on the cover\nimage to see Nutrient Web SDK in action.\n\nYou can also selectively share PDFs with other users you have created.\n\nYou can quit the running containers with Ctrl-C.\n\nIf you want to test Nutrient Web SDK on different devices in your local\nnetwork, you need to edit the `DOCUMENT_ENGINE_EXTERNAL_URL` environment\nvariable in the `docker-compose.yml` and set it to an address that's\nreachable from your device.\n\n## Troubleshooting\n\nOccasionally running the `docker compose` scripts will result in errors\nbecause some containers are in a broken state. To resolve this, you can\nreset all containers and their attached volumes by running the following\ncommand:\n\n```sh\ndocker compose down --volumes\n```\n\nIf you have further troubles, you can always reach out to us via our\n[support platform](https://support.nutrient.io/hc/requests/new).\n\n## Support, issues and license questions\n\nNutrient offers support for customers with an active SDK license via\nhttps://support.nutrient.io/hc/requests/new\n\nAre you [evaluating our SDK](https://www.nutrient.io/sdk/try)? That's\ngreat, we're happy to help out! To make sure this is fast, please use a\nwork email and have someone from your company fill out our sales form:\nhttps://www.nutrient.io/contact-sales?=sdk\n\n## License\n\nThis software is licensed under a [modified BSD license](LICENSE).\n\n## Contributing\n\nPlease ensure\n[you signed our CLA](https://www.nutrient.io/guides/web/miscellaneous/contributing/)\nso we can accept your contributions.\n\nAny contribution must successfully pass `bin/ci` checks.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpspdfkit%2Fpspdfkit-server-example-rails","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpspdfkit%2Fpspdfkit-server-example-rails","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpspdfkit%2Fpspdfkit-server-example-rails/lists"}