Redmine receive mail field - ruby-on-rails

I have redmine site:
Environment:
Redmine version 2.3.3.devel
Ruby version 1.9.3-p448 (2013-06-27) [x86_64-linux]
Rails version 3.2.13
Environment production
Database adapter Mysql2
SCM:
Subversion 1.6.11
Git 1.7.1
Filesystem
Redmine plugins:
redmine_contacts 3.2.2-light
redmine_contacts_invoices 2.1.0-light
redmine_favorite_projects 1.0.0
redmine_finance 1.0.1-light
redmine_issue_checklist 2.0.5
redmine_people 0.1.6
redmine_questions 0.0.4
I updated ruby and redmine, receiving mail not working (it worked before)
/usr/bin/rake -f /var/www/html/redmine/Rakefile --silent redmine:email:receive_pop3 RAILS_ENV="production" host=mail.my.site username=redmine#my.site password=mypassword delete_unprocessed=1 --trace
Your FCGI gem does not contain the FCGI shared library, running pure ruby instead
** Invoke redmine:email:receive_pop3 (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute redmine:email:receive_pop3
rake aborted!
"\xCE" from ASCII-8BIT to UTF-8
/usr/local/rvm/gems/ruby-1.9.3-p448/gems/mail-2.5.4/lib/mail/fields/unstructured_field.rb:149:in `encode!'
/usr/local/rvm/gems/ruby-1.9.3-p448/gems/mail-2.5.4/lib/mail/fields/unstructured_field.rb:149:in `fold'
/usr/local/rvm/gems/ruby-1.9.3-p448/gems/mail-2.5.4/lib/mail/fields/unstructured_field.rb:103:in `wrapped_value'
/usr/local/rvm/gems/ruby-1.9.3-p448/gems/mail-2.5.4/lib/mail/fields/unstructured_field.rb:69:in `do_encode'
/usr/local/rvm/gems/ruby-1.9.3-p448/gems/mail-2.5.4/lib/mail/fields/unstructured_field.rb:51:in `encoded'
/usr/local/rvm/gems/ruby-1.9.3-p448/gems/mail-2.5.4/lib/mail/field.rb:167:in `method_missing'
/usr/local/rvm/gems/ruby-1.9.3-p448/gems/mail-2.5.4/lib/mail/header.rb:206:in `block in encoded'
/usr/local/rvm/gems/ruby-1.9.3-p448/gems/mail-2.5.4/lib/mail/header.rb:205:in `each'
/usr/local/rvm/gems/ruby-1.9.3-p448/gems/mail-2.5.4/lib/mail/header.rb:205:in `encoded'
/usr/local/rvm/gems/ruby-1.9.3-p448/gems/mail-2.5.4/lib/mail/message.rb:1801:in `encoded'
/usr/local/rvm/gems/ruby-1.9.3-p448/gems/actionmailer-3.2.13/lib/action_mailer/base.rb:434:in `set_payload_for_mail'
/usr/local/rvm/gems/ruby-1.9.3-p448/gems/actionmailer-3.2.13/lib/action_mailer/base.rb:403:in `block in receive'
/usr/local/rvm/gems/ruby-1.9.3-p448/gems/activesupport-3.2.13/lib/active_support/notifications.rb:123:in `block in instrument'
/usr/local/rvm/gems/ruby-1.9.3-p448/gems/activesupport-3.2.13/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/usr/local/rvm/gems/ruby-1.9.3-p448/gems/activesupport-3.2.13/lib/active_support/notifications.rb:123:in `instrument'
/usr/local/rvm/gems/ruby-1.9.3-p448/gems/actionmailer-3.2.13/lib/action_mailer/base.rb:401:in `receive'
/var/www/html/redmine/app/models/mail_handler.rb:46:in `receive'
/var/www/html/redmine/lib/redmine/pop3.rb:39:in `block (2 levels) in check'
/usr/local/rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/net/pop.rb:665:in `each'
/usr/local/rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/net/pop.rb:665:in `each_mail'
/var/www/html/redmine/lib/redmine/pop3.rb:36:in `block in check'
/usr/local/rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/net/pop.rb:533:in `start'
/var/www/html/redmine/lib/redmine/pop3.rb:31:in `check'
/var/www/html/redmine/lib/tasks/email.rake:152:in `block (3 levels) in <top (required)>'
/usr/local/rvm/gems/ruby-1.9.3-p448/gems/rake-10.1.0/lib/rake/task.rb:236:in `call'
/usr/local/rvm/gems/ruby-1.9.3-p448/gems/rake-10.1.0/lib/rake/task.rb:236:in `block in execute'
/usr/local/rvm/gems/ruby-1.9.3-p448/gems/rake-10.1.0/lib/rake/task.rb:231:in `each'
/usr/local/rvm/gems/ruby-1.9.3-p448/gems/rake-10.1.0/lib/rake/task.rb:231:in `execute'
/usr/local/rvm/gems/ruby-1.9.3-p448/gems/rake-10.1.0/lib/rake/task.rb:175:in `block in invoke_with_call_chain'
/usr/local/rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/usr/local/rvm/gems/ruby-1.9.3-p448/gems/rake-10.1.0/lib/rake/task.rb:168:in `invoke_with_call_chain'
/usr/local/rvm/gems/ruby-1.9.3-p448/gems/rake-10.1.0/lib/rake/task.rb:161:in `invoke'
/usr/local/rvm/gems/ruby-1.9.3-p448/gems/rake-10.1.0/lib/rake/application.rb:149:in `invoke_task'
/usr/local/rvm/gems/ruby-1.9.3-p448/gems/rake-10.1.0/lib/rake/application.rb:106:in `block (2 levels) in top_level'
/usr/local/rvm/gems/ruby-1.9.3-p448/gems/rake-10.1.0/lib/rake/application.rb:106:in `each'
/usr/local/rvm/gems/ruby-1.9.3-p448/gems/rake-10.1.0/lib/rake/application.rb:106:in `block in top_level'
/usr/local/rvm/gems/ruby-1.9.3-p448/gems/rake-10.1.0/lib/rake/application.rb:115:in `run_with_threads'
/usr/local/rvm/gems/ruby-1.9.3-p448/gems/rake-10.1.0/lib/rake/application.rb:100:in `top_level'
/usr/local/rvm/gems/ruby-1.9.3-p448/gems/rake-10.1.0/lib/rake/application.rb:78:in `block in run'
/usr/local/rvm/gems/ruby-1.9.3-p448/gems/rake-10.1.0/lib/rake/application.rb:165:in `standard_exception_handling'
/usr/local/rvm/gems/ruby-1.9.3-p448/gems/rake-10.1.0/lib/rake/application.rb:75:in `run'
/usr/local/rvm/gems/ruby-1.9.3-p448/gems/rake-10.1.0/bin/rake:33:in `<top (required)>'
/usr/bin/rake:23:in `load'
/usr/bin/rake:23:in `<main>'
Tasks: TOP => redmine:email:receive_pop3
please help somebody

I had the same error when a non-MIME-compliant message was received: the Subject line included a non-ASCII character.

Upgrade to Redmine 2.6. That should solve the problem.

Related

Thinking Sphinx 3.1.4 ActiveRecord::ConfigurationError on indexing

I'm on Rails 3.2.21 and Thinking-Sphinx 3.1.4 using Sphinx 2.2.9-id64-release (rel22-r5006).
I just moved over from mysql to postgres and when I index I get this error:
production#vagrant:/opt/rails/production/current$ rake ts:index --trace
** Invoke ts:index (first_time)
** Invoke environment (first_time)
** Execute environment
** [Raven] Raven 0.13.3 ready to catch errors
** Execute ts:index
Generating configuration to /opt/data/production-schedule/sphinx/development.sphinx.conf
rake aborted!
ActiveRecord::ConfigurationError: #<Proc:0x007f8daccfec20#/home/production/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/thinking-sphinx-3.1.4/lib/thinking_sphinx/active_record/filter_reflection.rb:57 (lambda)>
/home/production/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/activerecord-3.2.21/lib/active_record/associations/join_dependency.rb:131:in `build'
/home/production/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/activerecord-3.2.21/lib/active_record/associations/join_dependency.rb:24:in `block in graft'
/home/production/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/activerecord-3.2.21/lib/active_record/associations/join_dependency.rb:22:in `each'
/home/production/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/activerecord-3.2.21/lib/active_record/associations/join_dependency.rb:22:in `graft'
/home/production/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/activerecord-3.2.21/lib/active_record/relation/query_methods.rb:364:in `build_joins'
/home/production/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/activerecord-3.2.21/lib/active_record/relation/query_methods.rb:266:in `build_arel'
/home/production/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/activerecord-3.2.21/lib/active_record/relation/query_methods.rb:260:in `arel'
/home/production/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/activerecord-3.2.21/lib/active_record/relation.rb:459:in `to_sql'
/home/production/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/thinking-sphinx-3.1.4/lib/thinking_sphinx/active_record/sql_builder.rb:11:in `sql_query'
/home/production/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/thinking-sphinx-3.1.4/lib/thinking_sphinx/active_record/sql_source.rb:119:in `build_sql_query'
/home/production/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/thinking-sphinx-3.1.4/lib/thinking_sphinx/active_record/sql_source.rb:135:in `prepare_for_render'
/home/production/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/thinking-sphinx-3.1.4/lib/thinking_sphinx/active_record/sql_source.rb:65:in `render'
/home/production/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/riddle-1.5.12/lib/riddle/configuration/index.rb:29:in `block in render'
/home/production/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/riddle-1.5.12/lib/riddle/configuration/index.rb:29:in `collect'
/home/production/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/riddle-1.5.12/lib/riddle/configuration/index.rb:29:in `render'
/home/production/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/thinking-sphinx-3.1.4/lib/thinking_sphinx/core/index.rb:57:in `render'
/home/production/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/riddle-1.5.12/lib/riddle/configuration.rb:43:in `block in render'
/home/production/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/riddle-1.5.12/lib/riddle/configuration.rb:43:in `collect'
/home/production/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/riddle-1.5.12/lib/riddle/configuration.rb:43:in `render'
/home/production/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/thinking-sphinx-3.1.4/lib/thinking_sphinx/configuration.rb:93:in `render'
/home/production/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/thinking-sphinx-3.1.4/lib/thinking_sphinx/configuration.rb:99:in `block in render_to_file'
/home/production/.rbenv/versions/2.1.2/lib/ruby/2.1.0/open-uri.rb:36:in `open'
/home/production/.rbenv/versions/2.1.2/lib/ruby/2.1.0/open-uri.rb:36:in `open'
/home/production/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/thinking-sphinx-3.1.4/lib/thinking_sphinx/configuration.rb:99:in `render_to_file'
/home/production/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/thinking-sphinx-3.1.4/lib/thinking_sphinx/rake_interface.rb:24:in `configure'
/home/production/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/thinking-sphinx-3.1.4/lib/thinking_sphinx/rake_interface.rb:35:in `index'
/home/production/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/thinking-sphinx-3.1.4/lib/thinking_sphinx/tasks.rb:9:in `block (2 levels) in <top (required)>'
/home/production/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/task.rb:240:in `call'
/home/production/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/task.rb:240:in `block in execute'
/home/production/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/task.rb:235:in `each'
/home/production/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/task.rb:235:in `execute'
/home/production/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/task.rb:179:in `block in invoke_with_call_chain'
/home/production/.rbenv/versions/2.1.2/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize'
/home/production/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/task.rb:172:in `invoke_with_call_chain'
/home/production/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/task.rb:165:in `invoke'
/home/production/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:150:in `invoke_task'
/home/production/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:106:in `block (2 levels) in top_level'
/home/production/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:106:in `each'
/home/production/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:106:in `block in top_level'
/home/production/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:115:in `run_with_threads'
/home/production/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:100:in `top_level'
/home/production/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:78:in `block in run'
/home/production/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:176:in `standard_exception_handling'
/home/production/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:75:in `run'
/home/production/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/rake-10.4.2/bin/rake:33:in `<top (required)>'
/home/production/.rbenv/versions/2.1.2/bin/rake:23:in `load'
/home/production/.rbenv/versions/2.1.2/bin/rake:23:in `<main>'
Tasks: TOP => ts:index
I narrowed down the index to the only two entries which can cause the error, it seems related to polymorphic relationships:
ThinkingSphinx::Index.define(:project, name: 'project', with: :active_record, delta: true) do
indexes data.itemcode, as: :itemcode
polymorphs data, to: PROJECT_DATA_TYPES.map(&:camelize)
end
Any idea why this is not working?
Going by your stacktrace, you're using Rails 3.2 and Thinking Sphinx 3.1.4 - polymorphic association support for Rails 3.2 was dropped in TS v3.1.4 (as covered in the 'Upgrading' section of the release notes). The ActiveRecord internal code changes regularly, and it's just been too painful to support 3.2 alongside 4.x for that specific feature.
If you've only just upgraded TS and had an earlier version that worked, you may want to switch back to that. Or upgrade to Rails 4.0? :)

Rails 4.1 and Thinking Sphinx - undefined method 'parent' for ActiveRecord::Associations::JoinDependency::JoinAssociation

I started to upgrade Rails 4.0 app to Rails 4.1. App uses a lot of gems and Thinking Sphinx is one of them. I have reinstalled thinking-sphinx gem after Rails 4.1 upgrade (to enable proper version of joiner, which is 3.0 now). But now I get weird error from TS when I try, for example, to rebuild index:
$ rake ts:rebuild --trace
** Invoke ts:rebuild (first_time)
** Invoke ts:stop (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute ts:stop
searchd is not currently running.
Stopped searchd daemon (pid: ).
** Invoke ts:index (first_time)
** Invoke environment
** Execute ts:index
Generating configuration to /Users/serj/Projects/project/config/development.sphinx.conf
rake aborted!
NoMethodError: undefined method `parent' for #<ActiveRecord::Associations::JoinDependency::JoinAssociation:0x007ff438543678>
/Users/serj/.rvm/gems/ruby-2.0.0-p353#project/gems/thinking-sphinx-3.1.1/lib/thinking_sphinx/active_record/filtered_reflection.rb:40:in `block in scope'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#project/gems/activerecord-4.1.1/lib/active_record/associations/join_dependency/join_association.rb:52:in `instance_exec'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#project/gems/activerecord-4.1.1/lib/active_record/associations/join_dependency/join_association.rb:52:in `block (2 levels) in join_constraints'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#project/gems/activerecord-4.1.1/lib/active_record/associations/join_dependency/join_association.rb:48:in `map'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#project/gems/activerecord-4.1.1/lib/active_record/associations/join_dependency/join_association.rb:48:in `block in join_constraints'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#project/gems/activerecord-4.1.1/lib/active_record/associations/join_dependency/join_association.rb:33:in `reverse_each'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#project/gems/activerecord-4.1.1/lib/active_record/associations/join_dependency/join_association.rb:33:in `join_constraints'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#project/gems/activerecord-4.1.1/lib/active_record/associations/join_dependency.rb:161:in `make_constraints'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#project/gems/activerecord-4.1.1/lib/active_record/associations/join_dependency.rb:167:in `make_outer_joins'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#project/gems/activerecord-4.1.1/lib/active_record/associations/join_dependency.rb:169:in `block in make_outer_joins'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#project/gems/activerecord-4.1.1/lib/active_record/associations/join_dependency.rb:169:in `each'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#project/gems/activerecord-4.1.1/lib/active_record/associations/join_dependency.rb:169:in `flat_map'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#project/gems/activerecord-4.1.1/lib/active_record/associations/join_dependency.rb:169:in `make_outer_joins'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#project/gems/activerecord-4.1.1/lib/active_record/associations/join_dependency.rb:205:in `block in walk'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#project/gems/activerecord-4.1.1/lib/active_record/associations/join_dependency.rb:205:in `each'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#project/gems/activerecord-4.1.1/lib/active_record/associations/join_dependency.rb:205:in `flat_map'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#project/gems/activerecord-4.1.1/lib/active_record/associations/join_dependency.rb:205:in `walk'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#project/gems/activerecord-4.1.1/lib/active_record/associations/join_dependency.rb:114:in `block in join_constraints'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#project/gems/activerecord-4.1.1/lib/active_record/associations/join_dependency.rb:112:in `each'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#project/gems/activerecord-4.1.1/lib/active_record/associations/join_dependency.rb:112:in `flat_map'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#project/gems/activerecord-4.1.1/lib/active_record/associations/join_dependency.rb:112:in `join_constraints'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#project/gems/activerecord-4.1.1/lib/active_record/relation/query_methods.rb:985:in `build_joins'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#project/gems/activerecord-4.1.1/lib/active_record/relation/query_methods.rb:838:in `build_arel'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#project/gems/activerecord-4.1.1/lib/active_record/relation/query_methods.rb:830:in `arel'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#project/gems/activerecord-4.1.1/lib/active_record/relation.rb:520:in `to_sql'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#project/gems/thinking-sphinx-3.1.1/lib/thinking_sphinx/active_record/sql_builder.rb:11:in `sql_query'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#project/gems/thinking-sphinx-3.1.1/lib/thinking_sphinx/active_record/sql_source.rb:119:in `build_sql_query'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#project/gems/thinking-sphinx-3.1.1/lib/thinking_sphinx/active_record/sql_source.rb:136:in `prepare_for_render'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#project/gems/thinking-sphinx-3.1.1/lib/thinking_sphinx/active_record/sql_source.rb:65:in `render'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#project/gems/riddle-1.5.11/lib/riddle/configuration/index.rb:29:in `block in render'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#project/gems/riddle-1.5.11/lib/riddle/configuration/index.rb:29:in `collect'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#project/gems/riddle-1.5.11/lib/riddle/configuration/index.rb:29:in `render'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#project/gems/thinking-sphinx-3.1.1/lib/thinking_sphinx/core/index.rb:53:in `render'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#project/gems/riddle-1.5.11/lib/riddle/configuration.rb:43:in `block in render'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#project/gems/riddle-1.5.11/lib/riddle/configuration.rb:43:in `collect'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#project/gems/riddle-1.5.11/lib/riddle/configuration.rb:43:in `render'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#project/gems/thinking-sphinx-3.1.1/lib/thinking_sphinx/configuration.rb:90:in `render'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#project/gems/thinking-sphinx-3.1.1/lib/thinking_sphinx/configuration.rb:96:in `block in render_to_file'
/Users/serj/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/open-uri.rb:36:in `open'
/Users/serj/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/open-uri.rb:36:in `open'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#project/gems/thinking-sphinx-3.1.1/lib/thinking_sphinx/configuration.rb:96:in `render_to_file'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#project/gems/thinking-sphinx-3.1.1/lib/thinking_sphinx/rake_interface.rb:13:in `configure'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#project/gems/thinking-sphinx-3.1.1/lib/thinking_sphinx/rake_interface.rb:24:in `index'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#project/gems/thinking-sphinx-3.1.1/lib/thinking_sphinx/tasks.rb:9:in `block (2 levels) in <top (required)>'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#project/gems/rake-10.3.2/lib/rake/task.rb:240:in `call'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#project/gems/rake-10.3.2/lib/rake/task.rb:240:in `block in execute'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#project/gems/rake-10.3.2/lib/rake/task.rb:235:in `each'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#project/gems/rake-10.3.2/lib/rake/task.rb:235:in `execute'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#project/gems/rake-10.3.2/lib/rake/task.rb:179:in `block in invoke_with_call_chain'
/Users/serj/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/monitor.rb:211:in `mon_synchronize'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#project/gems/rake-10.3.2/lib/rake/task.rb:172:in `invoke_with_call_chain'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#project/gems/rake-10.3.2/lib/rake/task.rb:201:in `block in invoke_prerequisites'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#project/gems/rake-10.3.2/lib/rake/task.rb:199:in `each'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#project/gems/rake-10.3.2/lib/rake/task.rb:199:in `invoke_prerequisites'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#project/gems/rake-10.3.2/lib/rake/task.rb:178:in `block in invoke_with_call_chain'
/Users/serj/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/monitor.rb:211:in `mon_synchronize'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#project/gems/rake-10.3.2/lib/rake/task.rb:172:in `invoke_with_call_chain'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#project/gems/rake-10.3.2/lib/rake/task.rb:165:in `invoke'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#project/gems/rake-10.3.2/lib/rake/application.rb:150:in `invoke_task'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#project/gems/rake-10.3.2/lib/rake/application.rb:106:in `block (2 levels) in top_level'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#project/gems/rake-10.3.2/lib/rake/application.rb:106:in `each'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#project/gems/rake-10.3.2/lib/rake/application.rb:106:in `block in top_level'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#project/gems/rake-10.3.2/lib/rake/application.rb:115:in `run_with_threads'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#project/gems/rake-10.3.2/lib/rake/application.rb:100:in `top_level'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#project/gems/rake-10.3.2/lib/rake/application.rb:78:in `block in run'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#project/gems/rake-10.3.2/lib/rake/application.rb:176:in `standard_exception_handling'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#project/gems/rake-10.3.2/lib/rake/application.rb:75:in `run'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#project/gems/rake-10.3.2/bin/rake:33:in `<top (required)>'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#project/bin/rake:23:in `load'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#project/bin/rake:23:in `<main>'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#project/bin/ruby_executable_hooks:15:in `eval'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#project/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => ts:rebuild => ts:index
Gemfile
source 'http://rubygems.org'
gem 'rails', '4.1.0'
# Sphinx.
gem 'mysql2', '0.3.13', platform: :ruby
gem 'thinking-sphinx', '~> 3.1.1'
# ...
thinking_sphinx.yml
development: &defaults
morphology: stem_enru, Soundex, Metaphone
enable_star: 1
expand_keywords: 1
min_infix_len: 2
max_matches: 500000
test:
mysql41: <%= ENV['TEST_ENV_NUMBER'].to_i + 9307 %>
pid_file: <%= File.join(Rails.root, "tmp", "searchd.#{ENV['TEST_ENV_NUMBER']}.pid") %>
indices_location: <%= File.join(Rails.root, "db", "sphinx", "#{ENV['TEST_ENV_NUMBER']}") %>
configuration_file: <%= File.join(Rails.root, "config", "test.#{ENV['TEST_ENV_NUMBER']}.sphinx.conf") %>
binlog_path: <%= File.join(Rails.root, "db", "sphinx", "#{ENV['TEST_ENV_NUMBER']}", "binlog") %>
<<: *defaults
Additional data:
Rails 4.1
Sphinx 2.1.4-release (rel21-r4421)
thinking-sphinx 3.1.1
mysql2 0.3.16 (for sphinx)
pg 0.17.1 (it's my main database)
Any ideas how to deal with that? I can't make the upgrade to new Rails, because the project uses TS very heavy.
Okey, there is the problem with Thinking Sphinx and Rails 4.1. Polymorphic associations are broken in Thinking Sphinx, when you use Rails 4.1 (because, well, a lot of things changed in ActiveRecord). Here is the issue, which I opened: https://github.com/pat/thinking-sphinx/issues/783
In my case I just moved from polymorphic association, because I wanted to be able to completely upgrade to Rails 4.1.
UPD: Pat fixed the issue, it should work now.

Getting undefined method `name' for "actionmailer":String when installing Webistrano

When I try and run a RAKE on Webistrano I get the following error:
undefined method `name' for "actionmailer":String`
I am a not proficient in Ruby and RoR but I have installed and played about with plenty of applications before and I can't find what the issue is.
The command I am running is:
RAILS_ENV=production rake db:migrate --trace
Which produces the below:
I would really like to know the best way to diagnose and fix this issue and issues like it in the future.
(in /srv/www/webistrano)
WARNING: 'require 'rake/rdoctask'' is deprecated. Please use 'require 'rdoc/task' (in RDoc 2.4.2+)' instead.
at /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/rdoctask.rb
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
rake aborted!
undefined method `name' for "actionmailer":String
/srv/www/webistrano/vendor/rails/railties/lib/rails/gem_dependency.rb:268:in `=='
/usr/local/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:217:in `==='
/usr/local/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:217:in `block in matching_specs'
/usr/local/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:411:in `block in each'
/usr/local/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:410:in `each'
/usr/local/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:410:in `each'
/usr/local/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:216:in `find_all'
/usr/local/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:216:in `matching_specs'
/usr/local/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:238:in `to_specs'
/usr/local/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:256:in `to_spec'
/usr/local/lib/ruby/site_ruby/1.9.1/rubygems.rb:1231:in `gem'
/srv/www/webistrano/vendor/rails/railties/lib/rails/gem_dependency.rb:73:in `add_load_paths'
/srv/www/webistrano/vendor/rails/railties/lib/initializer.rb:301:in `block in add_gem_load_paths'
/srv/www/webistrano/vendor/rails/railties/lib/initializer.rb:301:in `each'
/srv/www/webistrano/vendor/rails/railties/lib/initializer.rb:301:in `add_gem_load_paths'
/srv/www/webistrano/vendor/rails/railties/lib/initializer.rb:132:in `process'
/srv/www/webistrano/vendor/rails/railties/lib/initializer.rb:113:in `run'
/srv/www/webistrano/config/environment.rb:16:in `<top (required)>'
/usr/local/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
/usr/local/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
/srv/www/webistrano/vendor/rails/activesupport/lib/active_support/dependencies.rb:156:in `block in require'
/srv/www/webistrano/vendor/rails/activesupport/lib/active_support/dependencies.rb:521:in `new_constants_in'
/srv/www/webistrano/vendor/rails/activesupport/lib/active_support/dependencies.rb:156:in `require'
/srv/www/webistrano/vendor/rails/railties/lib/tasks/misc.rake:4:in `block in <top (required)>'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `block in execute'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'
/usr/local/lib/ruby/1.9.1/monitor.rb:190:in `mon_synchronize'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:176:in `block in invoke_prerequisites'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:174:in `each'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:174:in `invoke_prerequisites'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:157:in `block in invoke_with_call_chain'
/usr/local/lib/ruby/1.9.1/monitor.rb:190:in `mon_synchronize'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:116:in `invoke_task'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block (2 levels) in top_level'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `each'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block in top_level'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `block in run'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/bin/rake:33:in `<top (required)>'
/usr/local/bin/rake:23:in `load'
/usr/local/bin/rake:23:in `<main>'
Tasks: TOP => db:migrate => environment
When I run ruby -v I get the following:
ruby 1.9.1p376 (2009-12-07 revision 26041) [i686-linux]
I had this problem.
The solution is to downgrade rubygems to a version you support.
I needed version 1.3.5 (for rails 2.3.5)
So you need to do:
gem install rubygems-update -v 1.3.5
update_rubygems --version=1.3.5
And now rake should work.
This worked for me.
rvm rubygems 1.6.2

No such file or directory - /dev/null (Errno::ENOENT)

I'm having a similar problem to this gentleman here.
I've been trying to run a cucumber feature via a rake task. And I've been picking up the specified error in the title.
Here's a full backtrace. And my ruby version. (When I attempted to run the rails version command, I got "command not found".
$ rake features:all --trace
** Invoke features:all (first_time)
** Invoke features:watir_webdriver (first_time)
** Execute features:watir_webdriver
c:/Ruby193/bin/ruby -S bundle exec cucumber --profile watir
Using the watir profile...
No such file or directory - /dev/null (Errno::ENOENT)
c:/Ruby193/lib/ruby/1.9.1/webrick/log.rb:34:in `initialize'
c:/Ruby193/lib/ruby/1.9.1/webrick/log.rb:34:in `open'
c:/Ruby193/lib/ruby/1.9.1/webrick/log.rb:34:in `initialize'
c:/Ruby193/lib/ruby/1.9.1/webrick/log.rb:124:in `initialize'
c:/code/page-object/features/sample-app/sample_app.rb:12:in `new'
c:/code/page-object/features/sample-app/sample_app.rb:12:in `start'
c:/code/page-object/features/support/ajax_text_environment.rb:6:in `block in run'
rake aborted!
Command failed with status (1): [c:/Ruby193/bin/ruby -S bundle exec cucumbe...]
c:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/file_utils.rb:53:in `block in create_shell_runner'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/file_utils.rb:45:in `call'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/file_utils.rb:45:in `sh'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/file_utils_ext.rb:39:in `sh'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.1.9/lib/cucumber/rake/task.rb:104:in `run'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.1.9/lib/cucumber/rake/task.rb:193:in `block in define_task'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `block in execute'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'
c:/Ruby193/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:176:in `block in invoke_prerequisites'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:174:in `each'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:174:in `invoke_prerequisites'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:157:in `block in invoke_with_call_chain'
c:/Ruby193/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:116:in `invoke_task'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block (2 levels) in top_level'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `each'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block in top_level'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `block in run'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/bin/rake:33:in `<top (required)>'
c:/Ruby193/bin/rake:19:in `load'
c:/Ruby193/bin/rake:19:in `<main>'
Tasks: TOP => features:all => features:watir_webdriver
And ruby version
ruby -v
ruby 1.9.3p0 (2011-10-30) [i386-mingw32]
Any help would be infinitely appreciated. Thanks.
the dev/null was in config/initializers/quiet_assets and I replaced dev/null with logger.txt
if you are working on the same application on *nix and windows you could replace '/dev/null'
with RUBY_PLATFORM != 'i386-mingw32' ? '/dev/null' : 'NUL'
for me it was in quiet_assets.rb and I replaced
Rails.application.assets.logger = Logger.new('/dev/null')
with
Rails.application.assets.logger = Logger.new(RUBY_PLATFORM != 'i386-mingw32' ? '/dev/null' : 'NUL')
I actually figured it out. There was a configuration setting in the application I'm working on in one of the slightly obscured files. It set the path of the logger to "/dev/null". I just changed it to "logger.txt" and it works now.

Ruby on Rails mysql2 adapter problem

I have installed ruby and rails and my application gives me an error when I am trying to run
rake db:migrate
this is the result of the command rake db:migrate --trace
** Execute db:migrate
rake aborted!
!!! Missing the mysql2 gem. Add it to your Gemfile: gem 'mysql2'
/usr/lib/ruby/gems/1.9.1/gems/activerecord-3.0.6/lib/active_record/connection_adapters/mysql_adapter.rb:22:in `rescue in mysql_connection'
/usr/lib/ruby/gems/1.9.1/gems/activerecord-3.0.6/lib/active_record/connection_adapters/mysql_adapter.rb:19:in `mysql_connection'
/usr/lib/ruby/gems/1.9.1/gems/activerecord-3.0.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:229:in `new_connection'
/usr/lib/ruby/gems/1.9.1/gems/activerecord-3.0.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:237:in `checkout_new_connection'
/usr/lib/ruby/gems/1.9.1/gems/activerecord-3.0.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:191:in `block (2 levels) in checkout'
/usr/lib/ruby/gems/1.9.1/gems/activerecord-3.0.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:187:in `loop'
/usr/lib/ruby/gems/1.9.1/gems/activerecord-3.0.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:187:in `block in checkout'
/usr/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/usr/lib/ruby/gems/1.9.1/gems/activerecord-3.0.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:186:in `checkout'
/usr/lib/ruby/gems/1.9.1/gems/activerecord-3.0.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:94:in `connection'
/usr/lib/ruby/gems/1.9.1/gems/ar-octopus-0.3.4/lib/octopus/proxy.rb:83:in `select_connection'
/usr/lib/ruby/gems/1.9.1/gems/ar-octopus-0.3.4/lib/octopus/proxy.rb:177:in `send_queries_to_selected_slave'
/usr/lib/ruby/gems/1.9.1/gems/ar-octopus-0.3.4/lib/octopus/proxy.rb:140:in `method_missing'
/usr/lib/ruby/gems/1.9.1/gems/activerecord-3.0.6/lib/active_record/migration.rb:454:in `get_all_versions'
/usr/lib/ruby/gems/1.9.1/gems/activerecord-3.0.6/lib/active_record/migration.rb:583:in `migrated'
/usr/lib/ruby/gems/1.9.1/gems/activerecord-3.0.6/lib/active_record/migration.rb:492:in `current_version'
/usr/lib/ruby/gems/1.9.1/gems/activerecord-3.0.6/lib/active_record/migration.rb:509:in `block in migrate'
/usr/lib/ruby/gems/1.9.1/gems/activerecord-3.0.6/lib/active_record/migration.rb:509:in `each'
/usr/lib/ruby/gems/1.9.1/gems/activerecord-3.0.6/lib/active_record/migration.rb:509:in `detect'
/usr/lib/ruby/gems/1.9.1/gems/activerecord-3.0.6/lib/active_record/migration.rb:509:in `migrate'
/usr/lib/ruby/gems/1.9.1/gems/activerecord-3.0.6/lib/active_record/migration.rb:433:in `up'
/usr/lib/ruby/gems/1.9.1/gems/activerecord-3.0.6/lib/active_record/migration.rb:415:in `migrate'
/usr/lib/ruby/gems/1.9.1/gems/activerecord-3.0.6/lib/active_record/railties/databases.rake:142:in `block (2 levels) in <top (required)>'
/usr/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:636:in `call'
/usr/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:636:in `block in execute'
/usr/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:631:in `each'
/usr/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:631:in `execute'
/usr/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:597:in `block in invoke_with_call_chain'
/usr/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/usr/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
/usr/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:583:in `invoke'
/usr/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task'
/usr/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2029:in `block (2 levels) in top_level'
/usr/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2029:in `each'
/usr/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2029:in `block in top_level'
/usr/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/usr/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level'
/usr/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2001:in `block in run'
/usr/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/usr/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
/usr/lib/ruby/gems/1.9.1/gems/rake-0.8.7/bin/rake:31:in `<top (required)>'
/usr/bin/rake:19:in `load'
/usr/bin/rake:19:in `<main>'
confiz#confiz-desktop:~/mango_apps/rails_app_sms$ .
bash: .: filename argument required
.: usage: . filename [arguments]
I have already mentioned gem in my gemfile and already executed bundle install.
My database.yml file already has the correct adapter i.e. adapter: mysql2
Please help me resolve this problem.
I find the same problem if I use mysql2 v 0.2.19b4 in my Gemfile. If I use the latest mysql2 this conflicts with rails 3.0.17 which is dictated by Hobo (which generated my Gemfile). The warning I get from that is:
This version of mysql2 (0.3.11) doesn't ship with the ActiveRecord adapter bundled anymore as it's now part of Rails 3.1. Please use the 0.2.x releases if you plan on using it in Rails <= 3.0.x
Going back to mysql2 v 0.2.x The original load error comes because the rails mysql_adapter calls require 'mysql' not require 'mysql2'.
The solution is to use gem 'mysql' not gem 'mysql2' in the Gemfile
In my case bundler users gem mysql v 2.8.1 and everything works fine.

Resources