I've set up a simple application online on a rackspace cloud server but I'm getting the following error message from phusion passenger:
uninitialized constant ApplicationController (NameError)
/var/www/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-3.2.12/lib/active_support/inflector/methods.rb:230:in `block in constantize'
/var/www/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-3.2.12/lib/active_support/inflector/methods.rb:229:in `each'
/var/www/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-3.2.12/lib/active_support/inflector/methods.rb:229:in `constantize'
/var/www/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-3.2.12/lib/active_support/core_ext/string/inflections.rb:54:in `constantize'
/var/www/.rvm/gems/ruby-1.9.3-p448/gems/devise-2.2.4/app/controllers/devise_controller.rb:2:in `<top (required)>'
/var/www/.rvm/gems/ruby-1.9.3-p448/gems/devise-2.2.4/app/controllers/devise/confirmations_controller.rb:1:in `<top (required)>'
/var/www/.rvm/gems/ruby-1.9.3-p448/gems/railties-3.2.12/lib/rails/engine.rb:439:in `block (2 levels) in eager_load!'
/var/www/.rvm/gems/ruby-1.9.3-p448/gems/railties-3.2.12/lib/rails/engine.rb:438:in `each'
/var/www/.rvm/gems/ruby-1.9.3-p448/gems/railties-3.2.12/lib/rails/engine.rb:438:in `block in eager_load!'
/var/www/.rvm/gems/ruby-1.9.3-p448/gems/railties-3.2.12/lib/rails/engine.rb:436:in `each'
/var/www/.rvm/gems/ruby-1.9.3-p448/gems/railties-3.2.12/lib/rails/engine.rb:436:in `eager_load!'
/var/www/.rvm/gems/ruby-1.9.3-p448/gems/railties-3.2.12/lib/rails/application/railties.rb:8:in `each'
/var/www/.rvm/gems/ruby-1.9.3-p448/gems/railties-3.2.12/lib/rails/application/railties.rb:8:in `all'
/var/www/.rvm/gems/ruby-1.9.3-p448/gems/railties-3.2.12/lib/rails/engine.rb:434:in `eager_load!'
/var/www/.rvm/gems/ruby-1.9.3-p448/gems/railties-3.2.12/lib/rails/application/finisher.rb:53:in `block in <module:Finisher>'
/var/www/.rvm/gems/ruby-1.9.3-p448/gems/railties-3.2.12/lib/rails/initializable.rb:30:in `instance_exec'
/var/www/.rvm/gems/ruby-1.9.3-p448/gems/railties-3.2.12/lib/rails/initializable.rb:30:in `run'
/var/www/.rvm/gems/ruby-1.9.3-p448/gems/railties-3.2.12/lib/rails/initializable.rb:55:in `block in run_initializers'
/var/www/.rvm/gems/ruby-1.9.3-p448/gems/railties-3.2.12/lib/rails/initializable.rb:54:in `each'
/var/www/.rvm/gems/ruby-1.9.3-p448/gems/railties-3.2.12/lib/rails/initializable.rb:54:in `run_initializers'
/var/www/.rvm/gems/ruby-1.9.3-p448/gems/railties-3.2.12/lib/rails/application.rb:136:in `initialize!'
/var/www/.rvm/gems/ruby-1.9.3-p448/gems/railties-3.2.12/lib/rails/railtie/configurable.rb:30:in `method_missing'
/var/www/ideamobb.com/config/environment.rb:5:in `<top (required)>'
config.ru:3:in `require'
config.ru:3:in `block in <main>'
/var/www/.rvm/gems/ruby-1.9.3-p448/gems/rack-1.4.5/lib/rack/builder.rb:51:in `instance_eval'
/var/www/.rvm/gems/ruby-1.9.3-p448/gems/rack-1.4.5/lib/rack/builder.rb:51:in `initialize'
config.ru:1:in `new'
config.ru:1:in `<main>'
/var/www/.rvm/gems/ruby-1.9.3-p448/gems/passenger-4.0.8/helper-scripts/rack-preloader.rb:82:in `eval'
/var/www/.rvm/gems/ruby-1.9.3-p448/gems/passenger-4.0.8/helper-scripts/rack-preloader.rb:82:in `preload_app'
/var/www/.rvm/gems/ruby-1.9.3-p448/gems/passenger-4.0.8/helper-scripts/rack-preloader.rb:127:in `<module:App>'
/var/www/.rvm/gems/ruby-1.9.3-p448/gems/passenger-4.0.8/helper-scripts/rack-preloader.rb:6:in `<module:PhusionPassenger>'
/var/www/.rvm/gems/ruby-1.9.3-p448/gems/passenger-4.0.8/helper-scripts/rack-preloader.rb:5:in `<main>'
I'm not sure whats going on here - the application works perfectly fine on my localhost - all the gems are installed, migrations are cleared - so what exactly might be the problem here?
I think you are missing ApplicationController. All other controllers inherit from this class
A simple application_controller.rb
class ApplicationController < ActionController::Base
end
In my case I misspelled "application" in my routes file. Make sure to check your spelling!
Related
I'm getting this error using Ubuntu + Apache + Passenger.
The problem is that I'm not using any database or model.
undefined method `has_one_attached' for #<Class:0x0000555c6ad94fd8> (NoMethodError)
/usr/local/rvm/gems/ruby-2.5.1/gems/activerecord-5.2.1/lib/active_record/dynamic_matchers.rb:22:in `method_missing'
/usr/local/rvm/gems/ruby-2.5.1/gems/activestorage-5.2.1/app/models/active_storage/blob/representable.rb:7:in `block in <module:Representable>'
/usr/local/rvm/gems/ruby-2.5.1/gems/activesupport-5.2.1/lib/active_support/concern.rb:122:in `class_eval'
/usr/local/rvm/gems/ruby-2.5.1/gems/activesupport-5.2.1/lib/active_support/concern.rb:122:in `append_features'
/usr/local/rvm/gems/ruby-2.5.1/gems/activestorage-5.2.1/app/models/active_storage/blob.rb:23:in `include'
/usr/local/rvm/gems/ruby-2.5.1/gems/activestorage-5.2.1/app/models/active_storage/blob.rb:23:in `<class:Blob>'
/usr/local/rvm/gems/ruby-2.5.1/gems/activestorage-5.2.1/app/models/active_storage/blob.rb:16:in `<main>'
/usr/local/rvm/gems/ruby-2.5.1/gems/bootsnap-1.4.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require'
/usr/local/rvm/gems/ruby-2.5.1/gems/bootsnap-1.4.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `block in require_with_bootsnap_lfi'
/usr/local/rvm/gems/ruby-2.5.1/gems/bootsnap-1.4.1/lib/bootsnap/load_path_cache/loaded_features_index.rb:83:in `register'
/usr/local/rvm/gems/ruby-2.5.1/gems/bootsnap-1.4.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:in `require_with_bootsnap_lfi'
/usr/local/rvm/gems/ruby-2.5.1/gems/bootsnap-1.4.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in `require'
/usr/local/rvm/gems/ruby-2.5.1/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:287:in `block in require'
/usr/local/rvm/gems/ruby-2.5.1/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:253:in `load_dependency'
/usr/local/rvm/gems/ruby-2.5.1/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:287:in `require'
/usr/local/rvm/gems/ruby-2.5.1/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:374:in `block in require_or_load'
/usr/local/rvm/gems/ruby-2.5.1/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:37:in `block in load_interlock'
/usr/local/rvm/gems/ruby-2.5.1/gems/activesupport-5.2.1/lib/active_support/dependencies/interlock.rb:14:in `block in loading'
/usr/local/rvm/gems/ruby-2.5.1/gems/activesupport-5.2.1/lib/active_support/concurrency/share_lock.rb:151:in `exclusive'
/usr/local/rvm/gems/ruby-2.5.1/gems/activesupport-5.2.1/lib/active_support/dependencies/interlock.rb:13:in `loading'
/usr/local/rvm/gems/ruby-2.5.1/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:37:in `load_interlock'
/usr/local/rvm/gems/ruby-2.5.1/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:352:in `require_or_load'
/usr/local/rvm/gems/ruby-2.5.1/gems/bootsnap-1.4.1/lib/bootsnap/load_path_cache/core_ext/active_support.rb:48:in `block in require_or_load'
/usr/local/rvm/gems/ruby-2.5.1/gems/bootsnap-1.4.1/lib/bootsnap/load_path_cache/core_ext/active_support.rb:16:in `allow_bootsnap_retry'
/usr/local/rvm/gems/ruby-2.5.1/gems/bootsnap-1.4.1/lib/bootsnap/load_path_cache/core_ext/active_support.rb:47:in `require_or_load'
/usr/local/rvm/gems/ruby-2.5.1/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:330:in `depend_on'
/usr/local/rvm/gems/ruby-2.5.1/gems/bootsnap-1.4.1/lib/bootsnap/load_path_cache/core_ext/active_support.rb:82:in `depend_on'
/usr/local/rvm/gems/ruby-2.5.1/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:244:in `require_dependency'
/usr/local/rvm/gems/ruby-2.5.1/gems/railties-5.2.1/lib/rails/engine.rb:478:in `block (2 levels) in eager_load!'
/usr/local/rvm/gems/ruby-2.5.1/gems/railties-5.2.1/lib/rails/engine.rb:477:in `each'
/usr/local/rvm/gems/ruby-2.5.1/gems/railties-5.2.1/lib/rails/engine.rb:477:in `block in eager_load!'
/usr/local/rvm/gems/ruby-2.5.1/gems/railties-5.2.1/lib/rails/engine.rb:475:in `each'
/usr/local/rvm/gems/ruby-2.5.1/gems/railties-5.2.1/lib/rails/engine.rb:475:in `eager_load!'
/usr/local/rvm/gems/ruby-2.5.1/gems/railties-5.2.1/lib/rails/engine.rb:356:in `eager_load!'
/usr/local/rvm/gems/ruby-2.5.1/gems/railties-5.2.1/lib/rails/application/finisher.rb:69:in `each'
/usr/local/rvm/gems/ruby-2.5.1/gems/railties-5.2.1/lib/rails/application/finisher.rb:69:in `block in <module:Finisher>'
/usr/local/rvm/gems/ruby-2.5.1/gems/railties-5.2.1/lib/rails/initializable.rb:32:in `instance_exec'
/usr/local/rvm/gems/ruby-2.5.1/gems/railties-5.2.1/lib/rails/initializable.rb:32:in `run'
/usr/local/rvm/gems/ruby-2.5.1/gems/railties-5.2.1/lib/rails/initializable.rb:61:in `block in run_initializers'
/usr/local/rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/tsort.rb:228:in `block in tsort_each'
/usr/local/rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
/usr/local/rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/tsort.rb:431:in `each_strongly_connected_component_from'
/usr/local/rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/tsort.rb:349:in `block in each_strongly_connected_component'
/usr/local/rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/tsort.rb:347:in `each'
/usr/local/rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/tsort.rb:347:in `call'
/usr/local/rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/tsort.rb:347:in `each_strongly_connected_component'
/usr/local/rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/tsort.rb:226:in `tsort_each'
/usr/local/rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/tsort.rb:205:in `tsort_each'
/usr/local/rvm/gems/ruby-2.5.1/gems/railties-5.2.1/lib/rails/initializable.rb:60:in `run_initializers'
/usr/local/rvm/gems/ruby-2.5.1/gems/railties-5.2.1/lib/rails/application.rb:361:in `initialize!'
/var/www/app/config/environment.rb:5:in `<top (required)>'
config.ru:3:in `require_relative'
config.ru:3:in `block in <main>'
/usr/local/rvm/gems/ruby-2.5.1/gems/rack-2.0.6/lib/rack/builder.rb:55:in `instance_eval'
/usr/local/rvm/gems/ruby-2.5.1/gems/rack-2.0.6/lib/rack/builder.rb:55:in `initialize'
config.ru:1:in `new'
config.ru:1:in `<main>'
/usr/share/passenger/helper-scripts/rack-preloader.rb:101:in `eval'
/usr/share/passenger/helper-scripts/rack-preloader.rb:101:in `preload_app'
/usr/share/passenger/helper-scripts/rack-preloader.rb:189:in `block in <module:App>'
/usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:380:in `run_block_and_record_step_progress'
/usr/share/passenger/helper-scripts/rack-preloader.rb:188:in `<module:App>'
/usr/share/passenger/helper-scripts/rack-preloader.rb:30:in `<module:PhusionPassenger>'
/usr/share/passenger/helper-scripts/rack-preloader.rb:29:in `<main>'
At least up to 5.2.4.3, ActiveStorage seems to initialize and inject its methods into ActiveRecord after Rails config/initializers are loaded.
If any initializer uses any model calling ActiveStorage macros, as has_one_attached or has_many_attached, those methods are missing by then.
For example, if you have a User model using has_one_attached :image , and you use User as your Devise model, Device initializer will refer User, and when User is loaded the method has_one_attached will be missing.
I added this code, taken from active_storage/engine, at the end of config/application.rb, and it worked for me.
# config/application.rb
require "active_storage/attached"
ActiveSupport.on_load(:active_record) do
extend ActiveStorage::Attached::Macros
end
Did you install ActiveStorage?:
rails active_storage:install:migrations
rails db:migrate
If you are not using any DB, you can't use it.
On Rails 6.1 this seems to work:
# config/application.rb
ActiveSupport.on_load(:active_record) do
include ActiveStorage::Reflection::ActiveRecordExtensions
ActiveRecord::Reflection.singleton_class.prepend(ActiveStorage::Reflection::ReflectionExtension)
include ActiveStorage::Attached::Model
end
I found this solution starting from Argenis's answer and mixing it with the one in this other SO
For me it has been solved removing this line
config/initializers/active_admin.rb
config.before_action :set_admin_locale
I'm going to deploy my ruby on rails app on my own server. So i decided to follow this tutorial that is from degital ocean:
https://www.digitalocean.com/community/tutorials/how-to-deploy-a-rails-app-with-unicorn-and-nginx-on-ubuntu-14-04
I configured my database.yml which i add host:localhost and configured rben-var in my app directory and Migrate the production database very well.
I couldn't start the rails with this command
RAILS_ENV=production rails server
And i thought maybe it is because of my last time that I set the unicorn as default for my another app(you know i have two other app which i deploy them on the server well but i removed their path from the nginx)
then I create config/unicorn.rb
finally when I started
sudo vi /etc/init.d/unicorn_drug it gives me this error:
master failed to start, check stderr log for details
When i see the log which Is in /shared/log/unicorn.stderr.log i see following error lines.
You know i spend two days on this case but I really can't understand what is the error is:
/root/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/unicorn-5.1.0/lib/unicorn/http_server.rb:752:in `call'
/root/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/unicorn-5.1.0/lib/unicorn/http_server.rb:752:in `build_app!'
/root/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/unicorn-5.1.0/lib/unicorn/http_server.rb:129:in `start'
/root/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/unicorn-5.1.0/bin/unicorn:126:in `<top (required)>'
/root/.rbenv/versions/2.2.3/bin/unicorn:23:in `load'
/root/.rbenv/versions/2.2.3/bin/unicorn:23:in `<top (required)>'
I, [2017-02-27T13:38:21.860366 #1848] INFO -- : Refreshing Gem list
NameError: uninitialized constant RegistrationController
/root/drug_api/app/controllers/RegistrationController/confirmations_controller.rb:1:in `<top (required)>'
/root/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/activesupport-5.0.1/lib/active_support/dependencies/interlock.rb:12:in `block in loading'
/root/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/activesupport-5.0.1/lib/active_support/concurrency/share_lock.rb:150:in `exclusive'
/root/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/activesupport-5.0.1/lib/active_support/dependencies/interlock.rb:11:in `loading'
/root/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-5.0.1/lib/rails/engine.rb:476:in `block (2 levels) in eager_load!'
/root/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-5.0.1/lib/rails/engine.rb:475:in `each'
/root/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-5.0.1/lib/rails/engine.rb:475:in `block in eager_load!'
/root/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-5.0.1/lib/rails/engine.rb:473:in `each'
/root/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-5.0.1/lib/rails/engine.rb:473:in `eager_load!'
/root/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-5.0.1/lib/rails/engine.rb:354:in `eager_load!'
/root/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-5.0.1/lib/rails/application/finisher.rb:59:in `each'
/root/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-5.0.1/lib/rails/application/finisher.rb:59:in `block in <module:Finisher>'
/root/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-5.0.1/lib/rails/initializable.rb:30:in `instance_exec'
/root/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-5.0.1/lib/rails/initializable.rb:30:in `run'
/root/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-5.0.1/lib/rails/initializable.rb:55:in `block in run_initializers'
/root/.rbenv/versions/2.2.3/lib/ruby/2.2.0/tsort.rb:226:in `block in tsort_each'
/root/.rbenv/versions/2.2.3/lib/ruby/2.2.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
/root/.rbenv/versions/2.2.3/lib/ruby/2.2.0/tsort.rb:429:in `each_strongly_connected_component_from'
/root/.rbenv/versions/2.2.3/lib/ruby/2.2.0/tsort.rb:347:in `block in each_strongly_connected_component'
/root/.rbenv/versions/2.2.3/lib/ruby/2.2.0/tsort.rb:345:in `each'
/root/.rbenv/versions/2.2.3/lib/ruby/2.2.0/tsort.rb:345:in `call'
/root/.rbenv/versions/2.2.3/lib/ruby/2.2.0/tsort.rb:345:in `each_strongly_connected_component'
/root/.rbenv/versions/2.2.3/lib/ruby/2.2.0/tsort.rb:224:in `tsort_each'
/root/.rbenv/versions/2.2.3/lib/ruby/2.2.0/tsort.rb:203:in `tsort_each'
/root/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-5.0.1/lib/rails/initializable.rb:54:in `run_initializers'
/root/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-5.0.1/lib/rails/application.rb:352:in `initialize!'
/root/drug_api/config/environment.rb:5:in `<top (required)>'
config.ru:4:in `require_relative'
config.ru:4:in `block in <main>'
/root/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rack-2.0.1/lib/rack/builder.rb:55:in `instance_eval'
/root/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rack-2.0.1/lib/rack/builder.rb:55:in `initialize'
config.ru:1:in `new'
config.ru:1:in `<main>'
/root/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/unicorn-5.1.0/lib/unicorn.rb:56:in `eval'
/root/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/unicorn-5.1.0/lib/unicorn.rb:56:in `block in builder'
/root/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/unicorn-5.1.0/lib/unicorn/http_server.rb:752:in `call'
/root/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/unicorn-5.1.0/lib/unicorn/http_server.rb:752:in `build_app!'
/root/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/unicorn-5.1.0/lib/unicorn/http_server.rb:129:in `start'
/root/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/unicorn-5.1.0/bin/unicorn:126:in `<top (required)>'
/root/.rbenv/versions/2.2.3/bin/unicorn:23:in `load'
/root/.rbenv/versions/2.2.3/bin/unicorn:23:in `<top (required)>'
The problem is uninitialized constant RegistrationController, your RegistrationController is missing. Also seems that you have named directory to RegistrationController and under that you have placed confirmation_controller. Rename the directory to registration_controller, cause you can not name path or directory with first letter capital, that is only for class name.
Check line no. 8 of your error log:
NameError: uninitialized constant RegistrationController
/root/drug_api/app/controllers/RegistrationController/confirmations_controller.rb:1:in `<top (required)>'
Any got any idea why, on my production server I can't use nested concerns in model?
I have a model Landing
class Landing < ActiveRecord::Base
include Claimable
end
and concern
module Claimable
extend ActiveSupport::Concern
end
Everything is working fine, but Claimable is stricly Landing logic so I would like to put it a nested route
class Landing < ActiveRecord::Base
include Landing::Claimable
end
and
module Landing::Claimable
extend ActiveSupport::Concern
end
This is working on my developement machine (OSX Yosemite), but when I deploy to a Linux production server I receive error:
/home/app/app/releases/a34cd4a786d8f6c35179fb8eebc34469f471192a/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:492:in `load_missing_constant': Circular dependency detected while autoloading constant Landing::Claimable (RuntimeError)
from /home/app/app/releases/a34cd4a786d8f6c35179fb8eebc34469f471192a/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:184:in `const_missing'
from /home/app/app/releases/a34cd4a786d8f6c35179fb8eebc34469f471192a/app/models/landing.rb:20:in `<class:Landing>'
from /home/app/app/releases/a34cd4a786d8f6c35179fb8eebc34469f471192a/app/models/landing.rb:18:in `<top (required)>'
from /home/app/app/releases/a34cd4a786d8f6c35179fb8eebc34469f471192a/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `require'
from /home/app/app/releases/a34cd4a786d8f6c35179fb8eebc34469f471192a/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `block in require'
from /home/app/app/releases/a34cd4a786d8f6c35179fb8eebc34469f471192a/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:240:in `load_dependency'
from /home/app/app/releases/a34cd4a786d8f6c35179fb8eebc34469f471192a/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `require'
from /home/app/app/releases/a34cd4a786d8f6c35179fb8eebc34469f471192a/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:360:in `require_or_load'
from /home/app/app/releases/a34cd4a786d8f6c35179fb8eebc34469f471192a/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:494:in `load_missing_constant'
from /home/app/app/releases/a34cd4a786d8f6c35179fb8eebc34469f471192a/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:184:in `const_missing'
from /home/app/app/releases/a34cd4a786d8f6c35179fb8eebc34469f471192a/app/models/concerns/landing/claimable.rb:1:in `<top (required)>'
from /home/app/app/releases/a34cd4a786d8f6c35179fb8eebc34469f471192a/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `require'
from /home/app/app/releases/a34cd4a786d8f6c35179fb8eebc34469f471192a/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `block in require'
from /home/app/app/releases/a34cd4a786d8f6c35179fb8eebc34469f471192a/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:240:in `load_dependency'
from /home/app/app/releases/a34cd4a786d8f6c35179fb8eebc34469f471192a/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `require'
from /home/app/app/releases/a34cd4a786d8f6c35179fb8eebc34469f471192a/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:360:in `require_or_load'
from /home/app/app/releases/a34cd4a786d8f6c35179fb8eebc34469f471192a/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:317:in `depend_on'
from /home/app/app/releases/a34cd4a786d8f6c35179fb8eebc34469f471192a/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:233:in `require_dependency'
from /home/app/app/releases/a34cd4a786d8f6c35179fb8eebc34469f471192a/vendor/bundle/ruby/2.1.0/gems/railties-4.2.0/lib/rails/engine.rb:472:in `block (2 levels) in eager_load!'
from /home/app/app/releases/a34cd4a786d8f6c35179fb8eebc34469f471192a/vendor/bundle/ruby/2.1.0/gems/railties-4.2.0/lib/rails/engine.rb:471:in `each'
from /home/app/app/releases/a34cd4a786d8f6c35179fb8eebc34469f471192a/vendor/bundle/ruby/2.1.0/gems/railties-4.2.0/lib/rails/engine.rb:471:in `block in eager_load!'
from /home/app/app/releases/a34cd4a786d8f6c35179fb8eebc34469f471192a/vendor/bundle/ruby/2.1.0/gems/railties-4.2.0/lib/rails/engine.rb:469:in `each'
from /home/app/app/releases/a34cd4a786d8f6c35179fb8eebc34469f471192a/vendor/bundle/ruby/2.1.0/gems/railties-4.2.0/lib/rails/engine.rb:469:in `eager_load!'
from /home/app/app/releases/a34cd4a786d8f6c35179fb8eebc34469f471192a/vendor/bundle/ruby/2.1.0/gems/railties-4.2.0/lib/rails/engine.rb:346:in `eager_load!'
from /home/app/app/releases/a34cd4a786d8f6c35179fb8eebc34469f471192a/vendor/bundle/ruby/2.1.0/gems/railties-4.2.0/lib/rails/application/finisher.rb:56:in `each'
from /home/app/app/releases/a34cd4a786d8f6c35179fb8eebc34469f471192a/vendor/bundle/ruby/2.1.0/gems/railties-4.2.0/lib/rails/application/finisher.rb:56:in `block in <module:Finisher>'
from /home/app/app/releases/a34cd4a786d8f6c35179fb8eebc34469f471192a/vendor/bundle/ruby/2.1.0/gems/railties-4.2.0/lib/rails/initializable.rb:30:in `instance_exec'
from /home/app/app/releases/a34cd4a786d8f6c35179fb8eebc34469f471192a/vendor/bundle/ruby/2.1.0/gems/railties-4.2.0/lib/rails/initializable.rb:30:in `run'
from /home/app/app/releases/a34cd4a786d8f6c35179fb8eebc34469f471192a/vendor/bundle/ruby/2.1.0/gems/railties-4.2.0/lib/rails/initializable.rb:55:in `block in run_initializers'
from /usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:226:in `block in tsort_each'
from /usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
from /usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:427:in `each_strongly_connected_component_from'
from /usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:347:in `block in each_strongly_connected_component'
from /usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:345:in `each'
from /usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:345:in `call'
from /usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:345:in `each_strongly_connected_component'
from /usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:224:in `tsort_each'
from /usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:205:in `tsort_each'
from /home/app/app/releases/a34cd4a786d8f6c35179fb8eebc34469f471192a/vendor/bundle/ruby/2.1.0/gems/railties-4.2.0/lib/rails/initializable.rb:54:in `run_initializers'
from /home/app/app/releases/a34cd4a786d8f6c35179fb8eebc34469f471192a/vendor/bundle/ruby/2.1.0/gems/railties-4.2.0/lib/rails/application.rb:352:in `initialize!'
from /home/app/app/current/config/environment.rb:5:in `<top (required)>'
from /home/app/app/current/config.ru:3:in `require'
from /home/app/app/current/config.ru:3:in `block in <main>'
from /home/app/app/releases/a34cd4a786d8f6c35179fb8eebc34469f471192a/vendor/bundle/ruby/2.1.0/gems/rack-1.6.0/lib/rack/builder.rb:55:in `instance_eval'
from /home/app/app/releases/a34cd4a786d8f6c35179fb8eebc34469f471192a/vendor/bundle/ruby/2.1.0/gems/rack-1.6.0/lib/rack/builder.rb:55:in `initialize'
from /home/app/app/current/config.ru:1:in `new'
from /home/app/app/current/config.ru:1:in `<main>'
from /home/app/app/releases/a34cd4a786d8f6c35179fb8eebc34469f471192a/vendor/bundle/ruby/2.1.0/gems/thin-1.6.3/lib/rack/adapter/loader.rb:33:in `eval'
from /home/app/app/releases/a34cd4a786d8f6c35179fb8eebc34469f471192a/vendor/bundle/ruby/2.1.0/gems/thin-1.6.3/lib/rack/adapter/loader.rb:33:in `load'
from /home/app/app/releases/a34cd4a786d8f6c35179fb8eebc34469f471192a/vendor/bundle/ruby/2.1.0/gems/thin-1.6.3/lib/rack/adapter/loader.rb:42:in `for'
from /home/app/app/releases/a34cd4a786d8f6c35179fb8eebc34469f471192a/vendor/bundle/ruby/2.1.0/gems/thin-1.6.3/lib/thin/controllers/controller.rb:170:in `load_adapter'
from /home/app/app/releases/a34cd4a786d8f6c35179fb8eebc34469f471192a/vendor/bundle/ruby/2.1.0/gems/thin-1.6.3/lib/thin/controllers/controller.rb:74:in `start'
from /home/app/app/releases/a34cd4a786d8f6c35179fb8eebc34469f471192a/vendor/bundle/ruby/2.1.0/gems/thin-1.6.3/lib/thin/runner.rb:200:in `run_command'
from /home/app/app/releases/a34cd4a786d8f6c35179fb8eebc34469f471192a/vendor/bundle/ruby/2.1.0/gems/thin-1.6.3/lib/thin/runner.rb:156:in `run!'
from /home/app/app/releases/a34cd4a786d8f6c35179fb8eebc34469f471192a/vendor/bundle/ruby/2.1.0/gems/thin-1.6.3/bin/thin:6:in `<top (required)>'
from /home/app/app/releases/68f6492bb01f28373b95f26f34b609fdb99dc9cd/vendor/bundle/bin/thin:16:in `load'
from /home/app/app/releases/68f6492bb01f28373b95f26f34b609fdb99dc9cd/vendor/bundle/bin/thin:16:in `<main>'
This usually has to do with your config.eager_load settings on your application. You have a different setting in the production environment from the development one, which is perfectly normal and the intended use, but that's why you experience different behaviors from development to production.
As a possible solution, I suggest you avoid using the one-line namespaced class definition and change it to multiple lines instead.
Try changing:
module Landing::Claimable
end
to:
module Landing
module Claimable
end
end
When I try to perform "rails generate devise:install" I get this error message:
I've tried re-installing the devise gem multiple times. This error also comes up when I try to start up my server. I'm wondering if the cause of this is from initially trying to install the devise gem with "rails generate devise install" instead of putting a colon between devise and install.
Maxs-MacBook-Air:pinteresting allecat941$ rails generate devise:install
/Users/allecat941/.rvm/gems/ruby-2.1.1/gems/activerecord-4.1.1/lib/active_record/dynamic_matchers.rb:26:in `method_missing': undefined method `devise' for Install (call 'Install.connection' to establish a connection):Class (NoMethodError)
from /Users/allecat941/pinteresting/app/models/install.rb:4:in `<class:Install>'
from /Users/allecat941/pinteresting/app/models/install.rb:1:in `<top (required)>'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:443:in `load'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:443:in `block in load_file'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:633:in `new_constants_in'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:442:in `load_file'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:342:in `require_or_load'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:480:in `load_missing_constant'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:180:in `const_missing'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.1/lib/active_support/inflector/methods.rb:238:in `const_get'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.1/lib/active_support/inflector/methods.rb:238:in `block in constantize'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.1/lib/active_support/inflector/methods.rb:236:in `each'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.1/lib/active_support/inflector/methods.rb:236:in `inject'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.1/lib/active_support/inflector/methods.rb:236:in `constantize'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:552:in `get'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:583:in `constantize'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/devise-3.2.4/lib/devise.rb:297:in `get'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/devise-3.2.4/lib/devise/mapping.rb:77:in `to'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/devise-3.2.4/lib/devise/mapping.rb:72:in `modules'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/devise-3.2.4/lib/devise/mapping.rb:89:in `routes'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/devise-3.2.4/lib/devise/mapping.rb:156:in `default_used_route'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/devise-3.2.4/lib/devise/mapping.rb:66:in `initialize'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/devise-3.2.4/lib/devise.rb:331:in `new'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/devise-3.2.4/lib/devise.rb:331:in `add_mapping'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/devise-3.2.4/lib/devise/rails/routes.rb:221:in `block in devise_for'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/devise-3.2.4/lib/devise/rails/routes.rb:220:in `each'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/devise-3.2.4/lib/devise/rails/routes.rb:220:in `devise_for'
from /Users/allecat941/pinteresting/config/routes.rb:2:in `block in <top (required)>'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/actionpack-4.1.1/lib/action_dispatch/routing/route_set.rb:335:in `instance_exec'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/actionpack-4.1.1/lib/action_dispatch/routing/route_set.rb:335:in `eval_block'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/actionpack-4.1.1/lib/action_dispatch/routing/route_set.rb:313:in `draw'
from /Users/allecat941/pinteresting/config/routes.rb:1:in `<top (required)>'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:241:in `load'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:241:in `block in load'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:232:in `load_dependency'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:241:in `load'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/railties-4.1.1/lib/rails/application/routes_reloader.rb:40:in `block in load_paths'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/railties-4.1.1/lib/rails/application/routes_reloader.rb:40:in `each'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/railties-4.1.1/lib/rails/application/routes_reloader.rb:40:in `load_paths'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/railties-4.1.1/lib/rails/application/routes_reloader.rb:16:in `reload!'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/railties-4.1.1/lib/rails/application/routes_reloader.rb:26:in `block in updater'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.1/lib/active_support/file_update_checker.rb:75:in `call'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.1/lib/active_support/file_update_checker.rb:75:in `execute'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/railties-4.1.1/lib/rails/application/routes_reloader.rb:27:in `updater'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/railties-4.1.1/lib/rails/application/routes_reloader.rb:7:in `execute_if_updated'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/railties-4.1.1/lib/rails/application/finisher.rb:71:in `block in <module:Finisher>'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/railties-4.1.1/lib/rails/initializable.rb:30:in `instance_exec'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/railties-4.1.1/lib/rails/initializable.rb:30:in `run'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/railties-4.1.1/lib/rails/initializable.rb:55:in `block in run_initializers'
from /Users/allecat941/.rbenv/versions/2.0.0-p451/lib/ruby/2.0.0/tsort.rb:150:in `block in tsort_each'
from /Users/allecat941/.rbenv/versions/2.0.0-p451/lib/ruby/2.0.0/tsort.rb:183:in `block (2 levels) in each_strongly_connected_component'
from /Users/allecat941/.rbenv/versions/2.0.0-p451/lib/ruby/2.0.0/tsort.rb:219:in `each_strongly_connected_component_from'
from /Users/allecat941/.rbenv/versions/2.0.0-p451/lib/ruby/2.0.0/tsort.rb:182:in `block in each_strongly_connected_component'
from /Users/allecat941/.rbenv/versions/2.0.0-p451/lib/ruby/2.0.0/tsort.rb:180:in `each'
from /Users/allecat941/.rbenv/versions/2.0.0-p451/lib/ruby/2.0.0/tsort.rb:180:in `each_strongly_connected_component'
from /Users/allecat941/.rbenv/versions/2.0.0-p451/lib/ruby/2.0.0/tsort.rb:148:in `tsort_each'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/railties-4.1.1/lib/rails/initializable.rb:54:in `run_initializers'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/railties-4.1.1/lib/rails/application.rb:288:in `initialize!'
from /Users/allecat941/pinteresting/config/environment.rb:5:in `<top (required)>'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in `require'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in `block in require'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:232:in `load_dependency'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in `require'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/spring-1.1.3/lib/spring/application.rb:92:in `preload'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/spring-1.1.3/lib/spring/application.rb:140:in `serve'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/spring-1.1.3/lib/spring/application.rb:128:in `block in run'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/spring-1.1.3/lib/spring/application.rb:122:in `loop'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/spring-1.1.3/lib/spring/application.rb:122:in `run'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/spring-1.1.3/lib/spring/application/boot.rb:18:in `<top (required)>'
from /Users/allecat941/.rbenv/versions/2.0.0-p451/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/allecat941/.rbenv/versions/2.0.0-p451/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from -e:1:in `<main>'
It looks like your accidental install created Install model and other files. Delete those, perhaps?
I am using the device gem and without devise install . Then use, the cmd rails g device auth in this case rails throw the error than using this method my problem is solved
extend Devise::Models
in my auth.rb files
class Auth < ApplicationRecord
extend Devise::Models
end
The name of my app is newsample_app . I am following along the railstutorial screencast for upgrading to rails 3.1. Here is the error message I am getting when copying files over from my old "sample_app" to "newsample_app" and trying to run rspec:
rspec spec/controllers/pages_controller_spec.rb
/Users/topica/rails_projects/newsample_app/config/routes.rb:1:in `': uninitialized constant NewSampleApp (NameError)
After seeing this, I changed my routes.rb file from my original sample_app from "SampleApp::Application.routes.draw do" to this: "NewSampleApp::Application.routes.draw do" but am still getting the error. Any ideas?
FYI complete error:
Topicas-MacBook-Pro:newsample_app topica$ rspec spec/controllers/pages_controller_spec.rb
/Users/topica/rails_projects/newsample_app/config/routes.rb:1:in `<top (required)>': uninitialized constant NewSampleApp (NameError)
from /Users/topica/.rvm/gems/ruby-1.9.2-p290#rails3_1tutorial/gems/railties-3.1.1/lib/rails/application/routes_reloader.rb:29:in `block in load_paths'
from /Users/topica/.rvm/gems/ruby-1.9.2-p290#rails3_1tutorial/gems/railties-3.1.1/lib/rails/application/routes_reloader.rb:29:in `each'
from /Users/topica/.rvm/gems/ruby-1.9.2-p290#rails3_1tutorial/gems/railties-3.1.1/lib/rails/application/routes_reloader.rb:29:in `load_paths'
from /Users/topica/.rvm/gems/ruby-1.9.2-p290#rails3_1tutorial/gems/railties-3.1.1/lib/rails/application/routes_reloader.rb:13:in `reload!'
from /Users/topica/.rvm/gems/ruby-1.9.2-p290#rails3_1tutorial/gems/railties-3.1.1/lib/rails/application/routes_reloader.rb:7:in `block in initialize'
from /Users/topica/.rvm/gems/ruby-1.9.2-p290#rails3_1tutorial/gems/activesupport-3.1.1/lib/active_support/file_update_checker.rb:32:in `call'
from /Users/topica/.rvm/gems/ruby-1.9.2-p290#rails3_1tutorial/gems/activesupport-3.1.1/lib/active_support/file_update_checker.rb:32:in `execute_if_updated'
from /Users/topica/.rvm/gems/ruby-1.9.2-p290#rails3_1tutorial/gems/railties-3.1.1/lib/rails/application/finisher.rb:63:in `block (2 levels) in <module:Finisher>'
from /Users/topica/.rvm/gems/ruby-1.9.2-p290#rails3_1tutorial/gems/railties-3.1.1/lib/rails/application/finisher.rb:64:in `call'
from /Users/topica/.rvm/gems/ruby-1.9.2-p290#rails3_1tutorial/gems/railties-3.1.1/lib/rails/application/finisher.rb:64:in `block in <module:Finisher>'
from /Users/topica/.rvm/gems/ruby-1.9.2-p290#rails3_1tutorial/gems/railties-3.1.1/lib/rails/initializable.rb:30:in `instance_exec'
from /Users/topica/.rvm/gems/ruby-1.9.2-p290#rails3_1tutorial/gems/railties-3.1.1/lib/rails/initializable.rb:30:in `run'
from /Users/topica/.rvm/gems/ruby-1.9.2-p290#rails3_1tutorial/gems/railties-3.1.1/lib/rails/initializable.rb:55:in `block in run_initializers'
from /Users/topica/.rvm/gems/ruby-1.9.2-p290#rails3_1tutorial/gems/railties-3.1.1/lib/rails/initializable.rb:54:in `each'
from /Users/topica/.rvm/gems/ruby-1.9.2-p290#rails3_1tutorial/gems/railties-3.1.1/lib/rails/initializable.rb:54:in `run_initializers'
from /Users/topica/.rvm/gems/ruby-1.9.2-p290#rails3_1tutorial/gems/railties-3.1.1/lib/rails/application.rb:96:in `initialize!'
from /Users/topica/.rvm/gems/ruby-1.9.2-p290#rails3_1tutorial/gems/railties-3.1.1/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /Users/topica/rails_projects/newsample_app/config/environment.rb:5:in `<top (required)>'
from /Users/topica/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /Users/topica/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /Users/topica/rails_projects/newsample_app/spec/spec_helper.rb:3:in `<top (required)>'
from /Users/topica/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /Users/topica/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /Users/topica/rails_projects/newsample_app/spec/controllers/pages_controller_spec.rb:1:in `<top (required)>'
from /Users/topica/.rvm/gems/ruby-1.9.2-p290#rails3_1tutorial/gems/rspec-core-2.6.4/lib/rspec/core/configuration.rb:419:in `load'
from /Users/topica/.rvm/gems/ruby-1.9.2-p290#rails3_1tutorial/gems/rspec-core-2.6.4/lib/rspec/core/configuration.rb:419:in `block in load_spec_files'
from /Users/topica/.rvm/gems/ruby-1.9.2-p290#rails3_1tutorial/gems/rspec-core-2.6.4/lib/rspec/core/configuration.rb:419:in `map'
from /Users/topica/.rvm/gems/ruby-1.9.2-p290#rails3_1tutorial/gems/rspec-core-2.6.4/lib/rspec/core/configuration.rb:419:in `load_spec_files'
from /Users/topica/.rvm/gems/ruby-1.9.2-p290#rails3_1tutorial/gems/rspec-core-2.6.4/lib/rspec/core/command_line.rb:18:in `run'
from /Users/topica/.rvm/gems/ruby-1.9.2-p290#rails3_1tutorial/gems/rspec-core-2.6.4/lib/rspec/core/runner.rb:80:in `run_in_process'
from /Users/topica/.rvm/gems/ruby-1.9.2-p290#rails3_1tutorial/gems/rspec-core-2.6.4/lib/rspec/core/runner.rb:69:in `run'
from /Users/topica/.rvm/gems/ruby-1.9.2-p290#rails3_1tutorial/gems/rspec-core-2.6.4/lib/rspec/core/runner.rb:11:in `block in autorun'
You probably want that to match the same as in config/application.rb
If it really is newsample_app than it is probably NewsampleApp not NewSampleApp
Looks like a case problem.
> "newsample_app".camelize
=> "NewsampleApp"
Note the lowercase "s".