I am having some problems getting Sidekiq to run on my VPS. Everything works fine locally but once I deploy I get the following error in my unicorn log:
E, [2012-09-18T21:41:19.670672 #1308] ERROR -- : uninitialized constant MailchimpWorker::Sidekiq (NameError)
/home/deployer/production/shared/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/ext/module.rb:36:in `const_missing'
/home/deployer/production/releases/20120919013128/app/workers/mailchimp_worker.rb:3:in `<class:MailchimpWorker>'
/home/deployer/production/releases/20120919013128/app/workers/mailchimp_worker.rb:1:in `<top (required)>'
/home/deployer/production/shared/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/engine.rb:439:in `block (2 levels) in eager_load!'
/home/deployer/production/shared/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/engine.rb:438:in `each'
/home/deployer/production/shared/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/engine.rb:438:in `block in eager_load!'
/home/deployer/production/shared/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/engine.rb:436:in `each'
/home/deployer/production/shared/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/engine.rb:436:in `eager_load!'
/home/deployer/production/shared/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/application/finisher.rb:53:in `block in <module:Finisher>'
/home/deployer/production/shared/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/initializable.rb:30:in `instance_exec'
/home/deployer/production/shared/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/initializable.rb:30:in `run'
/home/deployer/production/shared/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/initializable.rb:55:in `block in run_initializers'
/home/deployer/production/shared/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/initializable.rb:54:in `each'
/home/deployer/production/shared/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/initializable.rb:54:in `run_initializers'
/home/deployer/production/shared/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/application.rb:136:in `initialize!'
/home/deployer/production/shared/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/railtie/configurable.rb:30:in `method_missing'
/home/deployer/production/releases/20120919013128/config/environment.rb:5:in `<top (required)>'
config.ru:4:in `require'
config.ru:4:in `block in <main>'
/home/deployer/production/shared/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb:51:in `instance_eval'
/home/deployer/production/shared/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb:51:in `initialize'
config.ru:1:in `new'
config.ru:1:in `<main>'
Here is the contents of my worker file:
class MailchimpWorker
include Sidekiq::Worker
LIST_ID = '844161948b'
def perform(email)
Gibbon.listSubscribe id: LIST_ID, email_address: email
end
end
Any ideas as to what I'm doing wrong?
This looks like gem 'sidekiq' is missing from your Gemfile.
If it works on dev but not production, it sounds like bundler isn't loading the gem in the production environment. Which depends on what group the gem is listed in your Gemfile and also how you deploy (how do you have bundler install your gems on production?).
So, can you post your Gemfile, and also the relevant bits in your deployment scripts?
Also double check that the sidekiq procs are being started using bundle exec.
are you running unicorn inside of bundler?
bundle exec unicorn
Related
RAILS_ENV=production rails s
leads to
=> 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/***/.rvm/gems/ruby-2.3.0#global/gems/activerecord-4.2.6/lib/active_record/dynamic_matchers.rb:26:in `method_missing': undefined local variable or method `paperclip' for #<Class:0x007fbf49ddafa8> (NameError)
This only happens when I start the server in production. In dev and test mode, its all fine.
So I guessed that there is some misconfiguration in the gemfile but paperclip and related gems are not grouped (or excluded for production) so this does not make any sense.
The only gems which are grouped into test/dev only are:
group :development, :test do
# Test driven development
gem 'rspec-rails'
gem 'factory_girl_rails'
gem 'shoulda'
gem 'faker'
# check for dead routes
gem 'traceroute'
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
# find missing translations
gem 'i18n-tasks', '~> 0.8.3'
gem 'simplecov'
gem 'rack-mini-profiler'
gem 'letter_opener'
# Model/Controller graphing
gem 'railroady'
end
group :test do
gem 'rspec-sidekiq'
end
I'm rather convinced that this has nothing to do with paperclip itself.
If I require paperclip manually in the model, other gem related methods fail as well.
Here is the full error trace:
/Users/***/.rvm/gems/ruby-2.3.0#global/gems/activerecord-4.2.6/lib/active_record/dynamic_matchers.rb:26:in `method_missing': undefined local variable or method `paperclip' for #<Class:0x007fbf49ddafa8> (NameError)
from /Users/***/Documents/Projekte/***/app/models/sponsorship.rb:2:in `<class:Sponsorship>'
from /Users/***/Documents/Projekte/***/app/models/sponsorship.rb:1:in `<top (required)>'
from /Users/***/.rvm/gems/ruby-2.3.0#global/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `require'
from /Users/***/.rvm/gems/ruby-2.3.0#global/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `block in require'
from /Users/***/.rvm/gems/ruby-2.3.0#global/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:240:in `load_dependency'
from /Users/***/.rvm/gems/ruby-2.3.0#global/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `require'
from /Users/***/.rvm/gems/ruby-2.3.0#global/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:360:in `require_or_load'
from /Users/***/.rvm/gems/ruby-2.3.0#global/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:494:in `load_missing_constant'
from /Users/***/.rvm/gems/ruby-2.3.0#global/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:184:in `const_missing'
from /Users/***/Documents/Projekte/***/app/models/advertisement.rb:1:in `<top (required)>'
from /Users/***/.rvm/gems/ruby-2.3.0#global/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `require'
from /Users/***/.rvm/gems/ruby-2.3.0#global/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `block in require'
from /Users/***/.rvm/gems/ruby-2.3.0#global/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:240:in `load_dependency'
from /Users/***/.rvm/gems/ruby-2.3.0#global/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `require'
from /Users/***/.rvm/gems/ruby-2.3.0#global/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:360:in `require_or_load'
from /Users/***/.rvm/gems/ruby-2.3.0#global/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:317:in `depend_on'
from /Users/***/.rvm/gems/ruby-2.3.0#global/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:233:in `require_dependency'
from /Users/***/.rvm/gems/ruby-2.3.0#global/gems/railties-4.2.6/lib/rails/engine.rb:472:in `block (2 levels) in eager_load!'
from /Users/***/.rvm/gems/ruby-2.3.0#global/gems/railties-4.2.6/lib/rails/engine.rb:471:in `each'
from /Users/***/.rvm/gems/ruby-2.3.0#global/gems/railties-4.2.6/lib/rails/engine.rb:471:in `block in eager_load!'
from /Users/***/.rvm/gems/ruby-2.3.0#global/gems/railties-4.2.6/lib/rails/engine.rb:469:in `each'
from /Users/***/.rvm/gems/ruby-2.3.0#global/gems/railties-4.2.6/lib/rails/engine.rb:469:in `eager_load!'
from /Users/***/.rvm/gems/ruby-2.3.0#global/gems/railties-4.2.6/lib/rails/engine.rb:346:in `eager_load!'
from /Users/***/.rvm/gems/ruby-2.3.0#global/gems/railties-4.2.6/lib/rails/application/finisher.rb:56:in `each'
from /Users/***/.rvm/gems/ruby-2.3.0#global/gems/railties-4.2.6/lib/rails/application/finisher.rb:56:in `block in <module:Finisher>'
from /Users/***/.rvm/gems/ruby-2.3.0#global/gems/railties-4.2.6/lib/rails/initializable.rb:30:in `instance_exec'
from /Users/***/.rvm/gems/ruby-2.3.0#global/gems/railties-4.2.6/lib/rails/initializable.rb:30:in `run'
from /Users/***/.rvm/gems/ruby-2.3.0#global/gems/railties-4.2.6/lib/rails/initializable.rb:55:in `block in run_initializers'
from /Users/***/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:228:in `block in tsort_each'
from /Users/***/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
from /Users/***/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:431:in `each_strongly_connected_component_from'
from /Users/***/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:349:in `block in each_strongly_connected_component'
from /Users/***/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:347:in `each'
from /Users/***/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:347:in `call'
from /Users/***/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:347:in `each_strongly_connected_component'
from /Users/***/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:226:in `tsort_each'
from /Users/***/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:205:in `tsort_each'
from /Users/***/.rvm/gems/ruby-2.3.0#global/gems/railties-4.2.6/lib/rails/initializable.rb:54:in `run_initializers'
from /Users/***/.rvm/gems/ruby-2.3.0#global/gems/railties-4.2.6/lib/rails/application.rb:352:in `initialize!'
from /Users/***/Documents/Projekte/***/config/environment.rb:5:in `<top (required)>'
from /Users/***/.rvm/gems/ruby-2.3.0#global/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `require'
from /Users/***/.rvm/gems/ruby-2.3.0#global/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `block in require'
from /Users/***/.rvm/gems/ruby-2.3.0#global/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:240:in `load_dependency'
from /Users/***/.rvm/gems/ruby-2.3.0#global/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `require'
from /Users/***/Documents/Projekte/***/config.ru:3:in `block in <main>'
from /Users/***/.rvm/gems/ruby-2.3.0#global/gems/rack-1.6.4/lib/rack/builder.rb:55:in `instance_eval'
from /Users/***/.rvm/gems/ruby-2.3.0#global/gems/rack-1.6.4/lib/rack/builder.rb:55:in `initialize'
from /Users/***/Documents/Projekte/***/config.ru:in `new'
from /Users/***/Documents/Projekte/***/config.ru:in `<main>'
from /Users/***/.rvm/gems/ruby-2.3.0#global/gems/rack-1.6.4/lib/rack/builder.rb:49:in `eval'
from /Users/***/.rvm/gems/ruby-2.3.0#global/gems/rack-1.6.4/lib/rack/builder.rb:49:in `new_from_string'
from /Users/***/.rvm/gems/ruby-2.3.0#global/gems/rack-1.6.4/lib/rack/builder.rb:40:in `parse_file'
from /Users/***/.rvm/gems/ruby-2.3.0#global/gems/rack-1.6.4/lib/rack/server.rb:299:in `build_app_and_options_from_config'
from /Users/***/.rvm/gems/ruby-2.3.0#global/gems/rack-1.6.4/lib/rack/server.rb:208:in `app'
from /Users/***/.rvm/gems/ruby-2.3.0#global/gems/railties-4.2.6/lib/rails/commands/server.rb:61:in `app'
from /Users/***/.rvm/gems/ruby-2.3.0#global/gems/rack-1.6.4/lib/rack/server.rb:336:in `wrapped_app'
from /Users/***/.rvm/gems/ruby-2.3.0#global/gems/rack-1.6.4/lib/rack/server.rb:272:in `start'
from /Users/***/.rvm/gems/ruby-2.3.0#global/gems/railties-4.2.6/lib/rails/commands/server.rb:80:in `start'
from /Users/***/.rvm/gems/ruby-2.3.0#global/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:80:in `block in server'
from /Users/***/.rvm/gems/ruby-2.3.0#global/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:75:in `tap'
from /Users/***/.rvm/gems/ruby-2.3.0#global/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:75:in `server'
from /Users/***/.rvm/gems/ruby-2.3.0#global/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from /Users/***/.rvm/gems/ruby-2.3.0#global/gems/railties-4.2.6/lib/rails/commands.rb:17:in `<top (required)>'
from /Users/***/Documents/Projekte/***/bin/rails:8:in `require'
from /Users/***/Documents/Projekte/***/bin/rails:8:in `<top (required)>'
from /Users/***/.rvm/gems/ruby-2.3.0/gems/spring-1.7.1/lib/spring/client/rails.rb:28:in `load'
from /Users/***/.rvm/gems/ruby-2.3.0/gems/spring-1.7.1/lib/spring/client/rails.rb:28:in `call'
from /Users/***/.rvm/gems/ruby-2.3.0/gems/spring-1.7.1/lib/spring/client/command.rb:7:in `call'
from /Users/***/.rvm/gems/ruby-2.3.0/gems/spring-1.7.1/lib/spring/client.rb:30:in `run'
from /Users/***/.rvm/gems/ruby-2.3.0/gems/spring-1.7.1/bin/spring:49:in `<top (required)>'
from /Users/***/.rvm/gems/ruby-2.3.0/gems/spring-1.7.1/lib/spring/binstub.rb:11:in `load'
from /Users/***/.rvm/gems/ruby-2.3.0/gems/spring-1.7.1/lib/spring/binstub.rb:11:in `<top (required)>'
from /Users/***/Documents/Projekte/***/bin/spring:16:in `require'
from /Users/***/Documents/Projekte/***/bin/spring:16:in `<top (required)>'
from bin/rails:3:in `load'
from bin/rails:3:in `<main>'
From the stacktrace, the class Sponsorship has on line 2 a call to a method paperclip. This method does not exist in your code or in the paperclip gem. You need to look at that line and fix it.
The reason that it is not blowing up in development / test is that the code is not auto-loaded in these environments (specifically, in the configuration config.eager_load is set to true in production but false in development.
If you start a rails console in development and run something like Sponsorship.first I bet you will see an error.
I just upgraded my OS X from 10.7.5 to 10.9.3.
I've done the following:
- Upgraded ruby to 2.1.2 (and using it)
- bundle install succeeded
- installed postgres, server running.
$rails server -p 5000
works (the server runs)
However, when I do
$rake db:migrate
It gives me the following error:
rake aborted!
NameError: uninitialized constant AbstractController::Error
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/actionpack-4.1.1/lib/abstract_controller/rendering.rb:8:in `<module:AbstractController>'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/actionpack-4.1.1/lib/abstract_controller/rendering.rb:7:in `<top (required)>'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/haml-3.1.6/lib/haml/helpers/rails_323_textarea_fix.rb:1:in `<top (required)>'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/haml-3.1.6/lib/haml/helpers/action_view_mods.rb:260:in `<top (required)>'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/haml-3.1.6/lib/haml/template.rb:3:in `<top (required)>'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/haml-3.1.6/lib/haml.rb:41:in `block in init_rails'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/haml-3.1.6/lib/haml.rb:41:in `each'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/haml-3.1.6/lib/haml.rb:41:in `init_rails'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/haml-3.1.6/lib/haml/railtie.rb:16:in `block (2 levels) in <top (required)>'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.1/lib/active_support/lazy_load_hooks.rb:38:in `instance_eval'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.1/lib/active_support/lazy_load_hooks.rb:38:in `execute_hook'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.1/lib/active_support/lazy_load_hooks.rb:28:in `block in on_load'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.1/lib/active_support/lazy_load_hooks.rb:27:in `each'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.1/lib/active_support/lazy_load_hooks.rb:27:in `on_load'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/haml-3.1.6/lib/haml/railtie.rb:15:in `block in <top (required)>'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.1/lib/active_support/lazy_load_hooks.rb:38:in `instance_eval'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.1/lib/active_support/lazy_load_hooks.rb:38:in `execute_hook'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.1/lib/active_support/lazy_load_hooks.rb:45:in `block in run_load_hooks'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.1/lib/active_support/lazy_load_hooks.rb:44:in `each'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.1/lib/active_support/lazy_load_hooks.rb:44:in `run_load_hooks'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/application/bootstrap.rb:76:in `block in <module:Bootstrap>'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/initializable.rb:30:in `instance_exec'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/initializable.rb:30:in `run'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/initializable.rb:55:in `block in run_initializers'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/initializable.rb:54:in `run_initializers'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/application.rb:288:in `initialize!'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/railtie.rb:194:in `public_send'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/railtie.rb:194:in `method_missing'
/Users/ppd/Academics/Research/git/teapot/config/environment.rb:5:in `<top (required)>'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/application.rb:264:in `require_environment!'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/application.rb:367:in `block in run_tasks_blocks'
/Users/ppd/.rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in `eval'
/Users/ppd/.rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => db:migrate => environment
(See full trace by running task with --trace)
I can't seem to find anything on this on google/SO. I'd really appreciate help with it!
I haven't figured out the details of it, but apparently Haml is the culprit here.
Remove gem 'haml-rails' from your Gemfile if you have it, and replace it with:
gem 'haml', '~> 4.0.0'
Then run bundle update and boot up the Rails server again.
I am trying to create a Rails app in Heroku. I run it locally(nitrous.io) and works fine. I am not sure what is going on here and no idea what I did wrong. I have already read many other answers on SO but none seemed to work for me. I hope someone has experience with this and can help me out!
Following the directions here I already added this:
#config/application.rb
config.serve_static_assets = true
#Gemfile
gem 'rails_12factor', group: :production
.
-----> Preparing app for Rails asset pipeline
Running: rake assets:precompile
rake aborted!
IndexError: string not matched
/tmp/build_5191aa8d-0f78-44fd-a9ad-b6620c655951/vendor/bundle/ruby/2.1.0/gems/activerecord-4.1.0/lib/active_record/connection_handling.rb:76:in `[]='
/tmp/build_5191aa8d-0f78-44fd-a9ad-b6620c655951/vendor/bundle/ruby/2.1.0/gems/activerecord-4.1.0/lib/active_record/connection_handling.rb:76:in `block in config'
/tmp/build_5191aa8d-0f78-44fd-a9ad-b6620c655951/vendor/bundle/ruby/2.1.0/gems/activerecord-4.1.0/lib/active_record/connection_handling.rb:74:in `tap'
/tmp/build_5191aa8d-0f78-44fd-a9ad-b6620c655951/vendor/bundle/ruby/2.1.0/gems/activerecord-4.1.0/lib/active_record/connection_handling.rb:74:in `config'
/tmp/build_5191aa8d-0f78-44fd-a9ad-b6620c655951/vendor/bundle/ruby/2.1.0/gems/activerecord-4.1.0/lib/active_record/connection_handling.rb:69:in `resolve'
/tmp/build_5191aa8d-0f78-44fd-a9ad-b6620c655951/vendor/bundle/ruby/2.1.0/gems/activerecord-4.1.0/lib/active_record/core.rb:46:in `configurations='
/tmp/build_5191aa8d-0f78-44fd-a9ad-b6620c655951/vendor/bundle/ruby/2.1.0/gems/activerecord-4.1.0/lib/active_record/railtie.rb:128:in `block (2 levels) in <class:Railtie>'
/tmp/build_5191aa8d-0f78-44fd-a9ad-b6620c655951/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.0/lib/active_support/lazy_load_hooks.rb:38:in `instance_eval'
/tmp/build_5191aa8d-0f78-44fd-a9ad-b6620c655951/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.0/lib/active_support/lazy_load_hooks.rb:38:in `execute_hook'
/tmp/build_5191aa8d-0f78-44fd-a9ad-b6620c655951/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.0/lib/active_support/lazy_load_hooks.rb:28:in `block in on_load'
/tmp/build_5191aa8d-0f78-44fd-a9ad-b6620c655951/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.0/lib/active_support/lazy_load_hooks.rb:27:in `each'
/tmp/build_5191aa8d-0f78-44fd-a9ad-b6620c655951/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.0/lib/active_support/lazy_load_hooks.rb:27:in `on_load'
/tmp/build_5191aa8d-0f78-44fd-a9ad-b6620c655951/vendor/bundle/ruby/2.1.0/gems/activerecord-4.1.0/lib/active_record/railtie.rb:118:in `block in <class:Railtie>'
/tmp/build_5191aa8d-0f78-44fd-a9ad-b6620c655951/vendor/bundle/ruby/2.1.0/gems/railties-4.1.0/lib/rails/initializable.rb:30:in `instance_exec'
/tmp/build_5191aa8d-0f78-44fd-a9ad-b6620c655951/vendor/bundle/ruby/2.1.0/gems/railties-4.1.0/lib/rails/initializable.rb:30:in `run'
/tmp/build_5191aa8d-0f78-44fd-a9ad-b6620c655951/vendor/bundle/ruby/2.1.0/gems/railties-4.1.0/lib/rails/initializable.rb:55:in `block in run_initializers'
/tmp/build_5191aa8d-0f78-44fd-a9ad-b6620c655951/vendor/bundle/ruby/2.1.0/gems/railties-4.1.0/lib/rails/initializable.rb:54:in `run_initializers'
/tmp/build_5191aa8d-0f78-44fd-a9ad-b6620c655951/vendor/bundle/ruby/2.1.0/gems/railties-4.1.0/lib/rails/application.rb:288:in `initialize!'
/tmp/build_5191aa8d-0f78-44fd-a9ad-b6620c655951/vendor/bundle/ruby/2.1.0/gems/railties-4.1.0/lib/rails/railtie.rb:194:in `public_send'
/tmp/build_5191aa8d-0f78-44fd-a9ad-b6620c655951/vendor/bundle/ruby/2.1.0/gems/railties-4.1.0/lib/rails/railtie.rb:194:in `method_missing'
/tmp/build_5191aa8d-0f78-44fd-a9ad-b6620c655951/config/environment.rb:5:in `<top (required)>'
/tmp/build_5191aa8d-0f78-44fd-a9ad-b6620c655951/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.0/lib/active_support/dependencies.rb:247:in `require'
/tmp/build_5191aa8d-0f78-44fd-a9ad-b6620c655951/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.0/lib/active_support/dependencies.rb:247:in `block in require'
/tmp/build_5191aa8d-0f78-44fd-a9ad-b6620c655951/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.0/lib/active_support/dependencies.rb:232:in `load_dependency'
/tmp/build_5191aa8d-0f78-44fd-a9ad-b6620c655951/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.0/lib/active_support/dependencies.rb:247:in `require'
/tmp/build_5191aa8d-0f78-44fd-a9ad-b6620c655951/vendor/bundle/ruby/2.1.0/gems/railties-4.1.0/lib/rails/application.rb:264:in `require_environment!'
/tmp/build_5191aa8d-0f78-44fd-a9ad-b6620c655951/vendor/bundle/ruby/2.1.0/gems/railties-4.1.0/lib/rails/application.rb:367:in `block in run_tasks_blocks'
/tmp/build_5191aa8d-0f78-44fd-a9ad-b6620c655951/vendor/bundle/ruby/2.1.0/gems/sprockets-rails-2.1.3/lib/sprockets/rails/task.rb:55:in `block (2 levels) in define'
Tasks: TOP => environment
(See full trace by running task with --trace)
! Precompiling assets failed.
! Push rejected, failed to compile Ruby app
IndexError: string not matched
Indicates that somewhere a string is being accessed as a Hash. For example
#name = 'John'
#name['b'] => will throw this error
Take a look at your config files, it seems to halt there.
My rails project works before. I got this error because I deleted mysql and everything associated mysql.
Then I reinstalled mysql. It got this error. Then I reinstalled ruby and rails. The error is still here. Using "rails new myapp",
then "bundle instal",
then "rails s",
I got the following error:
=> Booting WEBrick
=> Rails 4.0.2 application starting in development on
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
Exiting
**/home/cwu/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/railtie/configuration.rb:95:in `method_missing': undefined method `active_record' for #<Rails::Application::Configuration:0x0000000303cae8> (NoMethodError)
from /home/cwu/Dropbox/project/web/atop/config/environments/development.rb:23:in `block in <top (required)>'**
from /home/cwu/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/railtie/configurable.rb:24:in `class_eval'
from /home/cwu/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/railtie/configurable.rb:24:in `configure'
from /home/cwu/Dropbox/project/web/atop/config/environments/development.rb:1:in `<top (required)>'
from /home/cwu/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `require'
from /home/cwu/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `block in require'
from /home/cwu/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:214:in `load_dependency'
from /home/cwu/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `require'
from /home/cwu/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/engine.rb:591:in `block (2 levels) in <class:Engine>'
from /home/cwu/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/engine.rb:590:in `each'
from /home/cwu/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/engine.rb:590:in `block in <class:Engine>'
from /home/cwu/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/initializable.rb:30:in `instance_exec'
from /home/cwu/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/initializable.rb:30:in `run'
from /home/cwu/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/initializable.rb:55:in `block in run_initializers'
from /home/cwu/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:226:in `block in tsort_each'
from /home/cwu/.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/cwu/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:418:in `block (2 levels) in each_strongly_connected_component_from'
from /home/cwu/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:427:in `each_strongly_connected_component_from'
from /home/cwu/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:417:in `block in each_strongly_connected_component_from'
from /home/cwu/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/initializable.rb:44:in `each'
from /home/cwu/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/initializable.rb:44:in `tsort_each_child'
from /home/cwu/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:411:in `call'
from /home/cwu/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:411:in `each_strongly_connected_component_from'
from /home/cwu/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:347:in `block in each_strongly_connected_component'
from /home/cwu/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:345:in `each'
from /home/cwu/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:345:in `call'
from /home/cwu/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:345:in `each_strongly_connected_component'
from /home/cwu/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:224:in `tsort_each'
from /home/cwu/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:205:in `tsort_each'
from /home/cwu/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/initializable.rb:54:in `run_initializers'
from /home/cwu/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/application.rb:215:in `initialize!'
from /home/cwu/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /home/cwu/Dropbox/project/web/atop/config/environment.rb:5:in `<top (required)>'
from /home/cwu/Dropbox/project/web/atop/config.ru:3:in `require'
from /home/cwu/Dropbox/project/web/atop/config.ru:3:in `block in <main>'
from /home/cwu/.rvm/gems/ruby-2.1.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `instance_eval'
from /home/cwu/.rvm/gems/ruby-2.1.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `initialize'
from /home/cwu/Dropbox/project/web/atop/config.ru:in `new'
from /home/cwu/Dropbox/project/web/atop/config.ru:in `<main>'
from /home/cwu/.rvm/gems/ruby-2.1.0/gems/rack-1.5.2/lib/rack/builder.rb:49:in `eval'
from /home/cwu/.rvm/gems/ruby-2.1.0/gems/rack-1.5.2/lib/rack/builder.rb:49:in `new_from_string'
from /home/cwu/.rvm/gems/ruby-2.1.0/gems/rack-1.5.2/lib/rack/builder.rb:40:in `parse_file'
from /home/cwu/.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/cwu/.rvm/gems/ruby-2.1.0/gems/rack-1.5.2/lib/rack/server.rb:199:in `app'
from /home/cwu/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/commands/server.rb:48:in `app'
from /home/cwu/.rvm/gems/ruby-2.1.0/gems/rack-1.5.2/lib/rack/server.rb:314:in `wrapped_app'
from /home/cwu/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/commands/server.rb:75:in `start'
from /home/cwu/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/commands.rb:76:in `block in <top (required)>'
from /home/cwu/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/commands.rb:71:in `tap'
from /home/cwu/.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>'
The error is clear that in config/environments/development.rb:23 you configure active_record which is not loaded.
Just remove
config.active_record.migration_error = :page_load
Will be ok.
Leedy Liu is right to some degree, but if you're getting this error when you create a new Rails app, t suggests a deeper problem with your environment
According to this answer, you may have require "active_record/railtie" commented out in your application.rb file. Please check to make sure this is not the case
You may have to re-install Rails with ActiveRecord to ensure the functionality is restored with your app. Have you tried this:
gem install bundler
gem install rails
bundle install
Other than that, you need to ensure Ruby on Rails is installed correctly. What env are you running? Linux or Windows?
As a general fix, remove all references to active_record. Easiest way is to do a find on the root directory of "active_records", find all usages, and remove them. I found usages in config/application.rb and config/environments/development and production.rb.
Try:
'gem install bundler'
then:
'bundle install'
again.
See if it clears up.
Comment config.active_record.raise_in_transactional_callbacks = true in config/application.rb and config.active_record.migration_error = :page_load in config/environments/development.rb.
I'm looking into updating this enormous web site. Its huge. It uses Ruby 1.9.3-p448, Rails 3.2.17, and Spree 2.0.0. I'd love to push it to Ruby 2.1.1, Rails 4.1-stable, and Spree 2.1.0.
First things first:
I went to the gemfile and on line 2 wrote ruby '2.1.1'. This is to do number 1: upgrade the language itself. In the terminal I did the usual bundle and got an error. Discovered the debugger gem doesn't work in 2.x territory. Highlighted it. Pushed delete. Chuckled. Ran bundle. Smiled of delight as it was so nice to see everything work with such a complex system.
Then I ran bundle exec rake db:test:prepare...
First error:
rake aborted!
cannot load such file -- iconv
/Users/benamorgan/.rvm/gems/ruby-2.1.1/gems/polyglot-0.3.4/lib/polyglot.rb:65:in `require'
/Users/benamorgan/.rvm/gems/ruby-2.1.1/gems/polyglot-0.3.4/lib/polyglot.rb:65:in `require'
/Users/benamorgan/.rvm/gems/ruby-2.1.1/bundler/gems/rails-a3bda3846737/activesupport/lib/active_support/dependencies.rb:251:in `block in require'
/Users/benamorgan/.rvm/gems/ruby-2.1.1/bundler/gems/rails-a3bda3846737/activesupport/lib/active_support/dependencies.rb:236:in `load_dependency'
/Users/benamorgan/.rvm/gems/ruby-2.1.1/bundler/gems/rails-a3bda3846737/activesupport/lib/active_support/dependencies.rb:251:in `require'
/Users/benamorgan/.rvm/gems/ruby-2.1.1/gems/csv_builder-2.1.0/lib/csv_builder.rb:14:in `<top (required)>'
/Users/benamorgan/.rvm/gems/ruby-2.1.1#global/gems/bundler-1.5.3/lib/bundler/runtime.rb:76:in `require'
/Users/benamorgan/.rvm/gems/ruby-2.1.1#global/gems/bundler-1.5.3/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
/Users/benamorgan/.rvm/gems/ruby-2.1.1#global/gems/bundler-1.5.3/lib/bundler/runtime.rb:72:in `each'
/Users/benamorgan/.rvm/gems/ruby-2.1.1#global/gems/bundler-1.5.3/lib/bundler/runtime.rb:72:in `block in require'
/Users/benamorgan/.rvm/gems/ruby-2.1.1#global/gems/bundler-1.5.3/lib/bundler/runtime.rb:61:in `each'
/Users/benamorgan/.rvm/gems/ruby-2.1.1#global/gems/bundler-1.5.3/lib/bundler/runtime.rb:61:in `require'
/Users/benamorgan/.rvm/gems/ruby-2.1.1#global/gems/bundler-1.5.3/lib/bundler.rb:131:in `require'
/Users/benamorgan/Sites/not_getting_name_of_site/config/application.rb:7:in `<top (required)>'
/Users/benamorgan/Sites/not_getting_name_of_site/Rakefile:5:in `require'
/Users/benamorgan/Sites/not_getting_name_of_site/Rakefile:5:in `<top (required)>'
/Users/benamorgan/.rvm/gems/ruby-2.1.1/bin/ruby_executable_hooks:15:in `eval'
/Users/benamorgan/.rvm/gems/ruby-2.1.1/bin/ruby_executable_hooks:15:in `<main>'
(See full trace by running task with --trace)
OK... In the gemfile...
gem 'iconv'
run bundle exec rake db:test:prepare again after a bundle:
Digest::Digest is deprecated; use Digest
rake aborted!
no implicit conversion of nil into String
/Users/benamorgan/.rvm/gems/ruby-2.1.1/gems/mysql2-0.3.13/lib/mysql2/client.rb:58:in `connect'
/Users/benamorgan/.rvm/gems/ruby-2.1.1/gems/mysql2-0.3.13/lib/mysql2/client.rb:58:in `initialize'
/Users/benamorgan/.rvm/gems/ruby-2.1.1/bundler/gems/rails-a3bda3846737/activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb:16:in `new'
/Users/benamorgan/.rvm/gems/ruby-2.1.1/bundler/gems/rails-a3bda3846737/activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb:16:in `mysql2_connection'
/Users/benamorgan/.rvm/gems/ruby-2.1.1/bundler/gems/rails-a3bda3846737/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:315:in `new_connection'
/Users/benamorgan/.rvm/gems/ruby-2.1.1/bundler/gems/rails-a3bda3846737/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:325:in `checkout_new_connection'
/Users/benamorgan/.rvm/gems/ruby-2.1.1/bundler/gems/rails-a3bda3846737/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:247:in `block (2 levels) in checkout'
/Users/benamorgan/.rvm/gems/ruby-2.1.1/bundler/gems/rails-a3bda3846737/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:242:in `loop'
/Users/benamorgan/.rvm/gems/ruby-2.1.1/bundler/gems/rails-a3bda3846737/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:242:in `block in checkout'
/Users/benamorgan/.rvm/gems/ruby-2.1.1/bundler/gems/rails-a3bda3846737/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:239:in `checkout'
/Users/benamorgan/.rvm/gems/ruby-2.1.1/bundler/gems/rails-a3bda3846737/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:102:in `block in connection'
/Users/benamorgan/.rvm/gems/ruby-2.1.1/bundler/gems/rails-a3bda3846737/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:101:in `connection'
/Users/benamorgan/.rvm/gems/ruby-2.1.1/bundler/gems/rails-a3bda3846737/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:410:in `retrieve_connection'
/Users/benamorgan/.rvm/gems/ruby-2.1.1/bundler/gems/rails-a3bda3846737/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb:171:in `retrieve_connection'
/Users/benamorgan/.rvm/gems/ruby-2.1.1/bundler/gems/rails-a3bda3846737/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb:145:in `connection'
/Users/benamorgan/.rvm/gems/ruby-2.1.1/bundler/gems/rails-a3bda3846737/activerecord/lib/active_record/model_schema.rb:224:in `table_exists?'
/Users/benamorgan/.rvm/gems/ruby-2.1.1/bundler/gems/rails-a3bda3846737/activerecord/lib/active_record/attribute_methods.rb:122:in `attribute_method?'
/Users/benamorgan/.rvm/gems/ruby-2.1.1/bundler/gems/spree-9c3a61024d8c/core/lib/spree/core/delegate_belongs_to.rb:40:in `block in delegate_belongs_to'
/Users/benamorgan/.rvm/gems/ruby-2.1.1/bundler/gems/spree-9c3a61024d8c/core/lib/spree/core/delegate_belongs_to.rb:39:in `each'
/Users/benamorgan/.rvm/gems/ruby-2.1.1/bundler/gems/spree-9c3a61024d8c/core/lib/spree/core/delegate_belongs_to.rb:39:in `delegate_belongs_to'
/Users/benamorgan/.rvm/gems/ruby-2.1.1/bundler/gems/spree-9c3a61024d8c/core/app/models/spree/gateway.rb:3:in `<class:Gateway>'
/Users/benamorgan/.rvm/gems/ruby-2.1.1/bundler/gems/spree-9c3a61024d8c/core/app/models/spree/gateway.rb:2:in `<module:Spree>'
/Users/benamorgan/.rvm/gems/ruby-2.1.1/bundler/gems/spree-9c3a61024d8c/core/app/models/spree/gateway.rb:1:in `<top (required)>'
/Users/benamorgan/.rvm/gems/ruby-2.1.1/gems/zeus-0.13.3/lib/zeus/load_tracking.rb:50:in `load'
/Users/benamorgan/.rvm/gems/ruby-2.1.1/gems/zeus-0.13.3/lib/zeus/load_tracking.rb:50:in `load'
/Users/benamorgan/.rvm/gems/ruby-2.1.1/bundler/gems/rails-a3bda3846737/activesupport/lib/active_support/dependencies.rb:469:in `block in load_file'
/Users/benamorgan/.rvm/gems/ruby-2.1.1/bundler/gems/rails-a3bda3846737/activesupport/lib/active_support/dependencies.rb:639:in `new_constants_in'
/Users/benamorgan/.rvm/gems/ruby-2.1.1/bundler/gems/rails-a3bda3846737/activesupport/lib/active_support/dependencies.rb:468:in `load_file'
/Users/benamorgan/.rvm/gems/ruby-2.1.1/bundler/gems/rails-a3bda3846737/activesupport/lib/active_support/dependencies.rb:353:in `require_or_load'
/Users/benamorgan/.rvm/gems/ruby-2.1.1/bundler/gems/rails-a3bda3846737/activesupport/lib/active_support/dependencies.rb:502:in `load_missing_constant'
/Users/benamorgan/.rvm/gems/ruby-2.1.1/bundler/gems/rails-a3bda3846737/activesupport/lib/active_support/dependencies.rb:192:in `block in const_missing'
/Users/benamorgan/.rvm/gems/ruby-2.1.1/bundler/gems/rails-a3bda3846737/activesupport/lib/active_support/dependencies.rb:190:in `each'
/Users/benamorgan/.rvm/gems/ruby-2.1.1/bundler/gems/rails-a3bda3846737/activesupport/lib/active_support/dependencies.rb:190:in `const_missing'
/Users/benamorgan/.rvm/gems/ruby-2.1.1/bundler/gems/spree-9c3a61024d8c/core/lib/spree/core/engine.rb:59:in `block in <class:Engine>'
/Users/benamorgan/.rvm/gems/ruby-2.1.1/bundler/gems/rails-a3bda3846737/railties/lib/rails/initializable.rb:30:in `instance_exec'
/Users/benamorgan/.rvm/gems/ruby-2.1.1/bundler/gems/rails-a3bda3846737/railties/lib/rails/initializable.rb:30:in `run'
/Users/benamorgan/.rvm/gems/ruby-2.1.1/bundler/gems/rails-a3bda3846737/railties/lib/rails/initializable.rb:55:in `block in run_initializers'
/Users/benamorgan/.rvm/gems/ruby-2.1.1/bundler/gems/rails-a3bda3846737/railties/lib/rails/initializable.rb:54:in `each'
/Users/benamorgan/.rvm/gems/ruby-2.1.1/bundler/gems/rails-a3bda3846737/railties/lib/rails/initializable.rb:54:in `run_initializers'
/Users/benamorgan/.rvm/gems/ruby-2.1.1/bundler/gems/rails-a3bda3846737/railties/lib/rails/application.rb:136:in `initialize!'
/Users/benamorgan/.rvm/gems/ruby-2.1.1/bundler/gems/rails-a3bda3846737/railties/lib/rails/railtie/configurable.rb:30:in `method_missing'
/Users/benamorgan/Sites/not_getting_name_of_site/config/environment.rb:5:in `<top (required)>'
/Users/benamorgan/.rvm/gems/ruby-2.1.1/gems/polyglot-0.3.4/lib/polyglot.rb:65:in `require'
/Users/benamorgan/.rvm/gems/ruby-2.1.1/gems/polyglot-0.3.4/lib/polyglot.rb:65:in `require'
/Users/benamorgan/.rvm/gems/ruby-2.1.1/bundler/gems/rails-a3bda3846737/activesupport/lib/active_support/dependencies.rb:251:in `block in require'
/Users/benamorgan/.rvm/gems/ruby-2.1.1/bundler/gems/rails-a3bda3846737/activesupport/lib/active_support/dependencies.rb:236:in `load_dependency'
/Users/benamorgan/.rvm/gems/ruby-2.1.1/bundler/gems/rails-a3bda3846737/activesupport/lib/active_support/dependencies.rb:251:in `require'
/Users/benamorgan/.rvm/gems/ruby-2.1.1/bundler/gems/rails-a3bda3846737/railties/lib/rails/application.rb:103:in `require_environment!'
/Users/benamorgan/.rvm/gems/ruby-2.1.1/bundler/gems/rails-a3bda3846737/railties/lib/rails/application.rb:305:in `block (2 levels) in initialize_tasks'
/Users/benamorgan/.rvm/gems/ruby-2.1.1/bin/ruby_executable_hooks:15:in `eval'
/Users/benamorgan/.rvm/gems/ruby-2.1.1/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => db:test:prepare => db:abort_if_pending_migrations => environment
(See full trace by running task with --trace)
My question here really isn't how do I fix this or why is it all breaking, but do you have any pointers? How do I find out where Digest::Digest is coming from? We aren't using it in the site, therefore its a gem problem. I'm probably going to have to deal with more of those "deprecation" warnings, so before I blow hours and hours on it, I just need to know if anyone else has had to go through anything of what I'm attempting right now.
Horror stories much appreciated.
I don't think Digest is the cause of your problems. It seems that MySQL can't connect to your database correctly. Are you sure that your config/database.yml settings are correct for your current environment?
I don't know for certain, but if the error is pointing directly at this line then it's my best guess that you've got your database mis-configured within config/database.yml.
I've found that I get the same error message whenever my installed version of csv_builder is out of sync with my installed version of MRI.
I see you're using MRI 2.1.1 and csv_builder 2.1.0. You can possibly fix this issue by removing the iconv gem, and bumping your version of csv_builder so that it matches the version of MRI:
# Gemfile
gem 'csv_builder', '2.1.1'
> bundle update csv_builder
> bundle exec rake tes
Worked for me... YMMV etc