Rails server won't run - uninitialized constant use (NameError) - ruby-on-rails

I ran a bundle install and since have not been able to run rails s successfully within terminal. I am new to rails and have tried to find help on this but nobody can explain it to me in the 101 way. What is going wrong - it looks like this is a NameError?
=> Call with -d to detach
=> Ctrl-C to shutdown server
Exiting
/usr/local/rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.8/lib/active_support/inflector/methods.rb:230:in `block in constantize': uninitialized constant Use (NameError)
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.8/lib/active_support/inflector/methods.rb:229:in `each'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.8/lib/active_support/inflector/methods.rb:229:in `constantize'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/devise-2.2.3/lib/devise.rb:267:in `get'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/devise-2.2.3/lib/devise/mapping.rb:77:in `to'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/devise-2.2.3/lib/devise/mapping.rb:72:in `modules'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/devise-2.2.3/lib/devise/mapping.rb:89:in `routes'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/devise-2.2.3/lib/devise/mapping.rb:156:in `default_used_route'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/devise-2.2.3/lib/devise/mapping.rb:66:in `initialize'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/devise-2.2.3/lib/devise.rb:301:in `new'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/devise-2.2.3/lib/devise.rb:301:in `add_mapping'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/devise-2.2.3/lib/devise/rails/routes.rb:208:in `block in devise_for'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/devise-2.2.3/lib/devise/rails/routes.rb:207:in `each'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/devise-2.2.3/lib/devise/rails/routes.rb:207:in `devise_for'
from /Users/cfictum/Documents/rails_projects/omrails/config/routes.rb:3:in `block in <top (required)>'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:282:in `instance_exec'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:282:in `eval_block'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:260:in `draw'
from /Users/cfictum/Documents/rails_projects/omrails/config/routes.rb:1:in `<top (required)>'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/application/routes_reloader.rb:40:in `block in load_paths'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/application/routes_reloader.rb:40:in `each'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/application/routes_reloader.rb:40:in `load_paths'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/application/routes_reloader.rb:16:in `reload!'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/application/routes_reloader.rb:26:in `block in updater'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.8/lib/active_support/file_update_checker.rb:78:in `call'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.8/lib/active_support/file_update_checker.rb:78:in `execute'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/application/routes_reloader.rb:27:in `updater'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/application/routes_reloader.rb:7:in `execute_if_updated'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/application/finisher.rb:66:in `block in <module:Finisher>'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/initializable.rb:30:in `instance_exec'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/initializable.rb:30:in `run'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/initializable.rb:55:in `block in run_initializers'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/initializable.rb:54:in `each'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/initializable.rb:54:in `run_initializers'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/application.rb:136:in `initialize!'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /Users/cfictum/Documents/rails_projects/omrails/config/environment.rb:5:in `<top (required)>'
from /Users/cfictum/Documents/rails_projects/omrails/config.ru:4:in `block in <main>'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.1/lib/rack/builder.rb:51:in `instance_eval'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.1/lib/rack/builder.rb:51:in `initialize'
from /Users/cfictum/Documents/rails_projects/omrails/config.ru:1:in `new'
from /Users/cfictum/Documents/rails_projects/omrails/config.ru:1:in `<main>'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.1/lib/rack/builder.rb:40:in `eval'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.1/lib/rack/builder.rb:40:in `parse_file'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.1/lib/rack/server.rb:200:in `app'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/commands/server.rb:46:in `app'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.1/lib/rack/server.rb:301:in `wrapped_app'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.1/lib/rack/server.rb:252:in `start'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/commands/server.rb:70:in `start'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/commands.rb:55:in `block in <top (required)>'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/commands.rb:50:in `tap'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/commands.rb:50:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'

I think that you have typed Use instead of use, perhaps in config/routes.rb
Case is important, if it starts with a capital letter then it is a constant, rather than a function.

Related

Rails Server Won't Run With New Application

I haven't had a problem with running my local host. Here is the error I get.
=> Booting WEBrick
=> Rails 4.0.2 application starting in development on http ://0.0.0.0:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
Exiting
/Users/dilloncarter/.rvm/gems/ruby-2.0.0-p353/gems/actionpack-4.0.2/lib/action_dispatch/routing/mapper.rb:233:in `default_controller_and_action': missing :action (ArgumentError)
from /Users/dilloncarter/.rvm/gems/ruby-2.0.0-p353/gems/actionpack-4.0.2/lib/action_dispatch/routing/mapper.rb:116:in `normalize_options!'
from /Users/dilloncarter/.rvm/gems/ruby-2.0.0-p353/gems/actionpack-4.0.2/lib/action_dispatch/routing/mapper.rb:64:in `initialize'
from /Users/dilloncarter/.rvm/gems/ruby-2.0.0-p353/gems/actionpack-4.0.2/lib/action_dispatch/routing/mapper.rb:1443:in `new'
from /Users/dilloncarter/.rvm/gems/ruby-2.0.0-p353/gems/actionpack-4.0.2/lib/action_dispatch/routing/mapper.rb:1443:in `add_route'
from /Users/dilloncarter/.rvm/gems/ruby-2.0.0-p353/gems/actionpack-4.0.2/lib/action_dispatch/routing/mapper.rb:1422:in `decomposed_match'
from /Users/dilloncarter/.rvm/gems/ruby-2.0.0-p353/gems/actionpack-4.0.2/lib/action_dispatch/routing/mapper.rb:1403:in `block in match'
from /Users/dilloncarter/.rvm/gems/ruby-2.0.0-p353/gems/actionpack-4.0.2/lib/action_dispatch/routing/mapper.rb:1394:in `each'
from /Users/dilloncarter/.rvm/gems/ruby-2.0.0-p353/gems/actionpack-4.0.2/lib/action_dispatch/routing/mapper.rb:1394:in `match'
from /Users/dilloncarter/.rvm/gems/ruby-2.0.0-p353/gems/actionpack-4.0.2/lib/action_dispatch/routing/mapper.rb:330:in `root'
from /Users/dilloncarter/.rvm/gems/ruby-2.0.0-p353/gems/actionpack-4.0.2/lib/action_dispatch/routing/mapper.rb:1464:in `root'
from /Users/dilloncarter/Desktop/TheOrginizationWhitepapers/config/routes.rb:3:in `block in <top (required)>'
from /Users/dilloncarter/.rvm/gems/ruby-2.0.0-p353/gems/actionpack-4.0.2/lib/action_dispatch/routing/route_set.rb:341:in `instance_exec'
from /Users/dilloncarter/.rvm/gems/ruby-2.0.0-p353/gems/actionpack-4.0.2/lib/action_dispatch/routing/route_set.rb:341:in `eval_block'
from /Users/dilloncarter/.rvm/gems/ruby-2.0.0-p353/gems/actionpack-4.0.2/lib/action_dispatch/routing/route_set.rb:319:in `draw'
from /Users/dilloncarter/Desktop/TheOrginizationWhitepapers/config/routes.rb:1:in `<top (required)>'
from /Users/dilloncarter/.rvm/gems/ruby-2.0.0-p353/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:223:in `load'
from /Users/dilloncarter/.rvm/gems/ruby-2.0.0-p353/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:223:in `block in load'
from /Users/dilloncarter/.rvm/gems/ruby-2.0.0-p353/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:214:in `load_dependency'
from /Users/dilloncarter/.rvm/gems/ruby-2.0.0-p353/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:223:in `load'
from /Users/dilloncarter/.rvm/gems/ruby-2.0.0-p353/gems/railties-4.0.2/lib/rails/application/routes_reloader.rb:40:in `block in load_paths'
from /Users/dilloncarter/.rvm/gems/ruby-2.0.0-p353/gems/railties-4.0.2/lib/rails/application/routes_reloader.rb:40:in `each'
from /Users/dilloncarter/.rvm/gems/ruby-2.0.0-p353/gems/railties-4.0.2/lib/rails/application/routes_reloader.rb:40:in `load_paths'
from /Users/dilloncarter/.rvm/gems/ruby-2.0.0-p353/gems/railties-4.0.2/lib/rails/application/routes_reloader.rb:16:in `reload!'
from /Users/dilloncarter/.rvm/gems/ruby-2.0.0-p353/gems/railties-4.0.2/lib/rails/application/routes_reloader.rb:26:in `block in updater'
from /Users/dilloncarter/.rvm/gems/ruby-2.0.0-p353/gems/activesupport-4.0.2/lib/active_support/file_update_checker.rb:75:in `call'
from /Users/dilloncarter/.rvm/gems/ruby-2.0.0-p353/gems/activesupport-4.0.2/lib/active_support/file_update_checker.rb:75:in `execute'
from /Users/dilloncarter/.rvm/gems/ruby-2.0.0-p353/gems/railties-4.0.2/lib/rails/application/routes_reloader.rb:27:in `updater'
from /Users/dilloncarter/.rvm/gems/ruby-2.0.0-p353/gems/railties-4.0.2/lib/rails/application/routes_reloader.rb:6:in `execute_if_updated'
from /Users/dilloncarter/.rvm/gems/ruby-2.0.0-p353/gems/railties-4.0.2/lib/rails/application/finisher.rb:69:in `block in <module:Finisher>'
from /Users/dilloncarter/.rvm/gems/ruby-2.0.0-p353/gems/railties-4.0.2/lib/rails/initializable.rb:30:in `instance_exec'
from /Users/dilloncarter/.rvm/gems/ruby-2.0.0-p353/gems/railties-4.0.2/lib/rails/initializable.rb:30:in `run'
from /Users/dilloncarter/.rvm/gems/ruby-2.0.0-p353/gems/railties-4.0.2/lib/rails/initializable.rb:55:in `block in run_initializers'
from /Users/dilloncarter/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/tsort.rb:150:in `block in tsort_each'
from /Users/dilloncarter/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/tsort.rb:183:in `block (2 levels) in each_strongly_connected_component'
from /Users/dilloncarter/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/tsort.rb:219:in `each_strongly_connected_component_from'
from /Users/dilloncarter/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/tsort.rb:182:in `block in each_strongly_connected_component'
from /Users/dilloncarter/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/tsort.rb:180:in `each'
from /Users/dilloncarter/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/tsort.rb:180:in `each_strongly_connected_component'
from /Users/dilloncarter/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/tsort.rb:148:in `tsort_each'
from /Users/dilloncarter/.rvm/gems/ruby-2.0.0-p353/gems/railties-4.0.2/lib/rails/initializable.rb:54:in `run_initializers'
from /Users/dilloncarter/.rvm/gems/ruby-2.0.0-p353/gems/railties-4.0.2/lib/rails/application.rb:215:in `initialize!'
from /Users/dilloncarter/.rvm/gems/ruby-2.0.0-p353/gems/railties-4.0.2/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /Users/dilloncarter/Desktop/TheOrginizationWhitepapers/config/environment.rb:5:in `<top (required)>'
from /Users/dilloncarter/Desktop/TheOrginizationWhitepapers/config.ru:3:in `require'
from /Users/dilloncarter/Desktop/TheOrginizationWhitepapers/config.ru:3:in `block in <main>'
from /Users/dilloncarter/.rvm/gems/ruby-2.0.0-p353/gems/rack-1.5.2/lib/rack/builder.rb:55:in `instance_eval'
from /Users/dilloncarter/.rvm/gems/ruby-2.0.0-p353/gems/rack-1.5.2/lib/rack/builder.rb:55:in `initialize'
from /Users/dilloncarter/Desktop/TheOrginizationWhitepapers/config.ru:in `new'
from /Users/dilloncarter/Desktop/TheOrginizationWhitepapers/config.ru:in `<main>'
from /Users/dilloncarter/.rvm/gems/ruby-2.0.0-p353/gems/rack-1.5.2/lib/rack/builder.rb:49:in `eval'
from /Users/dilloncarter/.rvm/gems/ruby-2.0.0-p353/gems/rack-1.5.2/lib/rack/builder.rb:49:in `new_from_string'
from /Users/dilloncarter/.rvm/gems/ruby-2.0.0-p353/gems/rack-1.5.2/lib/rack/builder.rb:40:in `parse_file'
from /Users/dilloncarter/.rvm/gems/ruby-2.0.0-p353/gems/rack-1.5.2/lib/rack/server.rb:277:in `build_app_and_options_from_config'
from /Users/dilloncarter/.rvm/gems/ruby-2.0.0-p353/gems/rack-1.5.2/lib/rack/server.rb:199:in `app'
from /Users/dilloncarter/.rvm/gems/ruby-2.0.0-p353/gems/railties-4.0.2/lib/rails/commands/server.rb:48:in `app'
from /Users/dilloncarter/.rvm/gems/ruby-2.0.0-p353/gems/rack-1.5.2/lib/rack/server.rb:314:in `wrapped_app'
from /Users/dilloncarter/.rvm/gems/ruby-2.0.0-p353/gems/railties-4.0.2/lib/rails/commands/server.rb:75:in `start'
from /Users/dilloncarter/.rvm/gems/ruby-2.0.0-p353/gems/railties-4.0.2/lib/rails/commands.rb:76:in `block in <top (required)>'
from /Users/dilloncarter/.rvm/gems/ruby-2.0.0-p353/gems/railties-4.0.2/lib/rails/commands.rb:71:in `tap'
from /Users/dilloncarter/.rvm/gems/ruby-2.0.0-p353/gems/railties-4.0.2/lib/rails/commands.rb:71:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
Your routes.rb file has a route that is missing an action, in line 3.
/Users/dilloncarter/Desktop/TheOrginizationWhitepapers/config/routes.rb:3

ActiveAdmin and Rails 4 creating a model resource broke my project

I was following the instructions at http://www.activeadmin.info/docs/0-installation.html#gemfile under the heading Register your models with Active Admin. Before adding the resource of Post I was able to start my server just fine. Once I added the resource of Post, it would no longer start. It was giving me an error about the I18n.config.enforce_available_locales needing to be set to false to prevent the error message. I found another Stack Overflow post which said to set this to false in the application.rb file. After doing this the message no longer shows in my Terminal interface, but the servers don't start.
Now I am getting the following output in Terminal when I run $ rails server
/Applications/MAMP/htdocs/ruby-review/app/admin/post.rb:1:in `<top (required)>': uninitialized constant Post (NameError)
from /Library/Ruby/Gems/2.0.0/bundler/gems/active_admin-9ca081f47ab4/lib/active_admin/application.rb:179:in `load'
from /Library/Ruby/Gems/2.0.0/bundler/gems/active_admin-9ca081f47ab4/lib/active_admin/application.rb:171:in `block in load!'
from /Library/Ruby/Gems/2.0.0/bundler/gems/active_admin-9ca081f47ab4/lib/active_admin/application.rb:171:in `each'
from /Library/Ruby/Gems/2.0.0/bundler/gems/active_admin-9ca081f47ab4/lib/active_admin/application.rb:171:in `load!'
from /Library/Ruby/Gems/2.0.0/bundler/gems/active_admin-9ca081f47ab4/lib/active_admin/application.rb:195:in `routes'
from /Library/Ruby/Gems/2.0.0/bundler/gems/active_admin-9ca081f47ab4/lib/active_admin.rb:80:in `routes'
from /Applications/MAMP/htdocs/ruby-review/config/routes.rb:3:in `block in <top (required)>'
from /Library/Ruby/Gems/2.0.0/gems/actionpack-4.0.3/lib/action_dispatch/routing/route_set.rb:341:in `instance_exec'
from /Library/Ruby/Gems/2.0.0/gems/actionpack-4.0.3/lib/action_dispatch/routing/route_set.rb:341:in `eval_block'
from /Library/Ruby/Gems/2.0.0/gems/actionpack-4.0.3/lib/action_dispatch/routing/route_set.rb:319:in `draw'
from /Applications/MAMP/htdocs/ruby-review/config/routes.rb:1:in `<top (required)>'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.0.3/lib/rails/application/routes_reloader.rb:40:in `block in load_paths'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.0.3/lib/rails/application/routes_reloader.rb:40:in `each'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.0.3/lib/rails/application/routes_reloader.rb:40:in `load_paths'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.0.3/lib/rails/application/routes_reloader.rb:16:in `reload!'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.0.3/lib/rails/application/routes_reloader.rb:26:in `block in updater'
from /Library/Ruby/Gems/2.0.0/gems/activesupport-4.0.3/lib/active_support/file_update_checker.rb:75:in `call'
from /Library/Ruby/Gems/2.0.0/gems/activesupport-4.0.3/lib/active_support/file_update_checker.rb:75:in `execute'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.0.3/lib/rails/application/routes_reloader.rb:27:in `updater'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.0.3/lib/rails/application/routes_reloader.rb:6:in `execute_if_updated'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.0.3/lib/rails/application/finisher.rb:69:in `block in <module:Finisher>'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.0.3/lib/rails/initializable.rb:30:in `instance_exec'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.0.3/lib/rails/initializable.rb:30:in `run'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.0.3/lib/rails/initializable.rb:55:in `block in run_initializers'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/tsort.rb:150:in `block in tsort_each'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/tsort.rb:183:in `block (2 levels) in each_strongly_connected_component'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/tsort.rb:219:in `each_strongly_connected_component_from'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/tsort.rb:182:in `block in each_strongly_connected_component'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/tsort.rb:180:in `each'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/tsort.rb:180:in `each_strongly_connected_component'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/tsort.rb:148:in `tsort_each'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.0.3/lib/rails/initializable.rb:54:in `run_initializers'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.0.3/lib/rails/application.rb:215:in `initialize!'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.0.3/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /Applications/MAMP/htdocs/ruby-review/config/environment.rb:5:in `<top (required)>'
from /Applications/MAMP/htdocs/ruby-review/config.ru:3:in `block in <main>'
from /Library/Ruby/Gems/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `instance_eval'
from /Library/Ruby/Gems/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `initialize'
from /Applications/MAMP/htdocs/ruby-review/config.ru:in `new'
from /Applications/MAMP/htdocs/ruby-review/config.ru:in `<main>'
from /Library/Ruby/Gems/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:49:in `eval'
from /Library/Ruby/Gems/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:49:in `new_from_string'
from /Library/Ruby/Gems/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:40:in `parse_file'
from /Library/Ruby/Gems/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:277:in `build_app_and_options_from_config'
from /Library/Ruby/Gems/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:199:in `app'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.0.3/lib/rails/commands/server.rb:48:in `app'
from /Library/Ruby/Gems/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:314:in `wrapped_app'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.0.3/lib/rails/commands/server.rb:75:in `start'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.0.3/lib/rails/commands.rb:76:in `block in <top (required)>'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.0.3/lib/rails/commands.rb:71:in `tap'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.0.3/lib/rails/commands.rb:71:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
How to I initialize the Constant of Post?
My apologies if these errors seem obvious to some. I am still new to rails.
You have to have a Post model. Do this:
$ rails g model Post
$ rake db:migrate

uninitialized constant Omrails

When I execute rails s the server won't open and I receive the following error:
Users/thomaspouliquen/whereisthepolice/config/routes.rb:2:in `<top (required)>': uninitialized constant Omrails (NameError)
from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.12/lib/rails/application/routes_reloader.rb:40:in `block in load_paths'
from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.12/lib/rails/application/routes_reloader.rb:40:in `each'
from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.12/lib/rails/application/routes_reloader.rb:40:in `load_paths'
from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.12/lib/rails/application/routes_reloader.rb:16:in `reload!'
from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.12/lib/rails/application.rb:108:in `reload_routes!'
from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/devise-3.2.1/lib/devise/rails.rb:14:in `block in <class:Engine>'
from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.12/lib/active_support/lazy_load_hooks.rb:34:in `call'
from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.12/lib/active_support/lazy_load_hooks.rb:34:in `execute_hook'
from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.12/lib/active_support/lazy_load_hooks.rb:43:in `block in run_load_hooks'
from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.12/lib/active_support/lazy_load_hooks.rb:42:in `each'
from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.12/lib/active_support/lazy_load_hooks.rb:42:in `run_load_hooks'
from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.12/lib/rails/application/finisher.rb:52:in `block in <module:Finisher>'
from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.12/lib/rails/initializable.rb:30:in `instance_exec'
from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.12/lib/rails/initializable.rb:30:in `run'
from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.12/lib/rails/initializable.rb:55:in `block in run_initializers'
from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.12/lib/rails/initializable.rb:54:in `each'
from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.12/lib/rails/initializable.rb:54:in `run_initializers'
from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.12/lib/rails/application.rb:136:in `initialize!'
from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.12/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /Users/thomaspouliquen/whereisthepolice/config/environment.rb:5:in `<top (required)>'
from /Users/thomaspouliquen/whereisthepolice/config.ru:3:in `block in <main>'
from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/rack-1.4.5/lib/rack/builder.rb:51:in `instance_eval'
from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/rack-1.4.5/lib/rack/builder.rb:51:in `initialize'
from /Users/thomaspouliquen/whereisthepolice/config.ru:in `new'
from /Users/thomaspouliquen/whereisthepolice/config.ru:in `<main>'
from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/rack-1.4.5/lib/rack/builder.rb:40:in `eval'
from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/rack-1.4.5/lib/rack/builder.rb:40:in `parse_file'
from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/rack-1.4.5/lib/rack/server.rb:200:in `app'
from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.12/lib/rails/commands/server.rb:46:in `app'
from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/rack-1.4.5/lib/rack/server.rb:304:in `wrapped_app'
from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/rack-1.4.5/lib/rack/server.rb:254:in `start'
from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.12/lib/rails/commands/server.rb:70:in `start'
from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.12/lib/rails/commands.rb:55:in `block in <top (required)>'
from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.12/lib/rails/commands.rb:50:in `tap'
from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.12/lib/rails/commands.rb:50:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
What is the issue?
Did you by any chance change the name of your application?
Perhaps it was named WhereIsThePolice and now it's Omrails?
If you want to change the name of your app, you have to make changes to several files, so let me know if this is the case.

error starting rails server 4

I am new to ruby on rails, I am getting following error after starting rails server 'rails server'
> Booting WEBrick
=> Rails 4.0.0 application starting in development on ://0.0.0.0:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
Exiting
/home/mahipal/.rvm/gems/ruby-1.9.3-p448/gems/actionpack-4.0.0/lib/action_dispatch/routing/mapper.rb:233:in `default_controller_and_action': missing :action (ArgumentError)
from /home/mahipal/.rvm/gems/ruby-1.9.3-p448/gems/actionpack-4.0.0/lib/action_dispatch/routing/mapper.rb:116:in `normalize_options!'
from /home/mahipal/.rvm/gems/ruby-1.9.3-p448/gems/actionpack-4.0.0/lib/action_dispatch/routing/mapper.rb:64:in `initialize'
from /home/mahipal/.rvm/gems/ruby-1.9.3-p448/gems/actionpack-4.0.0/lib/action_dispatch/routing/mapper.rb:1438:in `new'
from /home/mahipal/.rvm/gems/ruby-1.9.3-p448/gems/actionpack-4.0.0/lib/action_dispatch/routing/mapper.rb:1438:in `add_route'
from /home/mahipal/.rvm/gems/ruby-1.9.3-p448/gems/actionpack-4.0.0/lib/action_dispatch/routing/mapper.rb:1417:in `decomposed_match'
from /home/mahipal/.rvm/gems/ruby-1.9.3-p448/gems/actionpack-4.0.0/lib/action_dispatch/routing/mapper.rb:1398:in `block in match'
from /home/mahipal/.rvm/gems/ruby-1.9.3-p448/gems/actionpack-4.0.0/lib/action_dispatch/routing/mapper.rb:1389:in `each'
from /home/mahipal/.rvm/gems/ruby-1.9.3-p448/gems/actionpack-4.0.0/lib/action_dispatch/routing/mapper.rb:1389:in `match'
from /home/mahipal/.rvm/gems/ruby-1.9.3-p448/gems/actionpack-4.0.0/lib/action_dispatch/routing/mapper.rb:330:in `root'
from /home/mahipal/.rvm/gems/ruby-1.9.3-p448/gems/actionpack-4.0.0/lib/action_dispatch/routing/mapper.rb:1459:in `root'
from /home/mahipal/rails_projects/sample_app/config/routes.rb:3:in `block in <top (required)>'
from /home/mahipal/.rvm/gems/ruby-1.9.3-p448/gems/actionpack-4.0.0/lib/action_dispatch/routing/route_set.rb:316:in `instance_exec'
from /home/mahipal/.rvm/gems/ruby-1.9.3-p448/gems/actionpack-4.0.0/lib/action_dispatch/routing/route_set.rb:316:in `eval_block'
from /home/mahipal/.rvm/gems/ruby-1.9.3-p448/gems/actionpack-4.0.0/lib/action_dispatch/routing/route_set.rb:294:in `draw'
from /home/mahipal/rails_projects/sample_app/config/routes.rb:1:in `<top (required)>'
from /home/mahipal/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:222:in `load'
from /home/mahipal/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:222:in `block in load'
from /home/mahipal/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:213:in `load_dependency'
from /home/mahipal/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:222:in `load'
from /home/mahipal/.rvm/gems/ruby-1.9.3-p448/gems/railties-4.0.0/lib/rails/application/routes_reloader.rb:40:in `block in load_paths'
from /home/mahipal/.rvm/gems/ruby-1.9.3-p448/gems/railties-4.0.0/lib/rails/application/routes_reloader.rb:40:in `each'
from /home/mahipal/.rvm/gems/ruby-1.9.3-p448/gems/railties-4.0.0/lib/rails/application/routes_reloader.rb:40:in `load_paths'
from /home/mahipal/.rvm/gems/ruby-1.9.3-p448/gems/railties-4.0.0/lib/rails/application/routes_reloader.rb:16:in `reload!'
from /home/mahipal/.rvm/gems/ruby-1.9.3-p448/gems/railties-4.0.0/lib/rails/application/routes_reloader.rb:26:in `block in updater'
from /home/mahipal/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-4.0.0/lib/active_support/file_update_checker.rb:75:in `call'
from /home/mahipal/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-4.0.0/lib/active_support/file_update_checker.rb:75:in `execute'
from /home/mahipal/.rvm/gems/ruby-1.9.3-p448/gems/railties-4.0.0/lib/rails/application/routes_reloader.rb:27:in `updater'
from /home/mahipal/.rvm/gems/ruby-1.9.3-p448/gems/railties-4.0.0/lib/rails/application/routes_reloader.rb:6:in `execute_if_updated'
from /home/mahipal/.rvm/gems/ruby-1.9.3-p448/gems/railties-4.0.0/lib/rails/application/finisher.rb:69:in `block in <module:Finisher>'
from /home/mahipal/.rvm/gems/ruby-1.9.3-p448/gems/railties-4.0.0/lib/rails/initializable.rb:30:in `instance_exec'
from /home/mahipal/.rvm/gems/ruby-1.9.3-p448/gems/railties-4.0.0/lib/rails/initializable.rb:30:in `run'
from /home/mahipal/.rvm/gems/ruby-1.9.3-p448/gems/railties-4.0.0/lib/rails/initializable.rb:55:in `block in run_initializers'
from /home/mahipal/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/tsort.rb:150:in `block in tsort_each'
from /home/mahipal/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/tsort.rb:183:in `block (2 levels) in each_strongly_connected_component'
from /home/mahipal/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/tsort.rb:219:in `each_strongly_connected_component_from'
from /home/mahipal/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/tsort.rb:182:in `block in each_strongly_connected_component'
from /home/mahipal/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/tsort.rb:180:in `each'
from /home/mahipal/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/tsort.rb:180:in `each_strongly_connected_component'
from /home/mahipal/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/tsort.rb:148:in `tsort_each'
from /home/mahipal/.rvm/gems/ruby-1.9.3-p448/gems/railties-4.0.0/lib/rails/initializable.rb:54:in `run_initializers'
from /home/mahipal/.rvm/gems/ruby-1.9.3-p448/gems/railties-4.0.0/lib/rails/application.rb:215:in `initialize!'
from /home/mahipal/.rvm/gems/ruby-1.9.3-p448/gems/railties-4.0.0/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /home/mahipal/rails_projects/sample_app/config/environment.rb:5:in `<top (required)>'
from /home/mahipal/rails_projects/sample_app/config.ru:3:in `require'
from /home/mahipal/rails_projects/sample_app/config.ru:3:in `block in <main>'
from /home/mahipal/.rvm/gems/ruby-1.9.3-p448/gems/rack-1.5.2/lib/rack/builder.rb:55:in `instance_eval'
from /home/mahipal/.rvm/gems/ruby-1.9.3-p448/gems/rack-1.5.2/lib/rack/builder.rb:55:in `initialize'
from /home/mahipal/rails_projects/sample_app/config.ru:in `new'
from /home/mahipal/rails_projects/sample_app/config.ru:in `<main>'
from /home/mahipal/.rvm/gems/ruby-1.9.3-p448/gems/rack-1.5.2/lib/rack/builder.rb:49:in `eval'
from /home/mahipal/.rvm/gems/ruby-1.9.3-p448/gems/rack-1.5.2/lib/rack/builder.rb:49:in `new_from_string'
from /home/mahipal/.rvm/gems/ruby-1.9.3-p448/gems/rack-1.5.2/lib/rack/builder.rb:40:in `parse_file'
from /home/mahipal/.rvm/gems/ruby-1.9.3-p448/gems/rack-1.5.2/lib/rack/server.rb:277:in `build_app_and_options_from_config'
from /home/mahipal/.rvm/gems/ruby-1.9.3-p448/gems/rack-1.5.2/lib/rack/server.rb:199:in `app'
from /home/mahipal/.rvm/gems/ruby-1.9.3-p448/gems/railties-4.0.0/lib/rails/commands/server.rb:48:in `app'
from /home/mahipal/.rvm/gems/ruby-1.9.3-p448/gems/rack-1.5.2/lib/rack/server.rb:314:in `wrapped_app'
from /home/mahipal/.rvm/gems/ruby-1.9.3-p448/gems/railties-4.0.0/lib/rails/commands/server.rb:75:in `start'
from /home/mahipal/.rvm/gems/ruby-1.9.3-p448/gems/railties-4.0.0/lib/rails/commands.rb:78:in `block in <top (required)>'
from /home/mahipal/.rvm/gems/ruby-1.9.3-p448/gems/railties-4.0.0/lib/rails/commands.rb:73:in `tap'
from /home/mahipal/.rvm/gems/ruby-1.9.3-p448/gems/railties-4.0.0/lib/rails/commands.rb:73:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
Take care with the spaces in the Routes.
get '/way' , to: 'controller#action' #one space Ok
get '/way' , to: 'controller#action' # two spaces Erro

print ruby on rails backstraces/stracktraces/errorss in reverse order on the screen

Here is annoyance I have with strack traces in rails -- they print the error first which means to view any error, you have scroll up in your termanl to see what the error is.
is there a way by which the error & stracktrace can be printed in reverse order, so you can view the error without having to scroll. for example:
This is rails/ruby currently prints stracktraces:
/activesupport/lib/active_support/dependencies.rb:228:in `require': cannot load such file -- pry (LoadError)
from /activesupport/lib/active_support/dependencies.rb:228:in `block in require'
from /activesupport/lib/active_support/dependencies.rb:213:in `load_dependency'
from /activesupport/lib/active_support/dependencies.rb:228:in `require'
from /actionpack/lib/action_dispatch/routing/mapper.rb:307:in `normalize_path'
from /actionpack/lib/action_dispatch/routing/mapper.rb:79:in `normalize_path!'
from /actionpack/lib/action_dispatch/routing/mapper.rb:65:in `initialize'
from /actionpack/lib/action_dispatch/routing/mapper.rb:1429:in `new'
from /actionpack/lib/action_dispatch/routing/mapper.rb:1429:in `add_route'
from /actionpack/lib/action_dispatch/routing/mapper.rb:1408:in `decomposed_match'
from /actionpack/lib/action_dispatch/routing/mapper.rb:1389:in `block in match'
from /actionpack/lib/action_dispatch/routing/mapper.rb:1380:in `each'
from /actionpack/lib/action_dispatch/routing/mapper.rb:1380:in `match'
from /actionpack/lib/action_dispatch/routing/mapper.rb:502:in `mount'
from /ruby-2.0.0-p0/bundler/gems/sprockets-rails-bbf755e8b3aa/lib/sprockets/railtie.rb:125:in `block (2 levels) in <class:Railtie>'
from /actionpack/lib/action_dispatch/routing/route_set.rb:315:in `instance_exec'
from /actionpack/lib/action_dispatch/routing/route_set.rb:315:in `eval_block'
from /actionpack/lib/action_dispatch/routing/route_set.rb:330:in `block in clear!'
from /actionpack/lib/action_dispatch/routing/route_set.rb:330:in `each'
from /actionpack/lib/action_dispatch/routing/route_set.rb:330:in `clear!'
from /railties/lib/rails/application/routes_reloader.rb:35:in `block in clear!'
from /railties/lib/rails/application/routes_reloader.rb:33:in `each'
from /railties/lib/rails/application/routes_reloader.rb:33:in `clear!'
from /railties/lib/rails/application/routes_reloader.rb:15:in `reload!'
from /railties/lib/rails/application/routes_reloader.rb:26:in `block in updater'
from /activesupport/lib/active_support/file_update_checker.rb:75:in `call'
from /activesupport/lib/active_support/file_update_checker.rb:75:in `execute'
from /railties/lib/rails/application/routes_reloader.rb:27:in `updater'
from /railties/lib/rails/application/routes_reloader.rb:7:in `execute_if_updated'
from /railties/lib/rails/application/finisher.rb:69:in `block in <module:Finisher>'
from /railties/lib/rails/initializable.rb:30:in `instance_exec'
from /railties/lib/rails/initializable.rb:30:in `run'
from /railties/lib/rails/initializable.rb:55:in `block in run_initializers'
from ruby-2.0.0-p0/lib/ruby/2.0.0/tsort.rb:150:in `block in tsort_each'
from ruby-2.0.0-p0/lib/ruby/2.0.0/tsort.rb:183:in `block (2 levels) in each_strongly_connected_component'
from ruby-2.0.0-p0/lib/ruby/2.0.0/tsort.rb:219:in `each_strongly_connected_component_from'
from ruby-2.0.0-p0/lib/ruby/2.0.0/tsort.rb:182:in `block in each_strongly_connected_component'
from ruby-2.0.0-p0/lib/ruby/2.0.0/tsort.rb:180:in `each'
from ruby-2.0.0-p0/lib/ruby/2.0.0/tsort.rb:180:in `each_strongly_connected_component'
from ruby-2.0.0-p0/lib/ruby/2.0.0/tsort.rb:148:in `tsort_each'
from /railties/lib/rails/initializable.rb:54:in `run_initializers'
from /railties/lib/rails/application.rb:214:in `initialize!'
from /railties/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /demo/config/environment.rb:5:in `<top (required)>'
from /demo/config.ru:3:in `require'
from /demo/config.ru:3:in `block in <main>'
from /ruby-2.0.0-p0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `instance_eval'
from /ruby-2.0.0-p0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `initialize'
from /demo/config.ru:in `new'
from /demo/config.ru:in `<main>'
from /ruby-2.0.0-p0/gems/rack-1.5.2/lib/rack/builder.rb:49:in `eval'
from /ruby-2.0.0-p0/gems/rack-1.5.2/lib/rack/builder.rb:49:in `new_from_string'
from /ruby-2.0.0-p0/gems/rack-1.5.2/lib/rack/builder.rb:40:in `parse_file'
from /ruby-2.0.0-p0/gems/rack-1.5.2/lib/rack/server.rb:277:in `build_app_and_options_from_config'
from /ruby-2.0.0-p0/gems/rack-1.5.2/lib/rack/server.rb:199:in `app'
from /railties/lib/rails/commands/server.rb:48:in `app'
from /ruby-2.0.0-p0/gems/rack-1.5.2/lib/rack/server.rb:314:in `wrapped_app'
from /railties/lib/rails/commands/server.rb:75:in `start'
from /railties/lib/rails/commands.rb:80:in `block in <top (required)>'
from /railties/lib/rails/commands.rb:75:in `tap'
from /railties/lib/rails/commands.rb:75:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
Is there a way by which I can get this same stracktrace in reverse order, so I don't have to scroll my terminal everytime i get a error. something similar to this:
from bin/rails:4:in `<main>'
from bin/rails:4:in `require'
from /railties/lib/rails/commands.rb:75:in `<top (required)>'
from /railties/lib/rails/commands.rb:75:in `tap'
from /railties/lib/rails/commands.rb:80:in `block in <top (required)>'
from /railties/lib/rails/commands/server.rb:75:in `start'
from /ruby-2.0.0-p0/gems/rack-1.5.2/lib/rack/server.rb:314:in `wrapped_app'
from /railties/lib/rails/commands/server.rb:48:in `app'
from /ruby-2.0.0-p0/gems/rack-1.5.2/lib/rack/server.rb:199:in `app'
from /ruby-2.0.0-p0/gems/rack-1.5.2/lib/rack/server.rb:277:in `build_app_and_options_from_config'
from /ruby-2.0.0-p0/gems/rack-1.5.2/lib/rack/builder.rb:40:in `parse_file'
from /ruby-2.0.0-p0/gems/rack-1.5.2/lib/rack/builder.rb:49:in `new_from_string'
from /ruby-2.0.0-p0/gems/rack-1.5.2/lib/rack/builder.rb:49:in `eval'
from /demo/config.ru:in `<main>'
from /demo/config.ru:in `new'
from /ruby-2.0.0-p0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `initialize'
from /ruby-2.0.0-p0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `instance_eval'
from /demo/config.ru:3:in `block in <main>'
from /demo/config.ru:3:in `require'
from /demo/config/environment.rb:5:in `<top (required)>'
from /railties/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /railties/lib/rails/application.rb:214:in `initialize!'
from /railties/lib/rails/initializable.rb:54:in `run_initializers'
from ruby-2.0.0-p0/lib/ruby/2.0.0/tsort.rb:148:in `tsort_each'
from ruby-2.0.0-p0/lib/ruby/2.0.0/tsort.rb:180:in `each_strongly_connected_component'
from ruby-2.0.0-p0/lib/ruby/2.0.0/tsort.rb:180:in `each'
from ruby-2.0.0-p0/lib/ruby/2.0.0/tsort.rb:182:in `block in each_strongly_connected_component'
from ruby-2.0.0-p0/lib/ruby/2.0.0/tsort.rb:219:in `each_strongly_connected_component_from'
from ruby-2.0.0-p0/lib/ruby/2.0.0/tsort.rb:183:in `block (2 levels) in each_strongly_connected_component'
from ruby-2.0.0-p0/lib/ruby/2.0.0/tsort.rb:150:in `block in tsort_each'
from /railties/lib/rails/initializable.rb:55:in `block in run_initializers'
from /railties/lib/rails/initializable.rb:30:in `run'
from /railties/lib/rails/initializable.rb:30:in `instance_exec'
from /railties/lib/rails/application/finisher.rb:69:in `block in <module:Finisher>'
from /railties/lib/rails/application/routes_reloader.rb:7:in `execute_if_updated'
from /railties/lib/rails/application/routes_reloader.rb:27:in `updater'
from /activesupport/lib/active_support/file_update_checker.rb:75:in `execute'
from /activesupport/lib/active_support/file_update_checker.rb:75:in `call'
from /railties/lib/rails/application/routes_reloader.rb:26:in `block in updater'
from /railties/lib/rails/application/routes_reloader.rb:15:in `reload!'
from /railties/lib/rails/application/routes_reloader.rb:33:in `clear!'
from /railties/lib/rails/application/routes_reloader.rb:33:in `each'
from /railties/lib/rails/application/routes_reloader.rb:35:in `block in clear!'
from /actionpack/lib/action_dispatch/routing/route_set.rb:330:in `clear!'
from /actionpack/lib/action_dispatch/routing/route_set.rb:330:in `each'
from /actionpack/lib/action_dispatch/routing/route_set.rb:330:in `block in clear!'
from /actionpack/lib/action_dispatch/routing/route_set.rb:315:in `eval_block'
from /actionpack/lib/action_dispatch/routing/route_set.rb:315:in `instance_exec'
from /ruby-2.0.0-p0/bundler/gems/sprockets-rails-bbf755e8b3aa/lib/sprockets/railtie.rb:125:in `block (2 levels) in <class:Railtie>'
from /actionpack/lib/action_dispatch/routing/mapper.rb:502:in `mount'
from /actionpack/lib/action_dispatch/routing/mapper.rb:1380:in `match'
from /actionpack/lib/action_dispatch/routing/mapper.rb:1380:in `each'
from /actionpack/lib/action_dispatch/routing/mapper.rb:1389:in `block in match'
from /actionpack/lib/action_dispatch/routing/mapper.rb:1408:in `decomposed_match'
from /actionpack/lib/action_dispatch/routing/mapper.rb:1429:in `add_route'
from /actionpack/lib/action_dispatch/routing/mapper.rb:1429:in `new'
from /actionpack/lib/action_dispatch/routing/mapper.rb:65:in `initialize'
from /actionpack/lib/action_dispatch/routing/mapper.rb:79:in `normalize_path!'
from /actionpack/lib/action_dispatch/routing/mapper.rb:307:in `normalize_path'
from /activesupport/lib/active_support/dependencies.rb:228:in `require'
from /activesupport/lib/active_support/dependencies.rb:213:in `load_dependency'
from /activesupport/lib/active_support/dependencies.rb:228:in `block in require'
/activesupport/lib/active_support/dependencies.rb:228:in `require': cannot load such file -- pry (LoadError)
Possible?
There are several ways to do this.
If you're in irb, or the debugger something like:
caller.reverse
Will give you what you want.
The alternative then is to wrap all your code like so
begin
all the code
rescue StandardError => e
puts e.backtrace.reverse
end
And finally you could extend backtrace on Exception to print caller.reverse but extending core modules is not a great idea at all.

Resources