문제

I am trying out TorqueBox and having issues with my deployment descriptor. I'm using 2.0-beta2 with jruby-1.6.5. When I deploy to using the torquebox deploy command, the application gets deployed within the application server; however, it is always at the root context (/) instead of the context I am specifying within my config. Here is my config/torquebox.rb:

TorqueBox.configure do |cfg|
    cfg.environment do
        RACK_ENV "qa"
    end
    cfg.web do |web|
        web.host "localhost"
        web.context "/my_application"
    end
    cfg.ruby do |ruby|
        ruby.version "1.9"
    end
end

I tried it with and without having the host defined as well, and nothing changed. Its interesting because I know that its reading my config as I see the following within the run log:

14:53:00,497 INFO [org.torquebox.core] (MSC service thread 1-2) evaling: "/Users/ejlevin1/Documents/Workspace/my_application/config/torquebox.rb"

However, I feel like the line within the log a few lines down is showing it isn't honoring my context:

14:53:01,499 INFO [org.torquebox.core.runtime] (Thread-95) Creating ruby runtime (ruby_version: RUBY1_9, compile_mode: JIT, app: my_application, context: web)

Does anyone know what I am doing wrong? I tried deploying 2 applications to see if the server only honored this in the case of multiple applications running; however, that just gave me an error that seemed to be because they were both mounting off of root (/).

도움이 되었습니까?

해결책

I think what's happening is your "external" descriptor is overriding your "internal" one. Your internal one is what you have above. But the 'torquebox deploy' command generates an external descriptor that tries to deploy your app at the root by default. Try running 'torquebox deploy /path/to/your/app --context-path=/my_application'

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top