Skip to content
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

make Tabula work under a relative path #586

Merged
merged 1 commit into from
May 8, 2017

Conversation

jeremybmerrill
Copy link
Member

@jazzido and @theta682: Check out this branch and see if it works for you, in the situation you envision for running Tabula under a subpath.

ROOT_URI=tabula bundle exec rackup should serve a working version of Tabula under localhost:9292/tabula/.

I wasn't able to figure out how to set a context path, because my familiarity with Jetty, Tomcat, etc. is basically nothing. So that may not work, but it should be an easy fix at the top of config.ru

will close #110 and #547

@jeremybmerrill
Copy link
Member Author

@mtigas @jazzido can one of you guys take a look at this and make sure nothing is obviously broken?

@jazzido
Copy link
Contributor

jazzido commented May 8, 2017

LGTM

@jeremybmerrill jeremybmerrill merged commit d3bdb49 into master May 8, 2017
@jeremybmerrill jeremybmerrill deleted the feature/relative_path branch May 8, 2017 02:02
@jeremybmerrill
Copy link
Member Author

tyvm

jeremybmerrill added a commit that referenced this pull request Jun 26, 2018
make Tabula work under a relative path
@jimzucker
Copy link

jimzucker commented Nov 1, 2018

@jeremybmerrill I have been trying to make ROOT_URI, I set an env variable and passed -D ROOT_URI=xx to my docker container but not luck, can you give me a hint do we have modify a file? (I am assuming I don't but I haven't figured it out)

@jeremybmerrill
Copy link
Member Author

@jimzucker Can you say more about what goes wrong?

@jimzucker
Copy link

@jeremybmerrill we are trying to run this container with a different root like /pdf instead of / but we have not found how to set the root in the currently available docker container on docker hub. This is so we can make the container part of a larger website and proxy a route. as we use / for other things we need to add a different root.

@jeremybmerrill
Copy link
Member Author

Right, so, what happens when you try? Does Tabula not respond at all under the chosen root? Or does it respond, but not work properly once you're interacting with Tabula?

@jeremybmerrill
Copy link
Member Author

FYI, this may've been a typo in your above bug, but the right way to set an env var in Docker is like this docker run -e ROOT_URI=tabula -p 9292:9292 tabula (with -e not -D)

@AbhishekTrivedi2017
Copy link

AbhishekTrivedi2017 commented Nov 26, 2018

FYI , I tried with docker run -e ROOT_URI=tabula -p 9292:9292 tabula . It get started on desired url but fails while uploading pdf .
I am getting this error on browser's console -

jquery.min.js:2 POST http://0.0.0.0:9292/upload.json 404 (Not Found)

@jeremybmerrill
Copy link
Member Author

jeremybmerrill commented Nov 26, 2018

@AbhishekTrivedi2017 yes, I think I fixed that yesterday: 5b9b4b8

try it again?

@AbhishekTrivedi2017
Copy link

AbhishekTrivedi2017 commented Nov 27, 2018

@jeremybmerrill Thanks for attention and help ! tried after the last commit . Files are getting uploaded but it redirects at bad url . The redirect URL is again skipping the sub context path . Again we can not remove files from the queue .

screen shot 2018-11-27 at 3 42 13 pm

Thanks

@jeremybmerrill
Copy link
Member Author

@AbhishekTrivedi2017 can you try it again? I think I fixed that with 87cbba4, which I pushed just now.

@AbhishekTrivedi2017
Copy link

Thanks . It is working fine as expected @jeremybmerrill .....

@jeremybmerrill
Copy link
Member Author

@AbhishekTrivedi2017 Great, thanks for verifying.

@PrajjvalGupta
Copy link

@jeremybmerrill
image (3)
While creating the docker image locally, i am getting the following error:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make URLs relative so Tabula works if not running on the root path
5 participants