New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drupal 6 importer depends on mysql. #242

Merged
merged 1 commit into from Mar 22, 2016

Conversation

Projects
None yet
3 participants
@pfrenssen
Contributor

pfrenssen commented Mar 19, 2016

When I try to import data from Drupal 6 I get the following error because the mysql gem is missing:

/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require': LoadError: cannot load such file -- mysql (Sequel::AdapterNotFound)
    from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /home/pieter/.gem/ruby/2.3.0/gems/sequel-4.32.0/lib/sequel/adapters/mysql.rb:6:in `rescue in <top (required)>'
    from /home/pieter/.gem/ruby/2.3.0/gems/sequel-4.32.0/lib/sequel/adapters/mysql.rb:3:in `<top (required)>'
    from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /home/pieter/.gem/ruby/2.3.0/gems/sequel-4.32.0/lib/sequel/database/connecting.rb:98:in `load_adapter'
    from /home/pieter/.gem/ruby/2.3.0/gems/sequel-4.32.0/lib/sequel/database/connecting.rb:28:in `adapter_class'
    from /home/pieter/.gem/ruby/2.3.0/gems/sequel-4.32.0/lib/sequel/database/connecting.rb:56:in `connect'
    from /home/pieter/.gem/ruby/2.3.0/gems/sequel-4.32.0/lib/sequel/core.rb:108:in `connect'
    from /home/pieter/.gem/ruby/2.3.0/gems/sequel-4.32.0/lib/sequel/core.rb:377:in `adapter_method'
    from /home/pieter/.gem/ruby/2.3.0/gems/sequel-4.32.0/lib/sequel/core.rb:387:in `mysql'
    from /home/pieter/.gem/ruby/2.3.0/gems/jekyll-import-0.10.0/lib/jekyll-import/importers/drupal6.rb:54:in `process'
    from /home/pieter/.gem/ruby/2.3.0/gems/jekyll-import-0.10.0/lib/jekyll-import/importer.rb:23:in `run'
    from -e:2:in `<main>'
@parkr

This comment has been minimized.

Show comment
Hide comment
@parkr

parkr Mar 19, 2016

Member

@pfrenssen mysql is only required when you have mysql as the adapter. If you were to use postgres or mysql2, it'd require a different gem. Could we perhaps catch a LoadError and print out a more useful message? Unfortunately requiring this for every user won't be possible.

I suppose this brings up another question: is Drupal compatible with any database other than MySQL?

Member

parkr commented Mar 19, 2016

@pfrenssen mysql is only required when you have mysql as the adapter. If you were to use postgres or mysql2, it'd require a different gem. Could we perhaps catch a LoadError and print out a more useful message? Unfortunately requiring this for every user won't be possible.

I suppose this brings up another question: is Drupal compatible with any database other than MySQL?

@parkr parkr added the fix label Mar 19, 2016

@pfrenssen

This comment has been minimized.

Show comment
Hide comment
@pfrenssen

pfrenssen Mar 21, 2016

Contributor

@parkr good point. Drupal is indeed compatible with other databases like postgres, and has been since 2005 with the release of Drupal 4.6.

Contributor

pfrenssen commented Mar 21, 2016

@parkr good point. Drupal is indeed compatible with other databases like postgres, and has been since 2005 with the release of Drupal 4.6.

@parkr

This comment has been minimized.

Show comment
Hide comment
@parkr

parkr Mar 22, 2016

Member

@pfrenssen An alternative to this approach is to call JekyllImport.require_with_fallback(adapter) in process and to allow use other than mysql. That said, this PR is fine as-is now that I look at process more closely as Sequel.mysql is called directly.

@jekyllbot: merge +bug

Member

parkr commented Mar 22, 2016

@pfrenssen An alternative to this approach is to call JekyllImport.require_with_fallback(adapter) in process and to allow use other than mysql. That said, this PR is fine as-is now that I look at process more closely as Sequel.mysql is called directly.

@jekyllbot: merge +bug

jekyllbot added a commit that referenced this pull request Mar 22, 2016

@jekyllbot jekyllbot merged commit 5e2ca99 into jekyll:master Mar 22, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

jekyllbot added a commit that referenced this pull request Mar 22, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment