Sidekiq fails to start when have I have admin model - ruby

I am using sidekiq to process the background jobs and it is not the first time I am using sidekiq.
Problem:
Sidekiq won't start if I have a devise model named admin.
class Admin < ActiveRecord::Base
# Include default devise modules. Others available are:
# :confirmable, :lockable, :registerable, :timeoutable and :omniauthable
devise :database_authenticatable, :recoverable, :rememberable, :trackable, :validatable
end
If I comment this "admin" model class then sidekiq would start normally works as expected. For now I am using sidekiq default configuration.
Error Backtrace:
bundle exec sidekiq
Admin is not a class
/home/ninja/workspace/howismyschool/app/models/admin.rb:1:in `<top (required)>'
/home/ninja/.rvm/gems/ruby-2.1.2#howismyschoolisdoing/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:443:in `load'
/home/ninja/.rvm/gems/ruby-2.1.2#howismyschoolisdoing/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:443:in `block in load_file'
/home/ninja/.rvm/gems/ruby-2.1.2#howismyschoolisdoing/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:633:in `new_constants_in'
/home/ninja/.rvm/gems/ruby-2.1.2#howismyschoolisdoing/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:442:in `load_file'
/home/ninja/.rvm/gems/ruby-2.1.2#howismyschoolisdoing/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:342:in `require_or_load'
/home/ninja/.rvm/gems/ruby-2.1.2#howismyschoolisdoing/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:307:in `depend_on'
/home/ninja/.rvm/gems/ruby-2.1.2#howismyschoolisdoing/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:225:in `require_dependency'
/home/ninja/.rvm/gems/ruby-2.1.2#howismyschoolisdoing/gems/railties-4.1.4/lib/rails/engine.rb:468:in `block (2 levels) in eager_load!'
/home/ninja/.rvm/gems/ruby-2.1.2#howismyschoolisdoing/gems/railties-4.1.4/lib/rails/engine.rb:467:in `each'
/home/ninja/.rvm/gems/ruby-2.1.2#howismyschoolisdoing/gems/railties-4.1.4/lib/rails/engine.rb:467:in `block in eager_load!'
/home/ninja/.rvm/gems/ruby-2.1.2#howismyschoolisdoing/gems/railties-4.1.4/lib/rails/engine.rb:465:in `each'
/home/ninja/.rvm/gems/ruby-2.1.2#howismyschoolisdoing/gems/railties-4.1.4/lib/rails/engine.rb:465:in `eager_load!'
/home/ninja/.rvm/gems/ruby-2.1.2#howismyschoolisdoing/gems/railties-4.1.4/lib/rails/engine.rb:346:in `eager_load!'
/home/ninja/.rvm/gems/ruby-2.1.2#howismyschoolisdoing/gems/railties-4.1.4/lib/rails/application/finisher.rb:58:in `each'
/home/ninja/.rvm/gems/ruby-2.1.2#howismyschoolisdoing/gems/railties-4.1.4/lib/rails/application/finisher.rb:58:in `block in <module:Finisher>'
/home/ninja/.rvm/gems/ruby-2.1.2#howismyschoolisdoing/gems/railties-4.1.4/lib/rails/initializable.rb:30:in `instance_exec'
/home/ninja/.rvm/gems/ruby-2.1.2#howismyschoolisdoing/gems/railties-4.1.4/lib/rails/initializable.rb:30:in `run'
/home/ninja/.rvm/gems/ruby-2.1.2#howismyschoolisdoing/gems/railties-4.1.4/lib/rails/initializable.rb:55:in `block in run_initializers'
/home/ninja/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:226:in `block in tsort_each'
/home/ninja/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
/home/ninja/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:427:in `each_strongly_connected_component_from'
/home/ninja/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:347:in `block in each_strongly_connected_component'
/home/ninja/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:345:in `each'
/home/ninja/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:345:in `call'
/home/ninja/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:345:in `each_strongly_connected_component'
/home/ninja/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:224:in `tsort_each'
/home/ninja/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:205:in `tsort_each'
/home/ninja/.rvm/gems/ruby-2.1.2#howismyschoolisdoing/gems/railties-4.1.4/lib/rails/initializable.rb:54:in `run_initializers'
/home/ninja/.rvm/gems/ruby-2.1.2#howismyschoolisdoing/gems/railties-4.1.4/lib/rails/application.rb:300:in `initialize!'
/home/ninja/workspace/howismyschool/config/environment.rb:5:in `<top (required)>'
/home/ninja/.rvm/gems/ruby-2.1.2#howismyschoolisdoing/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:247:in `require'
/home/ninja/.rvm/gems/ruby-2.1.2#howismyschoolisdoing/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:247:in `block in require'
/home/ninja/.rvm/gems/ruby-2.1.2#howismyschoolisdoing/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:232:in `load_dependency'
/home/ninja/.rvm/gems/ruby-2.1.2#howismyschoolisdoing/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:247:in `require'
/home/ninja/.rvm/gems/ruby-2.1.2#howismyschoolisdoing/gems/sidekiq-3.2.0/lib/sidekiq/cli.rb:230:in `boot_system'
/home/ninja/.rvm/gems/ruby-2.1.2#howismyschoolisdoing/gems/sidekiq-3.2.0/lib/sidekiq/cli.rb:49:in `run'
/home/ninja/.rvm/gems/ruby-2.1.2#howismyschoolisdoing/gems/sidekiq-3.2.0/bin/sidekiq:8:in `<top (required)>'
/home/ninja/.rvm/gems/ruby-2.1.2#howismyschoolisdoing/bin/sidekiq:23:in `load'
/home/ninja/.rvm/gems/ruby-2.1.2#howismyschoolisdoing/bin/sidekiq:23:in `<main>'
/home/ninja/.rvm/gems/ruby-2.1.2#howismyschoolisdoing/bin/ruby_executable_hooks:15:in `eval'
/home/ninja/.rvm/gems/ruby-2.1.2#howismyschoolisdoing/bin/ruby_executable_hooks:15:in `<main>'
Application Environment:
ruby 2.1.2
rails 4.1.4
Ubuntu 14.04

The error isn't related to sidekiq. is not a class exception most likely caused by naming collision(you defined constant Admin somewhere). Check your project for Admin constant and rename it.
How to reproduce an error in console(irb):
1.9.3-p448 :001 > A = 1
=> 1
1.9.3-p448 :002 > class A
1.9.3-p448 :003?> end
TypeError: A is not a class

Related

Can't start Ruby server, following book "Beginning Rails 4"

I have been following directions in this book (and I made sure I copied everything over correctly). The example I'm working on is making a simple application by first generating a controller, creating an action, and then creating a template. This is just a simple "hello world" example.
The problem: When I enter "rails server" (while in the app folder) in my Terminal, I get a bunch of stuff, but it starts off with an undefined method error. I am posting the stuff below:
admins-MacBook-Pro:hello alexcrisan$ rails server
=> Booting Puma
=> Rails 5.0.0.1 application starting in development on http://localhost:3000
=> Run `rails server -h` for more startup options
Exiting
/Users/alexcrisan/Documents/Beginning Rails 4/hello/config/routes.rb:2:in `block in <top (required)>': undefined method `  get' for #<ActionDispatch::Routing::Mapper:0x007fe383be0a00> (NoMethodError)
from /Users/alexcrisan/.rvm/gems/ruby-2.3.3#global/gems/actionpack-5.0.0.1/lib/action_dispatch/routing/route_set.rb:389:in `instance_exec'
from /Users/alexcrisan/.rvm/gems/ruby-2.3.3#global/gems/actionpack-5.0.0.1/lib/action_dispatch/routing/route_set.rb:389:in `eval_block'
from /Users/alexcrisan/.rvm/gems/ruby-2.3.3#global/gems/actionpack-5.0.0.1/lib/action_dispatch/routing/route_set.rb:371:in `draw'
from /Users/alexcrisan/Documents/Beginning Rails 4/hello/config/routes.rb:1:in `<top (required)>'
from /Users/alexcrisan/.rvm/gems/ruby-2.3.3#global/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:287:in `load'
from /Users/alexcrisan/.rvm/gems/ruby-2.3.3#global/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:287:in `block in load'
from /Users/alexcrisan/.rvm/gems/ruby-2.3.3#global/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:259:in `load_dependency'
from /Users/alexcrisan/.rvm/gems/ruby-2.3.3#global/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:287:in `load'
from /Users/alexcrisan/.rvm/gems/ruby-2.3.3#global/gems/railties-5.0.0.1/lib/rails/application/routes_reloader.rb:40:in `block in load_paths'
from /Users/alexcrisan/.rvm/gems/ruby-2.3.3#global/gems/railties-5.0.0.1/lib/rails/application/routes_reloader.rb:40:in `each'
from /Users/alexcrisan/.rvm/gems/ruby-2.3.3#global/gems/railties-5.0.0.1/lib/rails/application/routes_reloader.rb:40:in `load_paths'
from /Users/alexcrisan/.rvm/gems/ruby-2.3.3#global/gems/railties-5.0.0.1/lib/rails/application/routes_reloader.rb:16:in `reload!'
from /Users/alexcrisan/.rvm/gems/ruby-2.3.3#global/gems/railties-5.0.0.1/lib/rails/application/routes_reloader.rb:26:in `block in updater'
from /Users/alexcrisan/.rvm/gems/ruby-2.3.3#global/gems/activesupport-5.0.0.1/lib/active_support/file_update_checker.rb:77:in `execute'
from /Users/alexcrisan/.rvm/gems/ruby-2.3.3#global/gems/railties-5.0.0.1/lib/rails/application/routes_reloader.rb:27:in `updater'
from /Users/alexcrisan/.rvm/gems/ruby-2.3.3#global/gems/railties-5.0.0.1/lib/rails/application/routes_reloader.rb:7:in `execute_if_updated'
from /Users/alexcrisan/.rvm/gems/ruby-2.3.3#global/gems/railties-5.0.0.1/lib/rails/application/finisher.rb:119:in `block in <module:Finisher>'
from /Users/alexcrisan/.rvm/gems/ruby-2.3.3#global/gems/railties-5.0.0.1/lib/rails/initializable.rb:30:in `instance_exec'
from /Users/alexcrisan/.rvm/gems/ruby-2.3.3#global/gems/railties-5.0.0.1/lib/rails/initializable.rb:30:in `run'
from /Users/alexcrisan/.rvm/gems/ruby-2.3.3#global/gems/railties-5.0.0.1/lib/rails/initializable.rb:55:in `block in run_initializers'
from /Users/alexcrisan/.rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/tsort.rb:228:in `block in tsort_each'
from /Users/alexcrisan/.rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
from /Users/alexcrisan/.rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/tsort.rb:431:in `each_strongly_connected_component_from'
from /Users/alexcrisan/.rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/tsort.rb:349:in `block in each_strongly_connected_component'
from /Users/alexcrisan/.rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/tsort.rb:347:in `each'
from /Users/alexcrisan/.rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/tsort.rb:347:in `call'
from /Users/alexcrisan/.rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/tsort.rb:347:in `each_strongly_connected_component'
from /Users/alexcrisan/.rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/tsort.rb:226:in `tsort_each'
from /Users/alexcrisan/.rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/tsort.rb:205:in `tsort_each'
from /Users/alexcrisan/.rvm/gems/ruby-2.3.3#global/gems/railties-5.0.0.1/lib/rails/initializable.rb:54:in `run_initializers'
from /Users/alexcrisan/.rvm/gems/ruby-2.3.3#global/gems/railties-5.0.0.1/lib/rails/application.rb:352:in `initialize!'
from /Users/alexcrisan/Documents/Beginning Rails 4/hello/config/environment.rb:5:in `<top (required)>'
from /Users/alexcrisan/Documents/Beginning Rails 4/hello/config.ru:3:in `require_relative'
from /Users/alexcrisan/Documents/Beginning Rails 4/hello/config.ru:3:in `block in <main>'
from /Users/alexcrisan/.rvm/gems/ruby-2.3.3#global/gems/rack-2.0.1/lib/rack/builder.rb:55:in `instance_eval'
from /Users/alexcrisan/.rvm/gems/ruby-2.3.3#global/gems/rack-2.0.1/lib/rack/builder.rb:55:in `initialize'
from /Users/alexcrisan/Documents/Beginning Rails 4/hello/config.ru:in `new'
from /Users/alexcrisan/Documents/Beginning Rails 4/hello/config.ru:in `<main>'
from /Users/alexcrisan/.rvm/gems/ruby-2.3.3#global/gems/rack-2.0.1/lib/rack/builder.rb:49:in `eval'
from /Users/alexcrisan/.rvm/gems/ruby-2.3.3#global/gems/rack-2.0.1/lib/rack/builder.rb:49:in `new_from_string'
from /Users/alexcrisan/.rvm/gems/ruby-2.3.3#global/gems/rack-2.0.1/lib/rack/builder.rb:40:in `parse_file'
from /Users/alexcrisan/.rvm/gems/ruby-2.3.3#global/gems/rack-2.0.1/lib/rack/server.rb:318:in `build_app_and_options_from_config'
from /Users/alexcrisan/.rvm/gems/ruby-2.3.3#global/gems/rack-2.0.1/lib/rack/server.rb:218:in `app'
from /Users/alexcrisan/.rvm/gems/ruby-2.3.3#global/gems/railties-5.0.0.1/lib/rails/commands/server.rb:59:in `app'
from /Users/alexcrisan/.rvm/gems/ruby-2.3.3#global/gems/rack-2.0.1/lib/rack/server.rb:353:in `wrapped_app'
from /Users/alexcrisan/.rvm/gems/ruby-2.3.3#global/gems/railties-5.0.0.1/lib/rails/commands/server.rb:124:in `log_to_stdout'
from /Users/alexcrisan/.rvm/gems/ruby-2.3.3#global/gems/railties-5.0.0.1/lib/rails/commands/server.rb:77:in `start'
from /Users/alexcrisan/.rvm/gems/ruby-2.3.3#global/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:90:in `block in server'
from /Users/alexcrisan/.rvm/gems/ruby-2.3.3#global/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:85:in `tap'
from /Users/alexcrisan/.rvm/gems/ruby-2.3.3#global/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:85:in `server'
from /Users/alexcrisan/.rvm/gems/ruby-2.3.3#global/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:49:in `run_command!'
from /Users/alexcrisan/.rvm/gems/ruby-2.3.3#global/gems/railties-5.0.0.1/lib/rails/commands.rb:18:in `<top (required)>'
from /Users/alexcrisan/Documents/Beginning Rails 4/hello/bin/rails:9:in `require'
from /Users/alexcrisan/Documents/Beginning Rails 4/hello/bin/rails:9:in `<top (required)>'
from /Users/alexcrisan/.rvm/gems/ruby-2.3.3/gems/spring-2.0.0/lib/spring/client/rails.rb:28:in `load'
from /Users/alexcrisan/.rvm/gems/ruby-2.3.3/gems/spring-2.0.0/lib/spring/client/rails.rb:28:in `call'
from /Users/alexcrisan/.rvm/gems/ruby-2.3.3/gems/spring-2.0.0/lib/spring/client/command.rb:7:in `call'
from /Users/alexcrisan/.rvm/gems/ruby-2.3.3/gems/spring-2.0.0/lib/spring/client.rb:30:in `run'
from /Users/alexcrisan/.rvm/gems/ruby-2.3.3/gems/spring-2.0.0/bin/spring:49:in `<top (required)>'
from /Users/alexcrisan/.rvm/gems/ruby-2.3.3/gems/spring-2.0.0/lib/spring/binstub.rb:31:in `load'
from /Users/alexcrisan/.rvm/gems/ruby-2.3.3/gems/spring-2.0.0/lib/spring/binstub.rb:31:in `<top (required)>'
from /Users/alexcrisan/Documents/Beginning Rails 4/hello/bin/spring:14:in `require'
from /Users/alexcrisan/Documents/Beginning Rails 4/hello/bin/spring:14:in `<top (required)>'
from bin/rails:3:in `load'
from bin/rails:3:in `<main>'
I'm not sure why it's doing this, so any help is appreciated!
Thanks
The error says undefined method ` get' for .
This is due to the extra spaces before 'get'. Remove them and I think you should be good to go.

undefined method `rescue_responses' for ActionDispatch::ShowExceptions:Class (NoMethodError)

In my ruby 2.3.1, I get this error:
=> Booting WEBrick
=> Rails 4.2.6 application starting in development on http://localhost:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
Exiting
/root/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/will_paginate-3.0.pre2/lib/will_paginate/railtie.rb:15:in `block in <class:Railtie>': uninitialized constant WillPaginate::Railtie::Forbidden (NameError)
from /root/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-4.2.6/lib/rails/initializable.rb:30:in `instance_exec'
from /root/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-4.2.6/lib/rails/initializable.rb:30:in `run'
from /root/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-4.2.6/lib/rails/initializable.rb:55:in `block in run_initializers'
from /root/.rbenv/versions/2.3.1/lib/ruby/2.3.0/tsort.rb:228:in `block in tsort_each'
from /root/.rbenv/versions/2.3.1/lib/ruby/2.3.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
from /root/.rbenv/versions/2.3.1/lib/ruby/2.3.0/tsort.rb:431:in `each_strongly_connected_component_from'
from /root/.rbenv/versions/2.3.1/lib/ruby/2.3.0/tsort.rb:349:in `block in each_strongly_connected_component'
from /root/.rbenv/versions/2.3.1/lib/ruby/2.3.0/tsort.rb:347:in `each'
from /root/.rbenv/versions/2.3.1/lib/ruby/2.3.0/tsort.rb:347:in `call'
from /root/.rbenv/versions/2.3.1/lib/ruby/2.3.0/tsort.rb:347:in `each_strongly_connected_component'
from /root/.rbenv/versions/2.3.1/lib/ruby/2.3.0/tsort.rb:226:in `tsort_each'
from /root/.rbenv/versions/2.3.1/lib/ruby/2.3.0/tsort.rb:205:in `tsort_each'
from /root/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-4.2.6/lib/rails/initializable.rb:54:in `run_initializers'
from /root/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-4.2.6/lib/rails/application.rb:352:in `initialize!'
from /home/bistipweb/config/environment.rb:5:in `<top (required)>'
from /root/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/polyglot-0.3.1/lib/polyglot.rb:64:in `require'
from /root/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/polyglot-0.3.1/lib/polyglot.rb:64:in `require'
from /home/bistipweb/config.ru:3:in `block in <main>'
from /root/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rack-1.6.0/lib/rack/builder.rb:55:in `instance_eval'
from /root/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rack-1.6.0/lib/rack/builder.rb:55:in `initialize'
from /home/bistipweb/config.ru:in `new'
from /home/bistipweb/config.ru:in `<main>'
from /root/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rack-1.6.0/lib/rack/builder.rb:49:in `eval'
from /root/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rack-1.6.0/lib/rack/builder.rb:49:in `new_from_string'
from /root/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rack-1.6.0/lib/rack/builder.rb:40:in `parse_file'
from /root/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rack-1.6.0/lib/rack/server.rb:299:in `build_app_and_options_from_config'
from /root/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rack-1.6.0/lib/rack/server.rb:208:in `app'
from /root/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-4.2.6/lib/rails/commands/server.rb:61:in `app'
from /root/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rack-1.6.0/lib/rack/server.rb:336:in `wrapped_app'
from /root/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-4.2.6/lib/rails/commands/server.rb:139:in `log_to_stdout'
from /root/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-4.2.6/lib/rails/commands/server.rb:78:in `start'
from /root/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:80:in `block in server'
from /root/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:75:in `tap'
from /root/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:75:in `server'
from /root/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from /root/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-4.2.6/lib/rails/commands.rb:17:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
My railtie.rb is:
require 'will_paginate'
require 'will_paginate/collection'
module WillPaginate
class Railtie < Rails::Railtie
initializer "will_paginate.active_record" do |app|
if defined? ::ActiveRecord
require 'will_paginate/finders/active_record'
WillPaginate::Finders::ActiveRecord.enable!
end
end
initializer "will_paginate.action_dispatch" do |app|
if defined?(ActionController::Base)
config.action_dispatch.rescue_responses.update('ActionController::Forbidden'=>Forbidden)
end
end
initializer "will_paginate.action_view" do |app|
require 'will_paginate/view_helpers/action_view'
ActionView::Base.send(:include, WillPaginate::ViewHelpers::ActionView)
end
end
end
How can I fix it?
You don't have to add any initializer codes for hooking will_paginate into Rails project, if you are using recent will_paginate versions.
I see you are using 3.0.pre2 version, update it to 3.0.7 in your Gemfile, bundle update will_paginate and remove all the codes you added in railtie.rb, I think everything would be ok.
Try:
initializer "will_paginate.action_dispatch" do |app|
if defined?(ActionController::Base)
config.action_dispatch.rescue_responses.update('ActionController::Forbidden'=>Forbidden)
end
end
I do not find any reason for you to add railtie.rb file. I believe just adding the gem and using it in your view should work.

Neoid error when starting Rails server

Having looked into it, and as a relative newbie to graph databases, I've decided that Neoid may be the best way to benefit from Neo4j at this stage. I've come across a problem straight after installing it, on starting up the server. I've installed the gem, added the 01_neo4j.rb file as stated on the github page, added the relevant columns to the models and get the following error:
=> 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
C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/open-uri.rb:35:in `initialize': No such file or directory - /dev/null (Errno::ENOENT)
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/open-uri.rb:35:in `open'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/open-uri.rb:35:in `open'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/logger.rb:599:in `create_logfile'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/logger.rb:594:in `open_logfile'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/logger.rb:549:in `initialize'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/logger.rb:314:in `new'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/logger.rb:314:in `initialize'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/neoid-0.1.2/lib/neoid.rb:73:in `new'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/neoid-0.1.2/lib/neoid.rb:73:in `logger'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/neoid-0.1.2/lib/neoid.rb:52:in `initialize_all'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/neoid-0.1.2/lib/neoid/railtie.rb:7:in `block (2 levels) in <class:Railtie>'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-4.0.2/lib/active_support/lazy_load_hooks.rb:36:in `call'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-4.0.2/lib/active_support/lazy_load_hooks.rb:36:in `execute_hook'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-4.0.2/lib/active_support/lazy_load_hooks.rb:45:in `block in run_load_hooks'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-4.0.2/lib/active_support/lazy_load_hooks.rb:44:in `each'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-4.0.2/lib/active_support/lazy_load_hooks.rb:44:in `run_load_hooks'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-4.0.2/lib/rails/application/finisher.rb:62:in `block in <module:Finisher>'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-4.0.2/lib/rails/initializable.rb:30:in `instance_exec'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-4.0.2/lib/rails/initializable.rb:30:in `run'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-4.0.2/lib/rails/initializable.rb:55:in `block in run_initializers'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/tsort.rb:150:in `block in tsort_each'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/tsort.rb:183:in `block (2 levels) in each_strongly_connected_component'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/tsort.rb:219:in `each_strongly_connected_component_from'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/tsort.rb:182:in `block in each_strongly_connected_component'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/tsort.rb:180:in `each'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/tsort.rb:180:in `each_strongly_connected_component'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/tsort.rb:148:in `tsort_each'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-4.0.2/lib/rails/initializable.rb:54:in `run_initializers'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-4.0.2/lib/rails/application.rb:215:in `initialize!'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-4.0.2/lib/rails/railtie/configurable.rb:30:in `method_missing'
from C:/Sites/Knock4/config/environment.rb:5:in `<top (required)>'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `require'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `block in require'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:214:in `load_dependency'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `require'
from C:/Sites/Knock4/config.ru:3:in `block in <main>'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rack-1.5.2/lib/rack/builder.rb:55:in `instance_eval'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rack-1.5.2/lib/rack/builder.rb:55:in `initialize'
from C:/Sites/Knock4/config.ru:in `new'
from C:/Sites/Knock4/config.ru:in `<main>'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rack-1.5.2/lib/rack/builder.rb:49:in `eval'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rack-1.5.2/lib/rack/builder.rb:49:in `new_from_string'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rack-1.5.2/lib/rack/builder.rb:40:in `parse_file'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rack-1.5.2/lib/rack/server.rb:277:in `build_app_and_options_from_config'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rack-1.5.2/lib/rack/server.rb:199:in `app'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-4.0.2/lib/rails/commands/server.rb:48:in `app'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rack-1.5.2/lib/rack/server.rb:314:in `wrapped_app'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-4.0.2/lib/rails/commands/server.rb:75:in `start'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-4.0.2/lib/rails/commands.rb:76:in `block in <top (required)>'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-4.0.2/lib/rails/commands.rb:71:in `tap'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/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>'
If anyone has any idea what the problem might be here, I would appreciate it. I'm using Rails 4.0.2 (as you can probably see), so not sure if this is an issue.
The error reference shows the following code:
def open(name, *rest, &block) # :doc:
if name.respond_to?(:open)
name.open(*rest, &block)
elsif name.respond_to?(:to_str) &&
%r{\A[A-Za-z][A-Za-z0-9+\-\.]*://} =~ name &&
(uri = URI.parse(name)).respond_to?(:open)
uri.open(*rest, &block)
else
open_uri_original_open(name, *rest, &block)
end
end
With
open_uri_original_open(name, *rest, &block)
being line 35. I have no idea what this means though!
This is caused, on windows, by neoid 0.1.2 which assumes you are on unix and so the standard logger redirects to dev/null. So you must define
ENV['NEOID_LOG'] ||= 'true'
ENV['NEOID_LOG_FILE'] ||= 'log/neoid.log'
and the log will be in the log folders.

Trouble installing Devise gem

I just attempted installing devise and had some trouble. From previous experience I know that when I install it I am required to do some manual steps. Well this time there where no manual steps but I still did them because I know they had to be done. So everything is working fine but then I run rails g devise: views this returns
/Users/henrywyatt/.rvm/gems/ruby-2.0.0-p353/gems/devise-3.2.2/lib/devise/rails/routes.rb:469:in `raise_no_secret_key': Devise.secret_key was not set.
Please add the following to your Devise initializer: (RuntimeError)
config.secret_key = '1ef096dceb32ce5af3b11a7ef99c00ab59b7ad90ed5dbacabe5e8cb8613e437799333b96e2045997d701a1ed1b1fde537b98f6ef1c64d247516b85c9410ad147'
Please ensure you restarted your application after installing Devise or setting the key.
from /Users/henrywyatt/.rvm/gems/ruby-2.0.0-p353/gems/devise-3.2.2/lib/devise/rails/routes.rb:203:in `devise_for'
from /Users/henrywyatt/Desktop/pinteresting/config/routes.rb:2:in `block in <top (required)>'
from /Users/henrywyatt/.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/henrywyatt/.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/henrywyatt/.rvm/gems/ruby-2.0.0-p353/gems/actionpack-4.0.2/lib/action_dispatch/routing/route_set.rb:319:in `draw'
from /Users/henrywyatt/Desktop/pinteresting/config/routes.rb:1:in `<top (required)>'
from /Users/henrywyatt/.rvm/gems/ruby-2.0.0-p353/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:223:in `load'
from /Users/henrywyatt/.rvm/gems/ruby-2.0.0-p353/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:223:in `block in load'
from /Users/henrywyatt/.rvm/gems/ruby-2.0.0-p353/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:214:in `load_dependency'
from /Users/henrywyatt/.rvm/gems/ruby-2.0.0-p353/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:223:in `load'
from /Users/henrywyatt/.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/henrywyatt/.rvm/gems/ruby-2.0.0-p353/gems/railties-4.0.2/lib/rails/application/routes_reloader.rb:40:in `each'
from /Users/henrywyatt/.rvm/gems/ruby-2.0.0-p353/gems/railties-4.0.2/lib/rails/application/routes_reloader.rb:40:in `load_paths'
from /Users/henrywyatt/.rvm/gems/ruby-2.0.0-p353/gems/railties-4.0.2/lib/rails/application/routes_reloader.rb:16:in `reload!'
from /Users/henrywyatt/.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/henrywyatt/.rvm/gems/ruby-2.0.0-p353/gems/activesupport-4.0.2/lib/active_support/file_update_checker.rb:75:in `call'
from /Users/henrywyatt/.rvm/gems/ruby-2.0.0-p353/gems/activesupport-4.0.2/lib/active_support/file_update_checker.rb:75:in `execute'
from /Users/henrywyatt/.rvm/gems/ruby-2.0.0-p353/gems/railties-4.0.2/lib/rails/application/routes_reloader.rb:27:in `updater'
from /Users/henrywyatt/.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/henrywyatt/.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/henrywyatt/.rvm/gems/ruby-2.0.0-p353/gems/railties-4.0.2/lib/rails/initializable.rb:30:in `instance_exec'
from /Users/henrywyatt/.rvm/gems/ruby-2.0.0-p353/gems/railties-4.0.2/lib/rails/initializable.rb:30:in `run'
from /Users/henrywyatt/.rvm/gems/ruby-2.0.0-p353/gems/railties-4.0.2/lib/rails/initializable.rb:55:in `block in run_initializers'
from /Users/henrywyatt/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/tsort.rb:150:in `block in tsort_each'
from /Users/henrywyatt/.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/henrywyatt/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/tsort.rb:219:in `each_strongly_connected_component_from'
from /Users/henrywyatt/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/tsort.rb:182:in `block in each_strongly_connected_component'
from /Users/henrywyatt/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/tsort.rb:180:in `each'
from /Users/henrywyatt/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/tsort.rb:180:in `each_strongly_connected_component'
from /Users/henrywyatt/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/tsort.rb:148:in `tsort_each'
from /Users/henrywyatt/.rvm/gems/ruby-2.0.0-p353/gems/railties-4.0.2/lib/rails/initializable.rb:54:in `run_initializers'
from /Users/henrywyatt/.rvm/gems/ruby-2.0.0-p353/gems/railties-4.0.2/lib/rails/application.rb:215:in `initialize!'
from /Users/henrywyatt/.rvm/gems/ruby-2.0.0-p353/gems/railties-4.0.2/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /Users/henrywyatt/Desktop/pinteresting/config/environment.rb:5:in `<top (required)>'
from /Users/henrywyatt/.rvm/gems/ruby-2.0.0-p353/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `require'
from /Users/henrywyatt/.rvm/gems/ruby-2.0.0-p353/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `block in require'
from /Users/henrywyatt/.rvm/gems/ruby-2.0.0-p353/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:214:in `load_dependency'
from /Users/henrywyatt/.rvm/gems/ruby-2.0.0-p353/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `require'
from /Users/henrywyatt/.rvm/gems/ruby-2.0.0-p353/gems/railties-4.0.2/lib/rails/application.rb:189:in `require_environment!'
from /Users/henrywyatt/.rvm/gems/ruby-2.0.0-p353/gems/railties-4.0.2/lib/rails/commands.rb:44:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
You need to add
config.secret_key = '1ef096dceb32ce5af3b11a7ef99c00ab59b7ad90ed5dbacabe5e8cb8613e437799333b96e204599‌​7d701a1ed1b1fde537b98f6ef1c64d247516b85c9410ad147'
to your devise file (config/initializers/devise_initializer.rb).
if you are on production dont put this in any config file rather put it as environment variable
rails 4 have one secret.yml file in which there is a line
secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
you just need to set ENV["SECRET_KEY_BASE"]
I am not sure but secret key is any string
I too had the same problem
but resolved it after restarting my rails server

Error when monkey patching ActionDispatch::Routing in Rails 3.1 with autoload_path

Similar to the Gem tasteful-routes (https://github.com/icelab/tasteful-routes/blob/master/lib/tasteful_routes/mapper.rb) I wanted to be able to add some methods as routing helpers.
I have a file lib/action_dispatch/routing/mapper.rb which contains
puts "In mapper.rb"
module ActionDispatch::Routing
class Mapper
module NorthStar
def star(controller)
puts "Testing!"
end
end
include NorthStar
end
end
To autoload this I placed the following in config/application.rb
config.autoload_paths += Dir["#{config.root}/lib/**/"]
When I try to run Rails, I run into an issue.
20 ~/Dropbox/Development/RailsPlayground/site$ rails s
=> Booting WEBrick
=> Rails 3.1.0.rc3 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
In mapper.rb
Exiting
/Users/basicxman/.rvm/gems/ruby-1.9.2-p136/gems/actionpack-3.1.0.rc3/lib/sprockets/railtie.rb:40:in `block (2 levels) in <class:Railtie>': undefined method `mount' for #<ActionDispatch::Routing::Mapper:0x00000100933b30> (NoMethodError)
from /Users/basicxman/.rvm/gems/ruby-1.9.2-p136/gems/actionpack-3.1.0.rc3/lib/action_dispatch/routing/route_set.rb:257:in `instance_exec'
from /Users/basicxman/.rvm/gems/ruby-1.9.2-p136/gems/actionpack-3.1.0.rc3/lib/action_dispatch/routing/route_set.rb:257:in `eval_block'
from /Users/basicxman/.rvm/gems/ruby-1.9.2-p136/gems/actionpack-3.1.0.rc3/lib/action_dispatch/routing/route_set.rb:276:in `block in clear!'
from /Users/basicxman/.rvm/gems/ruby-1.9.2-p136/gems/actionpack-3.1.0.rc3/lib/action_dispatch/routing/route_set.rb:276:in `each'
from /Users/basicxman/.rvm/gems/ruby-1.9.2-p136/gems/actionpack-3.1.0.rc3/lib/action_dispatch/routing/route_set.rb:276:in `clear!'
from /Users/basicxman/.rvm/gems/ruby-1.9.2-p136/gems/railties-3.1.0.rc3/lib/rails/application/routes_reloader.rb:24:in `block in clear!'
from /Users/basicxman/.rvm/gems/ruby-1.9.2-p136/gems/railties-3.1.0.rc3/lib/rails/application/routes_reloader.rb:22:in `each'
from /Users/basicxman/.rvm/gems/ruby-1.9.2-p136/gems/railties-3.1.0.rc3/lib/rails/application/routes_reloader.rb:22:in `clear!'
from /Users/basicxman/.rvm/gems/ruby-1.9.2-p136/gems/railties-3.1.0.rc3/lib/rails/application/routes_reloader.rb:12:in `reload!'
from /Users/basicxman/.rvm/gems/ruby-1.9.2-p136/gems/railties-3.1.0.rc3/lib/rails/application/routes_reloader.rb:7:in `block in initialize'
from /Users/basicxman/.rvm/gems/ruby-1.9.2-p136/gems/activesupport-3.1.0.rc3/lib/active_support/file_update_checker.rb:32:in `call'
from /Users/basicxman/.rvm/gems/ruby-1.9.2-p136/gems/activesupport-3.1.0.rc3/lib/active_support/file_update_checker.rb:32:in `execute_if_updated'
from /Users/basicxman/.rvm/gems/ruby-1.9.2-p136/gems/railties-3.1.0.rc3/lib/rails/application/finisher.rb:63:in `block (2 levels) in <module:Finisher>'
from /Users/basicxman/.rvm/gems/ruby-1.9.2-p136/gems/railties-3.1.0.rc3/lib/rails/application/finisher.rb:64:in `call'
from /Users/basicxman/.rvm/gems/ruby-1.9.2-p136/gems/railties-3.1.0.rc3/lib/rails/application/finisher.rb:64:in `block in <module:Finisher>'
from /Users/basicxman/.rvm/gems/ruby-1.9.2-p136/gems/railties-3.1.0.rc3/lib/rails/initializable.rb:25:in `instance_exec'
from /Users/basicxman/.rvm/gems/ruby-1.9.2-p136/gems/railties-3.1.0.rc3/lib/rails/initializable.rb:25:in `run'
from /Users/basicxman/.rvm/gems/ruby-1.9.2-p136/gems/railties-3.1.0.rc3/lib/rails/initializable.rb:50:in `block in run_initializers'
from /Users/basicxman/.rvm/gems/ruby-1.9.2-p136/gems/railties-3.1.0.rc3/lib/rails/initializable.rb:49:in `each'
from /Users/basicxman/.rvm/gems/ruby-1.9.2-p136/gems/railties-3.1.0.rc3/lib/rails/initializable.rb:49:in `run_initializers'
from /Users/basicxman/.rvm/gems/ruby-1.9.2-p136/gems/railties-3.1.0.rc3/lib/rails/application.rb:96:in `initialize!'
from /Users/basicxman/.rvm/gems/ruby-1.9.2-p136/gems/railties-3.1.0.rc3/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /Users/basicxman/Dropbox/Development/RailsPlayground/site/config/environment.rb:5:in `<top (required)>'
from /Users/basicxman/Dropbox/Development/RailsPlayground/site/config.ru:4:in `require'
from /Users/basicxman/Dropbox/Development/RailsPlayground/site/config.ru:4:in `block in <main>'
from /Users/basicxman/.rvm/gems/ruby-1.9.2-p136/gems/rack-1.3.0/lib/rack/builder.rb:51:in `instance_eval'
from /Users/basicxman/.rvm/gems/ruby-1.9.2-p136/gems/rack-1.3.0/lib/rack/builder.rb:51:in `initialize'
from /Users/basicxman/Dropbox/Development/RailsPlayground/site/config.ru:1:in `new'
from /Users/basicxman/Dropbox/Development/RailsPlayground/site/config.ru:1:in `<main>'
from /Users/basicxman/.rvm/gems/ruby-1.9.2-p136/gems/rack-1.3.0/lib/rack/builder.rb:40:in `eval'
from /Users/basicxman/.rvm/gems/ruby-1.9.2-p136/gems/rack-1.3.0/lib/rack/builder.rb:40:in `parse_file'
from /Users/basicxman/.rvm/gems/ruby-1.9.2-p136/gems/rack-1.3.0/lib/rack/server.rb:200:in `app'
from /Users/basicxman/.rvm/gems/ruby-1.9.2-p136/gems/railties-3.1.0.rc3/lib/rails/commands/server.rb:46:in `app'
from /Users/basicxman/.rvm/gems/ruby-1.9.2-p136/gems/rack-1.3.0/lib/rack/server.rb:301:in `wrapped_app'
from /Users/basicxman/.rvm/gems/ruby-1.9.2-p136/gems/rack-1.3.0/lib/rack/server.rb:252:in `start'
from /Users/basicxman/.rvm/gems/ruby-1.9.2-p136/gems/railties-3.1.0.rc3/lib/rails/commands/server.rb:70:in `start'
from /Users/basicxman/.rvm/gems/ruby-1.9.2-p136/gems/railties-3.1.0.rc3/lib/rails/commands.rb:54:in `block in <top (required)>'
from /Users/basicxman/.rvm/gems/ruby-1.9.2-p136/gems/railties-3.1.0.rc3/lib/rails/commands.rb:49:in `tap'
from /Users/basicxman/.rvm/gems/ruby-1.9.2-p136/gems/railties-3.1.0.rc3/lib/rails/commands.rb:49:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'

Resources