Answer the question
In order to leave comments, you need to log in
[Ruby on Rails] Why doesn't my application work on localhost?
Hello.
Added StaticPages controller and view home.html.erb, about.html.erb, contacts.html.erb and help.html.erb to it.
When trying to open a page like localhost:3000/static_pages/home on the local server , it returns the error "We're sorry, but something went wrong.". I didn’t find anything in the logs except 500 Internal Server Error, but as far as I know this is a very common error, here is the log:
Started GET "/static_pages/home" for 127.0.0.1 at 2014-08-14 14:07:16 +0600
Processing by StaticPagesController#home as HTML
Rendered static_pages/home.html.erb within layouts/application (0.5ms)
Completed 500 Internal Server Error in 16ms
<div class="center hero-unit">
<h1>Welcome to the Sample App</h1>
<h2>
This is the home page for the
<a href="http://railstutorial.org/">Ruby on Rails Tutorial</a>
sample application.
</h2>
<%= link_to "Sign up now!", '#', class: "btn btn-large btn-primary" %>
</div>
<%= link_to image_tag("rails.png", alt: "Rails"), 'http://rubyonrails.org/' %>
Answer the question
In order to leave comments, you need to log in
write routes in /config/routes.rb
which action in the controller corresponds to your route?
guides.rubyonrails.org/routing.html#connecting-url...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question