Rails and a development domain - ruby-on-rails

I'm trying to use http://ls1.bigseapreview.com as a domain for a Rails project. The problem is it doesn't seem to be correctly mapping any routing apart from the home page.
I have added /about but you can see that you will just get a 404, but it works locally.
What do I have to do to fix this?

Can you add your routing file?
+I added /about and it looks like it's working

Are you sure that this is a Rails project? Your "about" link points to "/about.php".

Related

Rails App inside a Rails app's sub-folder

I have a rails app, but a client wants to have another rails app be hosted in a ssub-folder of the first rails app.
I can't find any help on how to do this or if it's possible, because if I go to:
http://example.com/second_app, the first app will try and route it despite another app being situated in the second_app folder.
I hope this makes sense, and someone will be able to help.
Sorry, two Rails apps with one inside the other is not possible.
If all you want is a special page for the client, you need a view, controller, and route:
$ rails g controller Pages second_page
And then change your route (config/routes.rb) from get 'pages/second_page’ to get '/second_page’.
After starting up your rails s, you can then go to localhost:3000/second_page and see your page.
If I’m completely misunderstanding what you’re trying to do, please describe your situation a bit more and I’d be happy to help.

Blogit is not routing in rails 4

Hi guys,
I have just installed blogit into my Rails 4 application. When I go to /blog I get routing error of every single route I have got. I get "undefined local variable or method". It is like that it won't load my routes at all.
Not sure if it make sense though. Please let me know what you want me to put here so you guys can have a look.
I have current_user defined in ApplicationController.
In the installation what I didn't understand is "declare which of your models acts as blogger in your app". That might be the issue.
Thanks in advance.
In case someone is looking for this.
Answer trail is in here. It is Explained fully
So just to sum it up, I added main_app to all of the links in the view and all are good.
Basically when you are in the /blog you will be in the engine, and you need to tell the app the correct path. Thanks to emaxon.

Rails demo app on local host not working

New to Rails. Everything solid through creation of demo_app, but rails server is yielding just the basic rails welcome page, not my demo application
You need to delete public/index.html and change root to: in config/routes.rb to point to your welcome page's controller action.
Well, then Rails works :)
In your console cd to the Folder where your rails app is and run
rake routes
Then try out one of the routes in your browser.
If there aren't any, you have to create routes. Follow some tutorial for this.

Simple redirect from public to views in ror

I am looking for a simple way to redirect the public/index.html to the app/views/public/index.html.erb the site is already deployed and I'm sick of it not being the first thing when you go to the domain.
You should have public/index.html deleted and use rails routes instead.

Rails Routes Question

Did the rules for Rails Routes changes from Rails 1.2.3 to Rails 2.2.3? I recently upgraded an application and instead of redirecting to the correct page, it now redirects to the main page (or Route page) for that matter.
The only thing that I can think of is that the routing rules changed in Rails 2.2.3.
Thanks
Yep there were a lot of changes as you can see here (look at the Action Pack Resources section) "This is where the bulk of the action for 2.0 has gone". If you're using the old semi-colon syntax then that could well be the problem. Do you want to post your route config and a quick description of what is not working?
Also, to diagnose routing problems I find running "rake routes" very useful (though set your terminal window to wide).
Chris

Resources