jeudi 25 janvier 2018

Ruby on rails issue regarding routes with root url (ror 3.2)

I asked something similar here but it does not really help me with my problem. I setup a new server and I use code from my old server. There, everything worked like charme. But now I have the following issues:

I want project.test.com to be the first page (index page of projects).

Rake routes

root                    /                     projects#index
projectorganizer GET    /website(.:format)    projects#index

But always when I try project.test.com I get a list in the browser of name/public which looks like this list in the browser. When I do project.test.com/projectorganizer it works and there is the index page.

I didn't change the routes. Here is a piece of the routes.rb

Name::Application.routes.draw do
  root to: 'projects#index'
  resources :participants
  resources :persons
  resources :projects do
     get :magic
  etc.

With the upper routes.rb the old system worked fine. But now it doesn't. Has anyone an idea why?

The suggestion in the other thread will lead to an immense work of changes in the code I guess because in some code there is root_url etc. which doesn't seem to work now as well.

Thank you in advance.

Aucun commentaire:

Enregistrer un commentaire