Rails server shuts down when started

Hi,
I am on step 10 and I am trying to view the website in the browser but the server keeps shutting off. I have already bundle installed and that did not do anything. Any ideas on what I can do differently?

$ rails s -p 8080 -b 0.0.0.0                                                                                                                                
Warning: You're using Rubygems 2.0.14.1 with Spring. U                                                                                                      
pgrade to at least Rubygems 2.1.0 and run `gem pristin                                                                                                      
e --all` for better startup performance.                                                                                                                    
=> Booting WEBrick                                                                                                                                          
=> Rails 4.1.1 application starting in development on                                                                                                       
http://0.0.0.0:8080                                                                                                                                         
=> Run `rails server -h` for more startup options                                                                                                           
=> Notice: server is listening on all interfaces (0.0.                                                                                                      
0.0). Consider using 127.0.0.1 (--binding option)                                                                                                           
=> Ctrl-C to shutdown server                                                                                                                                
Exiting                                                                                                                                                     
/home/ccuser/.gem/ruby/2.0.0/gems/actionpack-4.1.1/lib                                                                                                      
/action_dispatch/routing/mapper.rb:230:in `default_con                                                                                                      
troller_and_action': controller name should not start                                                                                                       
with a slash (ArgumentError)                                                                                                                                
        from /home/ccuser/.gem/ruby/2.0.0/gems/actionp                                                                                                      
ack-4.1.1/lib/action_dispatch/routing/mapper.rb:117:in                                                                                                      
 `normalize_options!'                                                                                                                                       
        from /home/ccuser/.gem/ruby/2.0.0/gems/actionp                                                                                                      
ack-4.1.1/lib/action_dispatch/routing/mapper.rb:65:in                                                                                                       
`initialize'                                                                                                                                                
        from /home/ccuser/.gem/ruby/2.0.0/gems/actionp                                                                                                      
ack-4.1.1/lib/action_dispatch/routing/mapper.rb:1462:i                                                                                                      
n `new'                                             `

Hi @cameronism,

controller name should not start with a slash

I think that might be your problem. Did you accidentally name any of your controllers “/[something]”?

Hey thanks for your response @zystvan.

The code in my controller file was incorrect. I fixed it and everything is working now.

Thank you

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.