Hello,
I’m currently learning RoR but I’m facing yp to a displaying issue.
I created a RoR project via the command rails project in the OS Linux
Ubuntu
Then, I also created a controller:
sudo script/generate controller about
exists app/controllers/
exists app/helpers/
create app/views/about
exists test/functional/
create app/controllers/about_controller.rb
create test/functional/about_controller_test.rb
create app/helpers/about_helper.rb
When firing up firefox with this url
I get 500 error :
script/server
=> Booting WEBrick…
=> Rails application started on http://0.0.0.0:3000
=> Ctrl-C to shutdown server; call with --help for options
[2007-08-27 00:06:35] INFO WEBrick 1.3.1
[2007-08-27 00:06:35] INFO ruby 1.8.5 (2006-08-25) [i686-linux]
[2007-08-27 00:06:35] INFO WEBrick::HTTPServer#start: pid=6117
port=3000
127.0.0.1 - - [27/Aug/2007:00:06:39 CEST] “GET /about HTTP/1.1” 500
941
- → /about
127.0.0.1 - - [27/Aug/2007:00:06:41 CEST] “GET /about HTTP/1.1” 500
941 - → /about
127.0.0.1 - - [27/Aug/2007:00:06:49 CEST] “GET /about HTTP/1.1” 500
941 - → /about
127.0.0.1 - - [27/Aug/2007:00:15:05 CEST] “GET /about HTTP/1.1” 500
941 - → /about
Could this come from the route.rb file knowing that I moved the
index.html file
more routes.rb
ActionController::Routing::Routes.draw do |map|
The priority is based upon order of creation: first created →
highest prior
ity.
Sample of regular route:
map.connect ‘products/:id’, :controller => ‘catalog’, :action =>
‘view’
Keep in mind you can assign values other than :controller
and :action
Sample of named route:
map.purchase ‘products/:id/purchase’, :controller =>
‘catalog’, :action => ’
purchase’
This route can be invoked with purchase_url(:id => product.id)
You can have the root of your site routed by hooking up ‘’
– just remember to delete public/index.html.
map.connect ‘’, :controller => “welcome”
Allow downloading Web Service WSDL as a file with an extension
instead of a file named ‘wsdl’
map.connect ‘:controller/service.wsdl’, :action => ‘wsdl’
Install the default route as the lowest priority.
map.connect ‘:controller/:action/:id.:format’
map.connect ‘:controller/:action/:id’
end
Any help will be appreciated.
arte_fact