0

I Have elastic search application up and running in ruby on rails. Actual its on in the root path of the sever. Is it possible to move it to a subdirectory? What is necessary req. for it? what procedure i need to follow

Richard Peck
  • 76,116
  • 9
  • 93
  • 147
Anish
  • 558
  • 3
  • 10
  • 33

1 Answers1

0

Although I've never done this specifically, I believe it's very simple to do:


Routes

Your Rails app's routes are all relative, meaning they don't depend on having "domain.com" as the root path:

#config/routes.rb
root to: "controller#action"

The beauty of Rails is that since all your requests are handled through the ActionDispatch::Routing middleware, you'd basically need to ensure the routes work in order to get the whole application working


Moving

This means that if you're able to deploy your application successfully into a directory, you should be able to get it running regardless of where it is

I would do this:

  1. New Git Repo in subdir
  2. Change database.yml if db server is different
  3. Redeploy app to new Git
  4. Test to see if it works (load on new directory)
Community
  • 1
  • 1
Richard Peck
  • 76,116
  • 9
  • 93
  • 147