Hi Txinto;

Here are a few odds and sods that might point in the right direction. 

If you're using Passenger, you might have to do this in the virtual host 
configuration file for Apache:

  PassengerRuby /opt/rubies/ruby-1.9.3-p551/bin/ruby

 

  PassengerFriendlyErrorPages on

 

  RailsEnv staging

 

  # RAILS_RELATIVE_URL_ROOT is critical to getting Rails and Hobo to 
generate the proper

  # URLs for links as well as internal routing for Hobo's Controller

  # and seems to be required along with the internal configuration

  # of

  #   config.action_controller.relative_url_root = '/app/lts-test'

  # and

  #   config.assets.prefix = "/app/lts-test"

  # within production.rb

 

  # 
http://guides.rubyonrails.org/configuring.html#deploy-to-a-subdirectory-relative-url-root

  SetEnv RAILS_RELATIVE_URL_ROOT "/app/lts-test"


For this example, I have an app named "lts"  hosted at at 
https://www.server.com/app/lts-test with 
the path "/app/lts-test" on server.com being proxyied to a port on the 
application hosting server.  The proxying is also passing the 
"/app/lts-test" path through to our app so, Rails has to understand that 
the path "/app/lts-test" actually 
represents the app.

So, you might also have to tinker with config.ru in your application and 
include this:

    map '/app/lts-test' do
      run LTS::Application
    end

Tim












On Thursday, August 25, 2016 at 7:13:21 AM UTC-4, txinto wrote:
>
> Hello, I think it can be a bug of Hobo.  I've created a new hobo 2.2.6 app 
> from scratch, and has the same behaviour.  It is not possible to deploy it 
> in an apache directory.
>
> I've uploaded my vanilla code here:
>
> https://github.com/txinto/testhobo
>
> Best regards.
>
> Tx.
>
> On Tuesday, August 23, 2016 at 12:54:57 PM UTC+1, Txinto Vaz wrote:
>>
>> Just more info: I am deploying using Apache and Passenger.  The app works 
>> fine with a port or subdomain, but for this deployment I can not use 
>> subdomains.
>>
>> Best regards.
>>
>> Tx.
>>
>> El martes, 23 de agosto de 2016, 11:57:11 (UTC+1), Txinto Vaz escribió:
>>>
>>> Hello!
>>>
>>> I've some web apps working with Hobo.  My apache configuration loads all 
>>> of them in different sub-URIs.  One of them (the newest) has a problem and 
>>> misses the sub-URI part of the route when creating the links, so "Not 
>>> found" appears after the first link the user clicks.
>>>
>>> These are the different apps I am deploying:
>>>
>>>
>>>    - A: Based on gem 'hobo', '= 2.2.6' --> FAILS
>>>    - B: Based on gem 'hobo', '= 2.2.4' --> WORKS.
>>>    - C: Based gem "hobo", "= 1.0.3" --> WORKS.
>>>    
>>> The symptom is: if I open my A app using the path http://myserver/a, it 
>>> perfectly opens.  Then I click on Home and works fine, but then I click on 
>>> "Login" and it builds the wrong path http://myserver/login instead of 
>>> http://myserver/*a/*login
>>>
>>> I've tested the correct configuration of Apache by exchanging the paths 
>>> of A and B.  B app was correctly working on A directory, but A app also 
>>> fails on B directory.
>>>
>>> I've also checked that config/routes.rb and 
>>> config/environments/production.rb have similar contents.
>>>
>>> Any idea of the problem or can you help me to find the code that could 
>>> have impact on this?
>>>
>>> Thanks in advance.
>>>
>>> Tx. 
>>>
>>> PD: If needed, I am using ruby ruby 2.1.5p273 (2014-11-13) 
>>> [x86_64-linux-gnu] on Debian.
>>> The A app (the faulty one) is https://github.com/gatATAC/eo, the B one 
>>> (working one) is https://github.com/gatATAC/uCANca, and the C (the old 
>>> and working one) is 
>>> https://github.com/gatATAC/poris/tree/master/Editors/Web/PorisWebEditor
>>>
>>>

-- 
You received this message because you are subscribed to the Google Groups "Hobo 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/hobousers.
For more options, visit https://groups.google.com/d/optout.

Reply via email to