I cannot understand this error message - ruby-on-rails

When trying to boot my rails server i get an error:
home/vladislav/.rbenv/versions/2.3.0-dev/lib/ruby/2.4.0/uri/rfc2396_parser.rb:305:in `escape': undefined method `gsub' for nil:NilClass (NoMethodError)
the full console log
=> Booting Puma
=> Rails 4.2.5 application starting in development on http://localhost:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
Exiting
/home/vladislav/.rbenv/versions/2.3.0-dev/lib/ruby/2.4.0/uri/rfc2396_parser.rb:305:in `escape': undefined method `gsub' for nil:NilClass (NoMethodError)
from /home/vladislav/.rbenv/versions/2.3.0-dev/lib/ruby/2.4.0/uri/common.rb:100:in `escape'
from /home/vladislav/Desktop/metartaf-develop/config/initializers/redis.rb:1:in `<top (required)>'
from /home/vladislav/.rbenv/versions/2.3.0-dev/lib/ruby/gems/2.4.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:268:in `load'
from /home/vladislav/.rbenv/versions/2.3.0-dev/lib/ruby/gems/2.4.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:268:in `block in load'
from /home/vladislav/.rbenv/versions/2.3.0-dev/lib/ruby/gems/2.4.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:240:in `load_dependency'
from /home/vladislav/.rbenv/versions/2.3.0-dev/lib/ruby/gems/2.4.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:268:in `load'
from /home/vladislav/.rbenv/versions/2.3.0-dev/lib/ruby/gems/2.4.0/gems/railties-4.2.5/lib/rails/engine.rb:652:in `block in load_config_initializer'
from /home/vladislav/.rbenv/versions/2.3.0-dev/lib/ruby/gems/2.4.0/gems/activesupport-4.2.5/lib/active_support/notifications.rb:166:in `instrument'
from /home/vladislav/.rbenv/versions/2.3.0-dev/lib/ruby/gems/2.4.0/gems/railties-4.2.5/lib/rails/engine.rb:651:in `load_config_initializer'
from /home/vladislav/.rbenv/versions/2.3.0-dev/lib/ruby/gems/2.4.0/gems/railties-4.2.5/lib/rails/engine.rb:616:in `block (2 levels) in <class:Engine>'
from /home/vladislav/.rbenv/versions/2.3.0-dev/lib/ruby/gems/2.4.0/gems/railties-4.2.5/lib/rails/engine.rb:615:in `each'
from /home/vladislav/.rbenv/versions/2.3.0-dev/lib/ruby/gems/2.4.0/gems/railties-4.2.5/lib/rails/engine.rb:615:in `block in <class:Engine>'
from /home/vladislav/.rbenv/versions/2.3.0-dev/lib/ruby/gems/2.4.0/gems/railties-4.2.5/lib/rails/initializable.rb:30:in `instance_exec'
from /home/vladislav/.rbenv/versions/2.3.0-dev/lib/ruby/gems/2.4.0/gems/railties-4.2.5/lib/rails/initializable.rb:30:in `run'
from /home/vladislav/.rbenv/versions/2.3.0-dev/lib/ruby/gems/2.4.0/gems/railties-4.2.5/lib/rails/initializable.rb:55:in `block in run_initializers'
from /home/vladislav/.rbenv/versions/2.3.0-dev/lib/ruby/2.4.0/tsort.rb:228:in `block in tsort_each'
from /home/vladislav/.rbenv/versions/2.3.0-dev/lib/ruby/2.4.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
from /home/vladislav/.rbenv/versions/2.3.0-dev/lib/ruby/2.4.0/tsort.rb:422:in `block (2 levels) in each_strongly_connected_component_from'
from /home/vladislav/.rbenv/versions/2.3.0-dev/lib/ruby/2.4.0/tsort.rb:431:in `each_strongly_connected_component_from'
from /home/vladislav/.rbenv/versions/2.3.0-dev/lib/ruby/2.4.0/tsort.rb:421:in `block in each_strongly_connected_component_from'
from /home/vladislav/.rbenv/versions/2.3.0-dev/lib/ruby/gems/2.4.0/gems/railties-4.2.5/lib/rails/initializable.rb:44:in `each'
from /home/vladislav/.rbenv/versions/2.3.0-dev/lib/ruby/gems/2.4.0/gems/railties-4.2.5/lib/rails/initializable.rb:44:in `tsort_each_child'
from /home/vladislav/.rbenv/versions/2.3.0-dev/lib/ruby/2.4.0/tsort.rb:415:in `call'
from /home/vladislav/.rbenv/versions/2.3.0-dev/lib/ruby/2.4.0/tsort.rb:415:in `each_strongly_connected_component_from'
from /home/vladislav/.rbenv/versions/2.3.0-dev/lib/ruby/2.4.0/tsort.rb:349:in `block in each_strongly_connected_component'
from /home/vladislav/.rbenv/versions/2.3.0-dev/lib/ruby/2.4.0/tsort.rb:347:in `each'
from /home/vladislav/.rbenv/versions/2.3.0-dev/lib/ruby/2.4.0/tsort.rb:347:in `call'
from /home/vladislav/.rbenv/versions/2.3.0-dev/lib/ruby/2.4.0/tsort.rb:347:in `each_strongly_connected_component'
from /home/vladislav/.rbenv/versions/2.3.0-dev/lib/ruby/2.4.0/tsort.rb:226:in `tsort_each'
from /home/vladislav/.rbenv/versions/2.3.0-dev/lib/ruby/2.4.0/tsort.rb:205:in `tsort_each'
from /home/vladislav/.rbenv/versions/2.3.0-dev/lib/ruby/gems/2.4.0/gems/railties-4.2.5/lib/rails/initializable.rb:54:in `run_initializers'
from /home/vladislav/.rbenv/versions/2.3.0-dev/lib/ruby/gems/2.4.0/gems/railties-4.2.5/lib/rails/application.rb:352:in `initialize!'
from /home/vladislav/.rbenv/versions/2.3.0-dev/lib/ruby/gems/2.4.0/gems/railties-4.2.5/lib/rails/railtie.rb:194:in `public_send'
from /home/vladislav/.rbenv/versions/2.3.0-dev/lib/ruby/gems/2.4.0/gems/railties-4.2.5/lib/rails/railtie.rb:194:in `method_missing'
from /home/vladislav/Desktop/metartaf-develop/config/environment.rb:5:in `<top (required)>'
from /home/vladislav/.rbenv/versions/2.3.0-dev/lib/ruby/gems/2.4.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `require'
from /home/vladislav/.rbenv/versions/2.3.0-dev/lib/ruby/gems/2.4.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `block in require'
from /home/vladislav/.rbenv/versions/2.3.0-dev/lib/ruby/gems/2.4.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:240:in `load_dependency'
from /home/vladislav/.rbenv/versions/2.3.0-dev/lib/ruby/gems/2.4.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `require'
from /home/vladislav/Desktop/metartaf-develop/config.ru:3:in `block in <main>'
from /home/vladislav/.rbenv/versions/2.3.0-dev/lib/ruby/gems/2.4.0/gems/rack-1.6.4/lib/rack/builder.rb:55:in `instance_eval'
from /home/vladislav/.rbenv/versions/2.3.0-dev/lib/ruby/gems/2.4.0/gems/rack-1.6.4/lib/rack/builder.rb:55:in `initialize'
from /home/vladislav/Desktop/metartaf-develop/config.ru:in `new'
from /home/vladislav/Desktop/metartaf-develop/config.ru:in `<main>'
from /home/vladislav/.rbenv/versions/2.3.0-dev/lib/ruby/gems/2.4.0/gems/rack-1.6.4/lib/rack/builder.rb:49:in `eval'
from /home/vladislav/.rbenv/versions/2.3.0-dev/lib/ruby/gems/2.4.0/gems/rack-1.6.4/lib/rack/builder.rb:49:in `new_from_string'
from /home/vladislav/.rbenv/versions/2.3.0-dev/lib/ruby/gems/2.4.0/gems/rack-1.6.4/lib/rack/builder.rb:40:in `parse_file'
from /home/vladislav/.rbenv/versions/2.3.0-dev/lib/ruby/gems/2.4.0/gems/rack-1.6.4/lib/rack/server.rb:299:in `build_app_and_options_from_config'
from /home/vladislav/.rbenv/versions/2.3.0-dev/lib/ruby/gems/2.4.0/gems/rack-1.6.4/lib/rack/server.rb:208:in `app'
from /home/vladislav/.rbenv/versions/2.3.0-dev/lib/ruby/gems/2.4.0/gems/railties-4.2.5/lib/rails/commands/server.rb:61:in `app'
from /home/vladislav/.rbenv/versions/2.3.0-dev/lib/ruby/gems/2.4.0/gems/rack-1.6.4/lib/rack/server.rb:336:in `wrapped_app'
from /home/vladislav/.rbenv/versions/2.3.0-dev/lib/ruby/gems/2.4.0/gems/railties-4.2.5/lib/rails/commands/server.rb:139:in `log_to_stdout'
from /home/vladislav/.rbenv/versions/2.3.0-dev/lib/ruby/gems/2.4.0/gems/railties-4.2.5/lib/rails/commands/server.rb:78:in `start'
from /home/vladislav/.rbenv/versions/2.3.0-dev/lib/ruby/gems/2.4.0/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:80:in `block in server'
from /home/vladislav/.rbenv/versions/2.3.0-dev/lib/ruby/gems/2.4.0/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:75:in `tap'
from /home/vladislav/.rbenv/versions/2.3.0-dev/lib/ruby/gems/2.4.0/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:75:in `server'
from /home/vladislav/.rbenv/versions/2.3.0-dev/lib/ruby/gems/2.4.0/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from /home/vladislav/.rbenv/versions/2.3.0-dev/lib/ruby/gems/2.4.0/gems/railties-4.2.5/lib/rails/commands.rb:17:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
This is not my project, so I don't know where the mistake is. Where do I have a mistake ?
#config/environment.rb
# Load the rails application.
require File.expand_path('../application', __FILE__)
# Initialize the rails application.
Metartaf::Application.initialize!
#config/initializers/redis.rb
REDISTOGO_URL="redis://user#localhost:6379/"
uri = URI.parse(URI.encode(ENV["REDISTOGO_URL"]))
$redis = Redis.new(:host => uri.host, :port => uri.port, :password => uri.password)

You're using ENV["REDISTOGO_URL"] because the URL will be made available there in production (I guess you're using Heroku). That's fine, but then you're using the ruby constant REDISTOGO_URL for a local URL to use in development, which is not the same thing.
The error you're getting is because you're ignoring the REDISTOGO_URL constant, and still reading the value from ENV["REDISTOGO_URL"], which I guess is nil.
Try to replace:
REDISTOGO_URL="redis://user#localhost:6379/"
uri = URI.parse(URI.encode(ENV["REDISTOGO_URL"]))
with:
REDISTOGO_URL = ENV["REDISTOGO_URL"] || "redis://user#localhost:6379/"
uri = URI.parse(URI.encode(REDISTOGO_URL))

Related

Rails server crashes due to captcha?

Over the weekend I shut my localhost server down because I wasn't doing anything with it. However this week I have had a host of issues with booting it back up. My first problem with something with rmagick, I had to either install(?) or update command line tools, reinstall rmagick and nokogiri.
Now that problem seems to be behind me but every time I run rails s
It cashes after boot and I get this error:
=> Booting WEBrick
=> Rails 4.2.5.1 application starting in development on http://localhost:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
Exiting
/Users/tfantina/Documents/Code and Websites/Ruby & Rails Stuff/professor/config/initializers/recaptcha.rb:11:in `block in <top (required)>': undefined method `public_key=' for #<Recaptcha::Configuration:0x007fbaa89d09d0> (NoMethodError)
Did you mean? public_send
from /Users/tfantina/.rvm/gems/ruby-2.3.1/gems/recaptcha-4.0.0/lib/recaptcha.rb:30:in `configure'
from /Users/tfantina/Documents/Code and Websites/Ruby & Rails Stuff/professor/config/initializers/recaptcha.rb:10:in `<top (required)>'
from /Users/tfantina/.rvm/gems/ruby-2.3.1/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:268:in `load'
from /Users/tfantina/.rvm/gems/ruby-2.3.1/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:268:in `block in load'
from /Users/tfantina/.rvm/gems/ruby-2.3.1/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:240:in `load_dependency'
from /Users/tfantina/.rvm/gems/ruby-2.3.1/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:268:in `load'
from /Users/tfantina/.rvm/gems/ruby-2.3.1/gems/railties-4.2.5.1/lib/rails/engine.rb:652:in `block in load_config_initializer'
from /Users/tfantina/.rvm/gems/ruby-2.3.1/gems/activesupport-4.2.5.1/lib/active_support/notifications.rb:166:in `instrument'
from /Users/tfantina/.rvm/gems/ruby-2.3.1/gems/railties-4.2.5.1/lib/rails/engine.rb:651:in `load_config_initializer'
from /Users/tfantina/.rvm/gems/ruby-2.3.1/gems/railties-4.2.5.1/lib/rails/engine.rb:616:in `block (2 levels) in <class:Engine>'
from /Users/tfantina/.rvm/gems/ruby-2.3.1/gems/railties-4.2.5.1/lib/rails/engine.rb:615:in `each'
from /Users/tfantina/.rvm/gems/ruby-2.3.1/gems/railties-4.2.5.1/lib/rails/engine.rb:615:in `block in <class:Engine>'
from /Users/tfantina/.rvm/gems/ruby-2.3.1/gems/railties-4.2.5.1/lib/rails/initializable.rb:30:in `instance_exec'
from /Users/tfantina/.rvm/gems/ruby-2.3.1/gems/railties-4.2.5.1/lib/rails/initializable.rb:30:in `run'
from /Users/tfantina/.rvm/gems/ruby-2.3.1/gems/railties-4.2.5.1/lib/rails/initializable.rb:55:in `block in run_initializers'
from /Users/tfantina/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:228:in `block in tsort_each'
from /Users/tfantina/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
from /Users/tfantina/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:422:in `block (2 levels) in each_strongly_connected_component_from'
from /Users/tfantina/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:431:in `each_strongly_connected_component_from'
from /Users/tfantina/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:421:in `block in each_strongly_connected_component_from'
from /Users/tfantina/.rvm/gems/ruby-2.3.1/gems/railties-4.2.5.1/lib/rails/initializable.rb:44:in `each'
from /Users/tfantina/.rvm/gems/ruby-2.3.1/gems/railties-4.2.5.1/lib/rails/initializable.rb:44:in `tsort_each_child'
from /Users/tfantina/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:415:in `call'
from /Users/tfantina/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:415:in `each_strongly_connected_component_from'
from /Users/tfantina/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:349:in `block in each_strongly_connected_component'
from /Users/tfantina/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:347:in `each'
from /Users/tfantina/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:347:in `call'
from /Users/tfantina/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:347:in `each_strongly_connected_component'
from /Users/tfantina/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:226:in `tsort_each'
from /Users/tfantina/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:205:in `tsort_each'
from /Users/tfantina/.rvm/gems/ruby-2.3.1/gems/railties-4.2.5.1/lib/rails/initializable.rb:54:in `run_initializers'
from /Users/tfantina/.rvm/gems/ruby-2.3.1/gems/railties-4.2.5.1/lib/rails/application.rb:352:in `initialize!'
from /Users/tfantina/Documents/Code and Websites/Ruby & Rails Stuff/professor/config/environment.rb:5:in `<top (required)>'
from /Users/tfantina/.rvm/gems/ruby-2.3.1/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:274:in `require'
from /Users/tfantina/.rvm/gems/ruby-2.3.1/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:274:in `block in require'
from /Users/tfantina/.rvm/gems/ruby-2.3.1/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:240:in `load_dependency'
from /Users/tfantina/.rvm/gems/ruby-2.3.1/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:274:in `require'
from /Users/tfantina/Documents/Code and Websites/Ruby & Rails Stuff/professor/config.ru:3:in `block in <main>'
from /Users/tfantina/.rvm/gems/ruby-2.3.1/gems/rack-1.6.5/lib/rack/builder.rb:55:in `instance_eval'
from /Users/tfantina/.rvm/gems/ruby-2.3.1/gems/rack-1.6.5/lib/rack/builder.rb:55:in `initialize'
from /Users/tfantina/Documents/Code and Websites/Ruby & Rails Stuff/professor/config.ru:in `new'
from /Users/tfantina/Documents/Code and Websites/Ruby & Rails Stuff/professor/config.ru:in `<main>'
from /Users/tfantina/.rvm/gems/ruby-2.3.1/gems/rack-1.6.5/lib/rack/builder.rb:49:in `eval'
from /Users/tfantina/.rvm/gems/ruby-2.3.1/gems/rack-1.6.5/lib/rack/builder.rb:49:in `new_from_string'
from /Users/tfantina/.rvm/gems/ruby-2.3.1/gems/rack-1.6.5/lib/rack/builder.rb:40:in `parse_file'
from /Users/tfantina/.rvm/gems/ruby-2.3.1/gems/rack-1.6.5/lib/rack/server.rb:299:in `build_app_and_options_from_config'
from /Users/tfantina/.rvm/gems/ruby-2.3.1/gems/rack-1.6.5/lib/rack/server.rb:208:in `app'
from /Users/tfantina/.rvm/gems/ruby-2.3.1/gems/railties-4.2.5.1/lib/rails/commands/server.rb:61:in `app'
from /Users/tfantina/.rvm/gems/ruby-2.3.1/gems/rack-1.6.5/lib/rack/server.rb:336:in `wrapped_app'
from /Users/tfantina/.rvm/gems/ruby-2.3.1/gems/railties-4.2.5.1/lib/rails/commands/server.rb:139:in `log_to_stdout'
from /Users/tfantina/.rvm/gems/ruby-2.3.1/gems/railties-4.2.5.1/lib/rails/commands/server.rb:78:in `start'
from /Users/tfantina/.rvm/gems/ruby-2.3.1/gems/railties-4.2.5.1/lib/rails/commands/commands_tasks.rb:80:in `block in server'
from /Users/tfantina/.rvm/gems/ruby-2.3.1/gems/railties-4.2.5.1/lib/rails/commands/commands_tasks.rb:75:in `tap'
from /Users/tfantina/.rvm/gems/ruby-2.3.1/gems/railties-4.2.5.1/lib/rails/commands/commands_tasks.rb:75:in `server'
from /Users/tfantina/.rvm/gems/ruby-2.3.1/gems/railties-4.2.5.1/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from /Users/tfantina/.rvm/gems/ruby-2.3.1/gems/railties-4.2.5.1/lib/rails/commands.rb:17:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
I haven't touched that initializer in weeks, I even checked my git status to be sure and nothing has changed. Any ideas on why this keeps crashing?
Recaptcha has been updated.
https://github.com/ambethia/recaptcha/blob/master/CHANGELOG.md
public_key to site_key
private_key to secret_key
Change your config/initializers/recaptcha.rb
Recaptcha.configure do |config|
config.site_key = 'public key'
config.secret_key = 'private key'

Rails: undefined method 'to_sym' for nil:NilClass (NoMethodError) when running production server

I'm trying to run my Rails app locally such that it will point to the database used by the deployed app on Heroku. Using heroku pg:credentials DATABASE, I was able to get the information about the production database and use that to populate the production info in database.yml. However, when I run rails s -e production, I get the following error:
=> Booting Puma
=> Rails 4.2.6 application starting in production on http://localhost:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
Exiting
/Users/Robert/.rvm/gems/ruby-2.2.2/gems/braintree-2.68.2/lib/braintree/configuration.rb:59:in `environment=': undefined method `to_sym' for nil:NilClass (NoMethodError)
from /Users/Robert/Developer/Git-Repositories/inspectx-live/config/initializers/braintree.rb:1:in `<top (required)>'
from /Users/Robert/.rvm/gems/ruby-2.2.2/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:268:in `load'
from /Users/Robert/.rvm/gems/ruby-2.2.2/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:268:in `block in load'
from /Users/Robert/.rvm/gems/ruby-2.2.2/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:240:in `load_dependency'
from /Users/Robert/.rvm/gems/ruby-2.2.2/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:268:in `load'
from /Users/Robert/.rvm/gems/ruby-2.2.2/gems/railties-4.2.6/lib/rails/engine.rb:652:in `block in load_config_initializer'
from /Users/Robert/.rvm/gems/ruby-2.2.2/gems/activesupport-4.2.6/lib/active_support/notifications.rb:166:in `instrument'
from /Users/Robert/.rvm/gems/ruby-2.2.2/gems/railties-4.2.6/lib/rails/engine.rb:651:in `load_config_initializer'
from /Users/Robert/.rvm/gems/ruby-2.2.2/gems/railties-4.2.6/lib/rails/engine.rb:616:in `block (2 levels) in <class:Engine>'
from /Users/Robert/.rvm/gems/ruby-2.2.2/gems/railties-4.2.6/lib/rails/engine.rb:615:in `each'
from /Users/Robert/.rvm/gems/ruby-2.2.2/gems/railties-4.2.6/lib/rails/engine.rb:615:in `block in <class:Engine>'
from /Users/Robert/.rvm/gems/ruby-2.2.2/gems/railties-4.2.6/lib/rails/initializable.rb:30:in `instance_exec'
from /Users/Robert/.rvm/gems/ruby-2.2.2/gems/railties-4.2.6/lib/rails/initializable.rb:30:in `run'
from /Users/Robert/.rvm/gems/ruby-2.2.2/gems/railties-4.2.6/lib/rails/initializable.rb:55:in `block in run_initializers'
from /Users/Robert/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/tsort.rb:226:in `block in tsort_each'
from /Users/Robert/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
from /Users/Robert/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/tsort.rb:420:in `block (2 levels) in each_strongly_connected_component_from'
from /Users/Robert/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/tsort.rb:429:in `each_strongly_connected_component_from'
from /Users/Robert/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/tsort.rb:419:in `block in each_strongly_connected_component_from'
from /Users/Robert/.rvm/gems/ruby-2.2.2/gems/railties-4.2.6/lib/rails/initializable.rb:44:in `each'
from /Users/Robert/.rvm/gems/ruby-2.2.2/gems/railties-4.2.6/lib/rails/initializable.rb:44:in `tsort_each_child'
from /Users/Robert/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/tsort.rb:413:in `call'
from /Users/Robert/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/tsort.rb:413:in `each_strongly_connected_component_from'
from /Users/Robert/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/tsort.rb:347:in `block in each_strongly_connected_component'
from /Users/Robert/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/tsort.rb:345:in `each'
from /Users/Robert/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/tsort.rb:345:in `call'
from /Users/Robert/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/tsort.rb:345:in `each_strongly_connected_component'
from /Users/Robert/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/tsort.rb:224:in `tsort_each'
from /Users/Robert/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/tsort.rb:203:in `tsort_each'
from /Users/Robert/.rvm/gems/ruby-2.2.2/gems/railties-4.2.6/lib/rails/initializable.rb:54:in `run_initializers'
from /Users/Robert/.rvm/gems/ruby-2.2.2/gems/railties-4.2.6/lib/rails/application.rb:352:in `initialize!'
from /Users/Robert/Developer/Git-Repositories/inspectx-live/config/environment.rb:5:in `<top (required)>'
from /Users/Robert/.rvm/gems/ruby-2.2.2/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `require'
from /Users/Robert/.rvm/gems/ruby-2.2.2/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `block in require'
from /Users/Robert/.rvm/gems/ruby-2.2.2/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:240:in `load_dependency'
from /Users/Robert/.rvm/gems/ruby-2.2.2/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `require'
from /Users/Robert/Developer/Git-Repositories/inspectx-live/config.ru:3:in `block in <main>'
from /Users/Robert/.rvm/gems/ruby-2.2.2/gems/rack-1.6.4/lib/rack/builder.rb:55:in `instance_eval'
from /Users/Robert/.rvm/gems/ruby-2.2.2/gems/rack-1.6.4/lib/rack/builder.rb:55:in `initialize'
from /Users/Robert/Developer/Git-Repositories/inspectx-live/config.ru:in `new'
from /Users/Robert/Developer/Git-Repositories/inspectx-live/config.ru:in `<main>'
from /Users/Robert/.rvm/gems/ruby-2.2.2/gems/rack-1.6.4/lib/rack/builder.rb:49:in `eval'
from /Users/Robert/.rvm/gems/ruby-2.2.2/gems/rack-1.6.4/lib/rack/builder.rb:49:in `new_from_string'
from /Users/Robert/.rvm/gems/ruby-2.2.2/gems/rack-1.6.4/lib/rack/builder.rb:40:in `parse_file'
from /Users/Robert/.rvm/gems/ruby-2.2.2/gems/rack-1.6.4/lib/rack/server.rb:299:in `build_app_and_options_from_config'
from /Users/Robert/.rvm/gems/ruby-2.2.2/gems/rack-1.6.4/lib/rack/server.rb:208:in `app'
from /Users/Robert/.rvm/gems/ruby-2.2.2/gems/railties-4.2.6/lib/rails/commands/server.rb:61:in `app'
from /Users/Robert/.rvm/gems/ruby-2.2.2/gems/rack-1.6.4/lib/rack/server.rb:336:in `wrapped_app'
from /Users/Robert/.rvm/gems/ruby-2.2.2/gems/rack-1.6.4/lib/rack/server.rb:272:in `start'
from /Users/Robert/.rvm/gems/ruby-2.2.2/gems/railties-4.2.6/lib/rails/commands/server.rb:80:in `start'
from /Users/Robert/.rvm/gems/ruby-2.2.2/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:80:in `block in server'
from /Users/Robert/.rvm/gems/ruby-2.2.2/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:75:in `tap'
from /Users/Robert/.rvm/gems/ruby-2.2.2/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:75:in `server'
from /Users/Robert/.rvm/gems/ruby-2.2.2/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from /Users/Robert/.rvm/gems/ruby-2.2.2/gems/railties-4.2.6/lib/rails/commands.rb:17:in `<top (required)>'
from /Users/Robert/Developer/Git-Repositories/inspectx-live/bin/rails:9:in `require'
from /Users/Robert/Developer/Git-Repositories/inspectx-live/bin/rails:9:in `<top (required)>'
from /Users/Robert/.rvm/gems/ruby-2.2.2/gems/spring-1.7.1/lib/spring/client/rails.rb:28:in `load'
from /Users/Robert/.rvm/gems/ruby-2.2.2/gems/spring-1.7.1/lib/spring/client/rails.rb:28:in `call'
from /Users/Robert/.rvm/gems/ruby-2.2.2/gems/spring-1.7.1/lib/spring/client/command.rb:7:in `call'
from /Users/Robert/.rvm/gems/ruby-2.2.2/gems/spring-1.7.1/lib/spring/client.rb:30:in `run'
from /Users/Robert/.rvm/gems/ruby-2.2.2/gems/spring-1.7.1/bin/spring:49:in `<top (required)>'
from /Users/Robert/.rvm/gems/ruby-2.2.2/gems/spring-1.7.1/lib/spring/binstub.rb:11:in `load'
from /Users/Robert/.rvm/gems/ruby-2.2.2/gems/spring-1.7.1/lib/spring/binstub.rb:11:in `<top (required)>'
from /Users/Robert/Developer/Git-Repositories/inspectx-live/bin/spring:13:in `require'
from /Users/Robert/Developer/Git-Repositories/inspectx-live/bin/spring:13:in `<top (required)>'
from bin/rails:3:in `load'
from bin/rails:3:in `<main>'
I'm relatively new to Rails so I'm not sure what to do. I think this has something to do with Braintree integration, but I'm really not sure.
Edit: Here are the contents of config/initializers/braintree.rb:
Braintree::Configuration.environment = ENV['BRAINTREE_ENV']
Braintree::Configuration.merchant_id = ENV['BRAINTREE_MERCHANT_ID']
Braintree::Configuration.public_key = ENV['BRAINTREE_PUBLIC_KEY']
Braintree::Configuration.private_key = ENV['BRAINTREE_PRIVATE_KEY']
A note about braintree.rb: there was no private info to obscure. The above is exactly how it appears in braintree.rb. I didn't originally set up the Braintree integration, so I'm not sure if there was supposed to be private info in the ENV fields.

Rails server not working on one project but works on another project

My rails server doesn't work for one project, but DOES work for another project.
For the project that does not work, when I run rails s in my terminal I get the the following output:
=> Booting Thin
=> Rails 4.1.0 application starting in development on http://0.0.0.0:3000
=> 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
/Users/christinating/.rvm/gems/ruby-2.1.3/bundler/gems/active_admin-48a8674a4566/lib/active_admin/application.rb:116:in `allow_comments=': `config.allow_comments` is no longer provided in ActiveAdmin 1.x. Use `config.comments` instead. (RuntimeError)
from /Users/christinating/scholarhood/config/initializers/active_admin.rb:104:in `block in <top (required)>'
from /Users/christinating/.rvm/gems/ruby-2.1.3/bundler/gems/active_admin-48a8674a4566/lib/active_admin.rb:71:in `setup'
from /Users/christinating/scholarhood/config/initializers/active_admin.rb:1:in `<top (required)>'
from /Users/christinating/.rvm/gems/ruby-2.1.3/gems/zeus-0.15.4/lib/zeus/load_tracking.rb:50:in `load'
from /Users/christinating/.rvm/gems/ruby-2.1.3/gems/zeus-0.15.4/lib/zeus/load_tracking.rb:50:in `load'
from /Users/christinating/.rvm/gems/ruby-2.1.3/gems/zeus-0.15.4/lib/zeus/load_tracking.rb:43:in `load'
from /Users/christinating/.rvm/gems/ruby-2.1.3/gems/activesupport-4.1.0/lib/active_support/dependencies.rb:241:in `block in load'
from /Users/christinating/.rvm/gems/ruby-2.1.3/gems/activesupport-4.1.0/lib/active_support/dependencies.rb:232:in `load_dependency'
from /Users/christinating/.rvm/gems/ruby-2.1.3/gems/activesupport-4.1.0/lib/active_support/dependencies.rb:241:in `load'
from /Users/christinating/.rvm/gems/ruby-2.1.3/gems/railties-4.1.0/lib/rails/engine.rb:648:in `block in load_config_initializer'
from /Users/christinating/.rvm/gems/ruby-2.1.3/gems/activesupport-4.1.0/lib/active_support/notifications.rb:161:in `instrument'
from /Users/christinating/.rvm/gems/ruby-2.1.3/gems/railties-4.1.0/lib/rails/engine.rb:647:in `load_config_initializer'
from /Users/christinating/.rvm/gems/ruby-2.1.3/gems/railties-4.1.0/lib/rails/engine.rb:612:in `block (2 levels) in <class:Engine>'
from /Users/christinating/.rvm/gems/ruby-2.1.3/gems/railties-4.1.0/lib/rails/engine.rb:611:in `each'
from /Users/christinating/.rvm/gems/ruby-2.1.3/gems/railties-4.1.0/lib/rails/engine.rb:611:in `block in <class:Engine>'
from /Users/christinating/.rvm/gems/ruby-2.1.3/gems/railties-4.1.0/lib/rails/initializable.rb:30:in `instance_exec'
from /Users/christinating/.rvm/gems/ruby-2.1.3/gems/railties-4.1.0/lib/rails/initializable.rb:30:in `run'
from /Users/christinating/.rvm/gems/ruby-2.1.3/gems/railties-4.1.0/lib/rails/initializable.rb:55:in `block in run_initializers'
from /Users/christinating/.rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/tsort.rb:226:in `block in tsort_each'
from /Users/christinating/.rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
from /Users/christinating/.rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/tsort.rb:418:in `block (2 levels) in each_strongly_connected_component_from'
from /Users/christinating/.rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/tsort.rb:427:in `each_strongly_connected_component_from'
from /Users/christinating/.rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/tsort.rb:417:in `block in each_strongly_connected_component_from'
from /Users/christinating/.rvm/gems/ruby-2.1.3/gems/railties-4.1.0/lib/rails/initializable.rb:44:in `each'
from /Users/christinating/.rvm/gems/ruby-2.1.3/gems/railties-4.1.0/lib/rails/initializable.rb:44:in `tsort_each_child'
from /Users/christinating/.rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/tsort.rb:411:in `call'
from /Users/christinating/.rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/tsort.rb:411:in `each_strongly_connected_component_from'
from /Users/christinating/.rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/tsort.rb:347:in `block in each_strongly_connected_component'
from /Users/christinating/.rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/tsort.rb:345:in `each'
from /Users/christinating/.rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/tsort.rb:345:in `call'
from /Users/christinating/.rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/tsort.rb:345:in `each_strongly_connected_component'
from /Users/christinating/.rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/tsort.rb:224:in `tsort_each'
from /Users/christinating/.rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/tsort.rb:205:in `tsort_each'
from /Users/christinating/.rvm/gems/ruby-2.1.3/gems/railties-4.1.0/lib/rails/initializable.rb:54:in `run_initializers'
from /Users/christinating/.rvm/gems/ruby-2.1.3/gems/railties-4.1.0/lib/rails/application.rb:288:in `initialize!'
from /Users/christinating/.rvm/gems/ruby-2.1.3/gems/railties-4.1.0/lib/rails/railtie.rb:194:in `public_send'
from /Users/christinating/.rvm/gems/ruby-2.1.3/gems/railties-4.1.0/lib/rails/railtie.rb:194:in `method_missing'
from /Users/christinating/scholarhood/config/environment.rb:5:in `<top (required)>'
from /Users/christinating/.rvm/gems/ruby-2.1.3/gems/activesupport-4.1.0/lib/active_support/dependencies.rb:247:in `require'
from /Users/christinating/.rvm/gems/ruby-2.1.3/gems/activesupport-4.1.0/lib/active_support/dependencies.rb:247:in `block in require'
from /Users/christinating/.rvm/gems/ruby-2.1.3/gems/activesupport-4.1.0/lib/active_support/dependencies.rb:232:in `load_dependency'
from /Users/christinating/.rvm/gems/ruby-2.1.3/gems/activesupport-4.1.0/lib/active_support/dependencies.rb:247:in `require'
from /Users/christinating/scholarhood/config.ru:11:in `block in <main>'
from /Users/christinating/.rvm/gems/ruby-2.1.3/gems/rack-1.5.2/lib/rack/builder.rb:55:in `instance_eval'
from /Users/christinating/.rvm/gems/ruby-2.1.3/gems/rack-1.5.2/lib/rack/builder.rb:55:in `initialize'
from /Users/christinating/scholarhood/config.ru:in `new'
from /Users/christinating/scholarhood/config.ru:in `<main>'
from /Users/christinating/.rvm/gems/ruby-2.1.3/gems/rack-1.5.2/lib/rack/builder.rb:49:in `eval'
from /Users/christinating/.rvm/gems/ruby-2.1.3/gems/rack-1.5.2/lib/rack/builder.rb:49:in `new_from_string'
from /Users/christinating/.rvm/gems/ruby-2.1.3/gems/rack-1.5.2/lib/rack/builder.rb:40:in `parse_file'
from /Users/christinating/.rvm/gems/ruby-2.1.3/gems/rack-1.5.2/lib/rack/server.rb:277:in `build_app_and_options_from_config'
from /Users/christinating/.rvm/gems/ruby-2.1.3/gems/rack-1.5.2/lib/rack/server.rb:199:in `app'
from /Users/christinating/.rvm/gems/ruby-2.1.3/gems/railties-4.1.0/lib/rails/commands/server.rb:50:in `app'
from /Users/christinating/.rvm/gems/ruby-2.1.3/gems/rack-1.5.2/lib/rack/server.rb:314:in `wrapped_app'
from /Users/christinating/.rvm/gems/ruby-2.1.3/gems/railties-4.1.0/lib/rails/commands/server.rb:130:in `log_to_stdout'
from /Users/christinating/.rvm/gems/ruby-2.1.3/gems/railties-4.1.0/lib/rails/commands/server.rb:67:in `start'
from /Users/christinating/.rvm/gems/ruby-2.1.3/gems/railties-4.1.0/lib/rails/commands/commands_tasks.rb:81:in `block in server'
from /Users/christinating/.rvm/gems/ruby-2.1.3/gems/railties-4.1.0/lib/rails/commands/commands_tasks.rb:76:in `tap'
from /Users/christinating/.rvm/gems/ruby-2.1.3/gems/railties-4.1.0/lib/rails/commands/commands_tasks.rb:76:in `server'
from /Users/christinating/.rvm/gems/ruby-2.1.3/gems/railties-4.1.0/lib/rails/commands/commands_tasks.rb:40:in `run_command!'
from /Users/christinating/.rvm/gems/ruby-2.1.3/gems/railties-4.1.0/lib/rails/commands.rb:17:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
This project requires version ruby 2.1.3 to work though.
Can anyone please help me?
According to the error message:
config.allow_comments is no longer provided in ActiveAdmin 1.x. Use config.comments instead.
So, you need to edit config/initializers/active_admin.rb and change:
config.allow_comments
to:
config.comments

Rails server exits on startup. (Rails 4.0.2)

Rails server suddenly keeps exiting on startup. Though it worked perfectly a little while ago. I haven't tweaked anything since.
=> 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
/home/kavya/.rvm/gems/ruby-2.1.0/gems/actionpack-4.0.2/lib/action_dispatch/routing/mapper.rb:229:in `default_controller_and_action': missing :controller (ArgumentError)
from /home/kavya/.rvm/gems/ruby-2.1.0/gems/actionpack-4.0.2/lib/action_dispatch/routing/mapper.rb:116:in `normalize_options!'
from /home/kavya/.rvm/gems/ruby-2.1.0/gems/actionpack-4.0.2/lib/action_dispatch/routing/mapper.rb:64:in `initialize'
from /home/kavya/.rvm/gems/ruby-2.1.0/gems/actionpack-4.0.2/lib/action_dispatch/routing/mapper.rb:1443:in `new'
from /home/kavya/.rvm/gems/ruby-2.1.0/gems/actionpack-4.0.2/lib/action_dispatch/routing/mapper.rb:1443:in `add_route'
from /home/kavya/.rvm/gems/ruby-2.1.0/gems/actionpack-4.0.2/lib/action_dispatch/routing/mapper.rb:1422:in `decomposed_match'
from /home/kavya/.rvm/gems/ruby-2.1.0/gems/actionpack-4.0.2/lib/action_dispatch/routing/mapper.rb:1403:in `block in match'
from /home/kavya/.rvm/gems/ruby-2.1.0/gems/actionpack-4.0.2/lib/action_dispatch/routing/mapper.rb:1394:in `each'
from /home/kavya/.rvm/gems/ruby-2.1.0/gems/actionpack-4.0.2/lib/action_dispatch/routing/mapper.rb:1394:in `match'
from /home/kavya/.rvm/gems/ruby-2.1.0/gems/actionpack-4.0.2/lib/action_dispatch/routing/mapper.rb:601:in `map_method'
from /home/kavya/.rvm/gems/ruby-2.1.0/gems/actionpack-4.0.2/lib/action_dispatch/routing/mapper.rb:570:in `post'
from /home/kavya/lms/config/routes.rb:11:in `block in <top (required)>'
from /home/kavya/.rvm/gems/ruby-2.1.0/gems/actionpack-4.0.2/lib/action_dispatch/routing/route_set.rb:341:in `instance_exec'
from /home/kavya/.rvm/gems/ruby-2.1.0/gems/actionpack-4.0.2/lib/action_dispatch/routing/route_set.rb:341:in `eval_block'
from /home/kavya/.rvm/gems/ruby-2.1.0/gems/actionpack-4.0.2/lib/action_dispatch/routing/route_set.rb:319:in `draw'
from /home/kavya/lms/config/routes.rb:1:in `<top (required)>'
from /home/kavya/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:223:in `load'
from /home/kavya/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:223:in `block in load'
from /home/kavya/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:214:in `load_dependency'
from /home/kavya/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:223:in `load'
from /home/kavya/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/application/routes_reloader.rb:40:in `block in load_paths'
from /home/kavya/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/application/routes_reloader.rb:40:in `each'
from /home/kavya/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/application/routes_reloader.rb:40:in `load_paths'
from /home/kavya/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/application/routes_reloader.rb:16:in `reload!'
from /home/kavya/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/application/routes_reloader.rb:26:in `block in updater'
from /home/kavya/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.2/lib/active_support/file_update_checker.rb:75:in `call'
from /home/kavya/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.2/lib/active_support/file_update_checker.rb:75:in `execute'
from /home/kavya/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/application/routes_reloader.rb:27:in `updater'
from /home/kavya/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/application/routes_reloader.rb:6:in `execute_if_updated'
from /home/kavya/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/application/finisher.rb:69:in `block in <module:Finisher>'
from /home/kavya/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/initializable.rb:30:in `instance_exec'
from /home/kavya/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/initializable.rb:30:in `run'
from /home/kavya/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/initializable.rb:55:in `block in run_initializers'
from /home/kavya/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:226:in `block in tsort_each'
from /home/kavya/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
from /home/kavya/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:427:in `each_strongly_connected_component_from'
from /home/kavya/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:347:in `block in each_strongly_connected_component'
from /home/kavya/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:345:in `each'
from /home/kavya/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:345:in `call'
from /home/kavya/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:345:in `each_strongly_connected_component'
from /home/kavya/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:224:in `tsort_each'
from /home/kavya/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:205:in `tsort_each'
from /home/kavya/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/initializable.rb:54:in `run_initializers'
from /home/kavya/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/application.rb:215:in `initialize!'
from /home/kavya/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /home/kavya/lms/config/environment.rb:5:in `<top (required)>'
from /home/kavya/lms/config.ru:3:in `require'
from /home/kavya/lms/config.ru:3:in `block in <main>'
from /home/kavya/.rvm/gems/ruby-2.1.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `instance_eval'
from /home/kavya/.rvm/gems/ruby-2.1.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `initialize'
from /home/kavya/lms/config.ru:in `new'
from /home/kavya/lms/config.ru:in `<main>'
from /home/kavya/.rvm/gems/ruby-2.1.0/gems/rack-1.5.2/lib/rack/builder.rb:49:in `eval'
from /home/kavya/.rvm/gems/ruby-2.1.0/gems/rack-1.5.2/lib/rack/builder.rb:49:in `new_from_string'
from /home/kavya/.rvm/gems/ruby-2.1.0/gems/rack-1.5.2/lib/rack/builder.rb:40:in `parse_file'
from /home/kavya/.rvm/gems/ruby-2.1.0/gems/rack-1.5.2/lib/rack/server.rb:277:in `build_app_and_options_from_config'
from /home/kavya/.rvm/gems/ruby-2.1.0/gems/rack-1.5.2/lib/rack/server.rb:199:in `app'
from /home/kavya/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/commands/server.rb:48:in `app'
from /home/kavya/.rvm/gems/ruby-2.1.0/gems/rack-1.5.2/lib/rack/server.rb:314:in `wrapped_app'
from /home/kavya/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/commands/server.rb:75:in `start'
from /home/kavya/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/commands.rb:76:in `block in <top (required)>'
from /home/kavya/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/commands.rb:71:in `tap'
from /home/kavya/.rvm/gems/ruby-2.1.0/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>'
As you can refer here..
Why is my development server not loading? default_controller_and_action': missing :action (ArgumentError)
It's because of syntax problem under config/routes.rb in your application:
Check your routes you may find like for example while defining controller#action in routes like below..
Syntax should not be like:
root :to => 'home/index'
Syntax should be like:
root :to => 'home#index'

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

Resources