➜ henryyan#hy-hp ~/work/blog/henryyan.github.com git:(master) ✗ ruby -rubygems -e 'require "jekyll/migrators/wordpress"; Jekyll::WordPress.process("wordpress", "root", "root")'
<internal:lib/rubygems/custom_require>:29:in `require': LoadError: no such file to load -- mysql (Sequel::AdapterNotFound)
from <internal:lib/rubygems/custom_require>:29:in `require'
from /var/lib/gems/1.9.1/gems/sequel-3.33.0/lib/sequel/adapters/mysql.rb:4:in `rescue in <top (required)>'
from /var/lib/gems/1.9.1/gems/sequel-3.33.0/lib/sequel/adapters/mysql.rb:1:in `<top (required)>'
from <internal:lib/rubygems/custom_require>:29:in `require'
from <internal:lib/rubygems/custom_require>:29:in `require'
from /var/lib/gems/1.9.1/gems/sequel-3.33.0/lib/sequel/core.rb:312:in `block in tsk_require'
from /var/lib/gems/1.9.1/gems/sequel-3.33.0/lib/sequel/core.rb:94:in `block in check_requiring_thread'
from <internal:prelude>:10:in `synchronize'
from /var/lib/gems/1.9.1/gems/sequel-3.33.0/lib/sequel/core.rb:91:in `check_requiring_thread'
from /var/lib/gems/1.9.1/gems/sequel-3.33.0/lib/sequel/core.rb:312:in `tsk_require'
from /var/lib/gems/1.9.1/gems/sequel-3.33.0/lib/sequel/database/connecting.rb:25:in `adapter_class'
from /var/lib/gems/1.9.1/gems/sequel-3.33.0/lib/sequel/database/connecting.rb:63:in `connect'
from /var/lib/gems/1.9.1/gems/sequel-3.33.0/lib/sequel/core.rb:141:in `connect'
from /var/lib/gems/1.9.1/gems/sequel-3.33.0/lib/sequel/core.rb:345:in `adapter_method'
from /var/lib/gems/1.9.1/gems/sequel-3.33.0/lib/sequel/core.rb:352:in `mysql'
from /var/lib/gems/1.9.1/gems/jekyll-0.11.2/lib/jekyll/migrators/wordpress.rb:15:in `process'
from -e:1:in `<main>'
You need to install the mysql gem:
gem install mysql
See the same error on this other SO answer: Wordpress to Jekyll script throwing error
Related
Since yesterday the same install process using mailcatcher in an github actions fails.
Operating system tested with Ubuntu latest and 20.04
The way mailcatcher gets installed:
- name: Install & run mailcatcher
run: |
sudo gem install mailcatcher --no-update-sources --no-document
mailcatcher
Nothing changed so far. Any idea?
Run sudo gem install mailcatcher --no-update-sources --no-document
sudo gem install mailcatcher --no-update-sources --no-document
mailcatcher
shell: /usr/bin/bash -e {0}
Building native extensions. This could take a while...
Successfully installed eventmachine-1.0.9.1
...
Successfully installed daemons-1.4.1
Building native extensions. This could take a while...
Successfully installed thin-1.5.1
Successfully installed skinny-0.2.4
Successfully installed mailcatcher-0.8.2
13 gems installed
/usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:168:in `require': cannot load such file -- mail/indifferent_hash (LoadError)
from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:168:in `rescue in require'
from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:156:in `require'
from /var/lib/gems/2.7.0/gems/mail-2.8.0/lib/mail.rb:14:in `<module:Mail>'
from /var/lib/gems/2.7.0/gems/mail-2.8.0/lib/mail.rb:3:in `<top (required)>'
from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
from /var/lib/gems/2.7.0/gems/mailcatcher-0.8.2/lib/mail_catcher/mail.rb:5:in `<top (required)>'
from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
from /var/lib/gems/2.7.0/gems/mailcatcher-0.8.2/lib/mail_catcher/smtp.rb:5:in `<top (required)>'
from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
from /var/lib/gems/2.7.0/gems/mailcatcher-0.8.2/lib/mail_catcher.rb:183:in `block (2 levels) in run!'
from /var/lib/gems/2.7.0/gems/mailcatcher-0.8.2/lib/mail_catcher.rb:233:in `rescue_port'
from /var/lib/gems/2.7.0/gems/mailcatcher-0.8.2/lib/mail_catcher.rb:182:in `block in run!'
from /var/lib/gems/2.7.0/gems/eventmachine-1.0.9.1/lib/eventmachine.rb:193:in `run_machine'
from /var/lib/gems/2.7.0/gems/eventmachine-1.0.9.1/lib/eventmachine.rb:193:in `run'
from /var/lib/gems/2.7.0/gems/mailcatcher-0.8.2/lib/mail_catcher.rb:180:in `run!'
from /var/lib/gems/2.7.0/gems/mailcatcher-0.8.2/bin/mailcatcher:6:in `<top (required)>'
from /usr/local/bin/mailcatcher:23:in `load'
from /usr/local/bin/mailcatcher:23:in `<main>'
/usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require': cannot load such file -- mail/indifferent_hash (LoadError)
from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
from /var/lib/gems/2.7.0/gems/mail-2.8.0/lib/mail.rb:14:in `<module:Mail>'
from /var/lib/gems/2.7.0/gems/mail-2.8.0/lib/mail.rb:3:in `<top (required)>'
from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
from /var/lib/gems/2.7.0/gems/mailcatcher-0.8.2/lib/mail_catcher/mail.rb:5:in `<top (required)>'
from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
from /var/lib/gems/2.7.0/gems/mailcatcher-0.8.2/lib/mail_catcher/smtp.rb:5:in `<top (required)>'
from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
from /var/lib/gems/2.7.0/gems/mailcatcher-0.8.2/lib/mail_catcher.rb:183:in `block (2 levels) in run!'
from /var/lib/gems/2.7.0/gems/mailcatcher-0.8.2/lib/mail_catcher.rb:233:in `rescue_port'
from /var/lib/gems/2.7.0/gems/mailcatcher-0.8.2/lib/mail_catcher.rb:182:in `block in run!'
from /var/lib/gems/2.7.0/gems/eventmachine-1.0.9.1/lib/eventmachine.rb:193:in `run_machine'
from /var/lib/gems/2.7.0/gems/eventmachine-1.0.9.1/lib/eventmachine.rb:193:in `run'
from /var/lib/gems/2.7.0/gems/mailcatcher-0.8.2/lib/mail_catcher.rb:180:in `run!'
from /var/lib/gems/2.7.0/gems/mailcatcher-0.8.2/bin/mailcatcher:6:in `<top (required)>'
from /usr/local/bin/mailcatcher:23:in `load'
from /usr/local/bin/mailcatcher:23:in `<main>'
Starting MailCatcher v0.8.2
Error: Process completed with exit code 1.
Tried different ubuntu installs and lower ruby versions
There's a bug in the mail gem right now -- see this issue on their github.
You'll need to force a downgrade to version 2.7.1 of their gem in your gemfile:
gem "mail", "~> 2.7.1"
i have Ruby 2.2 and i can't run any file .rb from command prompt each time i have same error:
C:/Ruby22/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- dl/import (LoadError)
from C:/Ruby22/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/watir-classic-4.2.0/lib/watir-classic/win32.rb:1:in `<top (required)>'
from C:/Ruby22/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from C:/Ruby22/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/watir-classic-4.2.0/lib/watir-classic.rb:32:in `<top (required)>'
from C:/Ruby22/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from C:/Ruby22/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/watir-5.0.0-x86-mingw32/lib/watir/loader.rb:41:in `load_driver'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/watir-5.0.0-x86-mingw32/lib/watir/loader.rb:33:in `load_driver_for'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/watir-5.0.0-x86-mingw32/lib/watir/loader.rb:14:in `start'
from test.rb:2:in `<main>'
what shall i do?
Try this:
gem install net-ssh -v 2.9.3.beta1
Everyone, I used sudo gem install jekyll to install jekyll on my Fedora 20 and got the following error. I've successfully installed ruby and rubygems, and it seems to me the jekyll has been installed. But when I enter jekyll serve, the pages won't be created and I got the similar message. I'm new to fedora and ruby, thanks for any help.
Successfully installed jekyll-2.1.0
/usr/local/share/ruby/site_ruby/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- json/pure (LoadError)
from /usr/local/share/ruby/site_ruby/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/share/gems/gems/json-1.7.7/lib/json.rb:60:in `rescue in <module:JSON>'
from /usr/share/gems/gems/json-1.7.7/lib/json.rb:57:in `<module:JSON>'
from /usr/share/gems/gems/json-1.7.7/lib/json.rb:54:in `<top (required)>'
from /usr/local/share/ruby/site_ruby/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/share/ruby/site_ruby/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/share/gems/gems/rdoc-4.0.1/lib/rdoc/text.rb:16:in `<top (required)>'
from /usr/share/gems/gems/rdoc-4.0.1/lib/rdoc/code_object.rb:28:in `<class:CodeObject>'
from /usr/share/gems/gems/rdoc-4.0.1/lib/rdoc/code_object.rb:26:in `<top (required)>'
from /usr/share/gems/gems/rdoc-4.0.1/lib/rdoc/generator/markup.rb:59:in `<top (required)>'
from /usr/local/share/ruby/site_ruby/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/share/ruby/site_ruby/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/share/gems/gems/rdoc-4.0.1/lib/rdoc/generator/darkfish.rb:6:in `<top (required)>'
from /usr/local/share/ruby/site_ruby/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/share/ruby/site_ruby/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/share/gems/gems/rdoc-4.0.1/lib/rdoc/rdoc.rb:565:in `<top (required)>'
from /usr/local/share/ruby/site_ruby/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/share/ruby/site_ruby/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/share/gems/gems/rdoc-4.0.1/lib/rdoc/rubygems_hook.rb:73:in `load_rdoc'
from /usr/share/gems/gems/rdoc-4.0.1/lib/rdoc/rubygems_hook.rb:238:in `setup'
from /usr/share/gems/gems/rdoc-4.0.1/lib/rdoc/rubygems_hook.rb:151:in `generate'
from /usr/share/gems/gems/rdoc-4.0.1/lib/rdoc/rubygems_hook.rb:56:in `block in generation_hook'
from /usr/share/gems/gems/rdoc-4.0.1/lib/rdoc/rubygems_hook.rb:55:in `each'
from /usr/share/gems/gems/rdoc-4.0.1/lib/rdoc/rubygems_hook.rb:55:in `generation_hook'
from /usr/local/share/ruby/site_ruby/rubygems/request_set.rb:178:in `call'
from /usr/local/share/ruby/site_ruby/rubygems/request_set.rb:178:in `block in install'
from /usr/local/share/ruby/site_ruby/rubygems/request_set.rb:177:in `each'
from /usr/local/share/ruby/site_ruby/rubygems/request_set.rb:177:in `install'
from /usr/local/share/ruby/site_ruby/rubygems/commands/install_command.rb:249:in `install_gem'
from /usr/local/share/ruby/site_ruby/rubygems/commands/install_command.rb:291:in `block in install_gems'
from /usr/local/share/ruby/site_ruby/rubygems/commands/install_command.rb:287:in `each'
from /usr/local/share/ruby/site_ruby/rubygems/commands/install_command.rb:287:in `install_gems'
from /usr/local/share/ruby/site_ruby/rubygems/commands/install_command.rb:202:in `execute'
from /usr/local/share/ruby/site_ruby/rubygems/command.rb:307:in `invoke_with_build_args'
from /usr/local/share/ruby/site_ruby/rubygems/command_manager.rb:167:in `process_args'
from /usr/local/share/ruby/site_ruby/rubygems/command_manager.rb:137:in `run'
from /usr/local/share/ruby/site_ruby/rubygems/gem_runner.rb:54:in `run'
from /bin/gem:21:in `<main>'
try to install ruby-devel by this -
sudo yum install ruby-devel
and the try to re install jekyll -
sudo gem install jekyll
And also make sure you have nodejs installed,
sudo yum install nodejs
This is a problem with your JSON parser. See cannot load such file -- json/pure in your stacktrace? You need to be able to successfully run gem install json or gem install json_pure before you can run Jekyll.
I tried the following command rhc setup and following message is displayed
/usr/local/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:45:in `require': cannot load such file -- net/ssh (LoadError)
from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:45:in `require'
from /usr/local/lib/ruby/gems/1.9.1/gems/rhc-1.8.9/lib/rhc/ssh_helpers.rb:18:in `<top (required)>'
from /usr/local/lib/ruby/gems/1.9.1/gems/rhc-1.8.9/lib/rhc/wizard.rb:72:in `<class:Wizard>'
from /usr/local/lib/ruby/gems/1.9.1/gems/rhc-1.8.9/lib/rhc/wizard.rb:6:in `<module:RHC>'
from /usr/local/lib/ruby/gems/1.9.1/gems/rhc-1.8.9/lib/rhc/wizard.rb:5:in `<top (required)>'
from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:45:in `require'
from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:45:in `require'
from /usr/local/lib/ruby/gems/1.9.1/gems/rhc-1.8.9/lib/rhc/commands/base.rb:4:in `<top (required)>'
from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:45:in `require'
from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:45:in `require'
from /usr/local/lib/ruby/gems/1.9.1/gems/rhc-1.8.9/lib/rhc/commands/app.rb:1:in `<top (required)>'
from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:45:in `require'
from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:45:in `require'
from /usr/local/lib/ruby/gems/1.9.1/gems/rhc-1.8.9/lib/rhc/commands.rb:139:in `block in load'
from /usr/local/lib/ruby/gems/1.9.1/gems/rhc-1.8.9/lib/rhc/commands.rb:138:in `each'
from /usr/local/lib/ruby/gems/1.9.1/gems/rhc-1.8.9/lib/rhc/commands.rb:138:in `load'
from /usr/local/lib/ruby/gems/1.9.1/gems/rhc-1.8.9/lib/rhc/cli.rb:35:in `start'
from /usr/local/lib/ruby/gems/1.9.1/gems/rhc-1.8.9/bin/rhc:18:in `<top (required)>'
from /usr/local/bin/rhc:23:in `load'
from /usr/local/bin/rhc:23:in `<main>'
What is the problem?
periodically updating to the latest version of rhc is a good idea as well:
sudo gem update rhc
It should pull net-ssh in as a dependency.
Updating net-ssh to 2.9.3.beta1, as cremno suggested in this comment, resolved my problem and a few other people as well.
$ gem install net-ssh -v 2.9.3.beta1
this answer is from: rhc setup gives error `no such file dl/import`
This below code did the trick
sudo gem install net-ssh
Using Ruby 2.0 x64 on Windows. Installed sqlite3 gem by downloading the sqlite3 autoconf sources and compiling. Then I did a gem install sqlite3 --platform=ruby .... However, now when I run rails server, I get the following error. Where is this sqlite3_native.rb? I can't find it anywhere.
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sqlite3-1.3.7/lib/sqlite3.rb:6:in `require': cannot load such file -- sqlite3/sqlite3_native (LoadError)
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sqlite3-1.3.7/lib/sqlite3.rb:6:in `rescue in <top (required)>'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sqlite3-1.3.7/lib/sqlite3.rb:2:in `<top (required)>'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `require'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `block (2 levels) in require'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `each'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `block in require'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `each'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `require'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler.rb:132:in `require'
from C:/Users/me/my_project/config/application.rb:7:in `<top (required)>'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-4.0.0.rc1/lib/rails/commands.rb:78:in `require'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-4.0.0.rc1/lib/rails/commands.rb:78:in `block in <top (required)>'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-4.0.0.rc1/lib/rails/commands.rb:75:in `tap'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-4.0.0.rc1/lib/rails/commands.rb:75:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
Here is a tutorial for installing SQLite3 with Ruby 2.0 on Windows.
It is rather a complicated process. Follow the tutorial and see if it works after that.