undefined method `eager_load_namespaces' for when running sidekiq - ruby-on-rails

I'm getting the following error when running the sidekiq on rails 4.1.4.
Here is entire error log
undefined method `eager_load_namespaces' for #<Rails::Railtie::Configuration:0x00000002a3c788>
/usr/lib/ruby/vendor_ruby/rails/railtie/configuration.rb:85:in `method_missing'
/var/lib/gems/2.1.0/gems/activemodel-4.1.4/lib/active_model/railtie.rb:6:in `<class:Railtie>'
/var/lib/gems/2.1.0/gems/activemodel-4.1.4/lib/active_model/railtie.rb:5:in `<module:ActiveModel>'
/var/lib/gems/2.1.0/gems/activemodel-4.1.4/lib/active_model/railtie.rb:4:in `<top (required)>'
/var/lib/gems/2.1.0/gems/activerecord-4.1.4/lib/active_record/railtie.rb:3:in `require'
/var/lib/gems/2.1.0/gems/activerecord-4.1.4/lib/active_record/railtie.rb:3:in `<top (required)>'
/var/lib/gems/2.1.0/gems/railties-4.1.4/lib/rails/all.rb:12:in `require'
/var/lib/gems/2.1.0/gems/railties-4.1.4/lib/rails/all.rb:12:in `block in <top (required)>'
/var/lib/gems/2.1.0/gems/railties-4.1.4/lib/rails/all.rb:10:in `each'
/var/lib/gems/2.1.0/gems/railties-4.1.4/lib/rails/all.rb:10:in `<top (required)>'
/home/santosh/Roorah/config/application.rb:3:in `require'
/home/santosh/Roorah/config/application.rb:3:in `<top (required)>'
/usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/home/santosh/Roorah/config/environment.rb:2:in `<top (required)>'
/usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/var/lib/gems/2.1.0/gems/sidekiq-3.3.0/lib/sidekiq/cli.rb:227:in `boot_system'
/var/lib/gems/2.1.0/gems/sidekiq-3.3.0/lib/sidekiq/cli.rb:50:in `run'
/var/lib/gems/2.1.0/gems/sidekiq-3.3.0/bin/sidekiq:8:in `<top (required)>'
/usr/local/bin/sidekiq:23:in `load'
/usr/local/bin/sidekiq:23:in `<main>'
Please do ask if any further information is required.

Try updating Rails to version 4.2.10 or later.
At least the method Rails::Railtie::Configuration#eager_load_namespaces is defined railties-4.2.10.

Related

Nokogiri aborts Rails Commands

I am trying to start a rails server, but I keep receiving a lengthy and cryptic error message saying that I have an incompatible library version for nokogiri 1.6.8. I have looked at other similar solutions about libxml2, libxslt, and libiconv not been linked with nokogiri and I have tried the what people recommend to fix that, but I still receive the message:
Sams-MBP:toy-app name$ rails server
/Users/name/RubyWorkspace/toy-app/vendor/bundle/gems/nokogiri-1.6.8/lib/nokogiri.rb:32:in `require': incompatible library version - /Users/name/RubyWorkspace/toy-app/vendor/bundle/gems/nokogiri-1.6.8/lib/nokogiri/nokogiri.bundle (fatal)
from /Users/name/RubyWorkspace/toy-app/vendor/bundle/gems/nokogiri-1.6.8/lib/nokogiri.rb:32:in `rescue in <top (required)>'
from /Users/name/RubyWorkspace/toy-app/vendor/bundle/gems/nokogiri-1.6.8/lib/nokogiri.rb:28:in `<top (required)>'
from /Users/name/RubyWorkspace/toy-app/vendor/bundle/gems/loofah-2.0.3/lib/loofah.rb:3:in `require'
from /Users/name/RubyWorkspace/toy-app/vendor/bundle/gems/loofah-2.0.3/lib/loofah.rb:3:in `<top (required)>'
from /Users/name/RubyWorkspace/toy-app/vendor/bundle/gems/rails-html-sanitizer-1.0.3/lib/rails-html-sanitizer.rb:2:in `require'
from /Users/name/RubyWorkspace/toy-app/vendor/bundle/gems/rails-html-sanitizer-1.0.3/lib/rails-html-sanitizer.rb:2:in `<top (required)>'
from /Users/name/RubyWorkspace/toy-app/vendor/bundle/gems/actionview-5.0.0/lib/action_view/helpers/sanitize_helper.rb:2:in `require'
from /Users/name/RubyWorkspace/toy-app/vendor/bundle/gems/actionview-5.0.0/lib/action_view/helpers/sanitize_helper.rb:2:in `<top (required)>'
from /Users/name/RubyWorkspace/toy-app/vendor/bundle/gems/actionview-5.0.0/lib/action_view/helpers/text_helper.rb:32:in `require'
from /Users/name/RubyWorkspace/toy-app/vendor/bundle/gems/actionview-5.0.0/lib/action_view/helpers/text_helper.rb:32:in `<module:TextHelper>'
from /Users/name/RubyWorkspace/toy-app/vendor/bundle/gems/actionview-5.0.0/lib/action_view/helpers/text_helper.rb:29:in `<module:Helpers>'
from /Users/name/RubyWorkspace/toy-app/vendor/bundle/gems/actionview-5.0.0/lib/action_view/helpers/text_helper.rb:6:in `<module:ActionView>'
from /Users/name/RubyWorkspace/toy-app/vendor/bundle/gems/actionview-5.0.0/lib/action_view/helpers/text_helper.rb:4:in `<top (required)>'
from /Users/name/RubyWorkspace/toy-app/vendor/bundle/gems/actionview-5.0.0/lib/action_view/helpers/form_tag_helper.rb:18:in `require'
from /Users/name/RubyWorkspace/toy-app/vendor/bundle/gems/actionview-5.0.0/lib/action_view/helpers/form_tag_helper.rb:18:in `<module:FormTagHelper>'
from /Users/name/RubyWorkspace/toy-app/vendor/bundle/gems/actionview-5.0.0/lib/action_view/helpers/form_tag_helper.rb:14:in `<module:Helpers>'
from /Users/name/RubyWorkspace/toy-app/vendor/bundle/gems/actionview-5.0.0/lib/action_view/helpers/form_tag_helper.rb:8:in `<module:ActionView>'
from /Users/name/RubyWorkspace/toy-app/vendor/bundle/gems/actionview-5.0.0/lib/action_view/helpers/form_tag_helper.rb:6:in `<top (required)>'
from /Users/name/RubyWorkspace/toy-app/vendor/bundle/gems/actionview-5.0.0/lib/action_view/helpers/form_helper.rb:4:in `require'
from /Users/name/RubyWorkspace/toy-app/vendor/bundle/gems/actionview-5.0.0/lib/action_view/helpers/form_helper.rb:4:in `<top (required)>'
from /Users/name/RubyWorkspace/toy-app/vendor/bundle/gems/actionview-5.0.0/lib/action_view/helpers.rb:50:in `require'
from /Users/name/RubyWorkspace/toy-app/vendor/bundle/gems/actionview-5.0.0/lib/action_view/helpers.rb:50:in `<module:Helpers>'
from /Users/name/RubyWorkspace/toy-app/vendor/bundle/gems/actionview-5.0.0/lib/action_view/helpers.rb:4:in `<module:ActionView>'
from /Users/name/RubyWorkspace/toy-app/vendor/bundle/gems/actionview-5.0.0/lib/action_view/helpers.rb:3:in `<top (required)>'
from /Users/name/RubyWorkspace/toy-app/vendor/bundle/gems/sprockets-rails-3.1.1/lib/sprockets/rails/context.rb:7:in `require'
from /Users/name/RubyWorkspace/toy-app/vendor/bundle/gems/sprockets-rails-3.1.1/lib/sprockets/rails/context.rb:7:in `<module:Context>'
from /Users/name/RubyWorkspace/toy-app/vendor/bundle/gems/sprockets-rails-3.1.1/lib/sprockets/rails/context.rb:6:in `<module:Rails>'
from /Users/name/RubyWorkspace/toy-app/vendor/bundle/gems/sprockets-rails-3.1.1/lib/sprockets/rails/context.rb:5:in `<module:Sprockets>'
from /Users/name/RubyWorkspace/toy-app/vendor/bundle/gems/sprockets-rails-3.1.1/lib/sprockets/rails/context.rb:4:in `<top (required)>'
from /Users/name/RubyWorkspace/toy-app/vendor/bundle/gems/sprockets-rails-3.1.1/lib/sprockets/railtie.rb:7:in `require'
from /Users/name/RubyWorkspace/toy-app/vendor/bundle/gems/sprockets-rails-3.1.1/lib/sprockets/railtie.rb:7:in `<top (required)>'
from /Users/name/RubyWorkspace/toy-app/vendor/bundle/gems/railties-5.0.0/lib/rails/all.rb:14:in `require'
from /Users/name/RubyWorkspace/toy-app/vendor/bundle/gems/railties-5.0.0/lib/rails/all.rb:14:in `block in <top (required)>'
from /Users/name/RubyWorkspace/toy-app/vendor/bundle/gems/railties-5.0.0/lib/rails/all.rb:12:in `each'
from /Users/name/RubyWorkspace/toy-app/vendor/bundle/gems/railties-5.0.0/lib/rails/all.rb:12:in `<top (required)>'
from /Users/name/RubyWorkspace/toy-app/config/application.rb:3:in `require'
from /Users/name/RubyWorkspace/toy-app/config/application.rb:3:in `<top (required)>'
from /Users/name/RubyWorkspace/toy-app/vendor/bundle/gems/railties-5.0.0/lib/rails/commands/commands_tasks.rb:88:in `require'
from /Users/name/RubyWorkspace/toy-app/vendor/bundle/gems/railties-5.0.0/lib/rails/commands/commands_tasks.rb:88:in `block in server'
from /Users/name/RubyWorkspace/toy-app/vendor/bundle/gems/railties-5.0.0/lib/rails/commands/commands_tasks.rb:85:in `tap'
from /Users/name/RubyWorkspace/toy-app/vendor/bundle/gems/railties-5.0.0/lib/rails/commands/commands_tasks.rb:85:in `server'
from /Users/name/RubyWorkspace/toy-app/vendor/bundle/gems/railties-5.0.0/lib/rails/commands/commands_tasks.rb:49:in `run_command!'
from /Users/name/RubyWorkspace/toy-app/vendor/bundle/gems/railties-5.0.0/lib/rails/commands.rb:18:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
Remove the Gemfile.lock in the root directory of the application. Then, remove the versions written in the Gemfile, just have the name of the gem there. Then, again do bundle install. Maybe this can help.

Ruby Web-console 2.0

So I've been going through the update rails tutorial and came across this error with the web console. I attempted reinstalling the bundles with no avail. Any input? This was the error i recieved:
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/web-console-2.0.0.beta3/lib/web_console/slave.rb:1:in `require': cannot load such file -- pty (LoadError)
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/web-console-2.0.0.beta3/lib/web_console/slave.rb:1:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/web-console-2.0.0.beta3/lib/web_console.rb:13:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/web-console-2.0.0.beta3/lib/web_console.rb:13:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/web-console-2.0.0.beta3/lib/web-console.rb:1:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/web-console-2.0.0.beta3/lib/web-console.rb:1:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:77:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:77:in `block (2 levels) in require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `each'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `block in require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `each'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler.rb:99:in `require'
from C:/Users/lmiln/workspace/toy_app/config/application.rb:7:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.2/lib/rails/commands/commands_tasks.rb:141:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.2/lib/rails/commands/commands_tasks.rb:141:in `require_application_and_environment!'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.2/lib/rails/commands/commands_tasks.rb:128:in `generate_or_destroy'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.2/lib/rails/commands/commands_tasks.rb:50:in `generate'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.2/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.2/lib/rails/commands.rb:17:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'

Error running rails server first time

I just started learning rails and I am currently learning through the Lynda course Ruby on Rails 3 Essential Training with Kevin Skoglund. At the point that I have reached, we are trying to build our first web app and we are instructed to create our server by typing rails server which as you can see I did. When I type that, that whole loading error mess appears and I have no idea how to fix it.
C:\Users\Bryan\Documents\Sites\simple_cms>rails s
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/nokogiri-1.6.6.2-x64-mingw32/lib/nokogiri.rb:29:in `require': cannot load such file -- nokogiri/nokogiri (LoadError)
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/nokogiri-1.6.6.2-x64-mingw32/lib/nokogiri.rb:29:in `rescue in <top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/nokogiri-1.6.6.2-x64-mingw32/lib/nokogiri.rb:25:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/loofah-2.0.3/lib/loofah.rb:3:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/loofah-2.0.3/lib/loofah.rb:3:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rails-html-sanitizer-1.0.2/lib/rails-html-sanitizer.rb:2:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rails-html-sanitizer-1.0.2/lib/rails-html-sanitizer.rb:2:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.4/lib/action_view/helpers/sanitize_helper.rb:3:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.4/lib/action_view/helpers/sanitize_helper.rb:3:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.4/lib/action_view/helpers/text_helper.rb:32:in `<module:TextHelper>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.4/lib/action_view/helpers/text_helper.rb:29:in `<module:Helpers>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.4/lib/action_view/helpers/text_helper.rb:6:in `<module:ActionView>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.4/lib/action_view/helpers/text_helper.rb:4:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.4/lib/action_view/helpers/form_tag_helper.rb:18:in `<module:FormTagHelper>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.4/lib/action_view/helpers/form_tag_helper.rb:14:in `<module:Helpers>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.4/lib/action_view/helpers/form_tag_helper.rb:8:in `<module:ActionView>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.4/lib/action_view/helpers/form_tag_helper.rb:6:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.4/lib/action_view/helpers/form_helper.rb:4:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.4/lib/action_view/helpers/form_helper.rb:4:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.4/lib/action_view/helpers.rb:50:in `<module:Helpers>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.4/lib/action_view/helpers.rb:4:in `<module:ActionView>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.4/lib/action_view/helpers.rb:3:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.3.3/lib/sprockets/rails/legacy_asset_tag_helper.rb:7:in `<module:LegacyAssetTagHelper>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.3.3/lib/sprockets/rails/legacy_asset_tag_helper.rb:6:in `<module:Rails>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.3.3/lib/sprockets/rails/legacy_asset_tag_helper.rb:4:in `<module:Sprockets>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.3.3/lib/sprockets/rails/legacy_asset_tag_helper.rb:3:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.3.3/lib/sprockets/rails/helper.rb:45:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.3.3/lib/sprockets/rails/helper.rb:45:in `<module:Helper>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.3.3/lib/sprockets/rails/helper.rb:7:in `<module:Rails>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.3.3/lib/sprockets/rails/helper.rb:6:in `<module:Sprockets>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.3.3/lib/sprockets/rails/helper.rb:5:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.3.3/lib/sprockets/railtie.rb:6:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.3.3/lib/sprockets/railtie.rb:6:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sass-rails-5.0.4/lib/sass/rails/railtie.rb:3:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sass-rails-5.0.4/lib/sass/rails/railtie.rb:3:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sass-rails-5.0.4/lib/sass/rails.rb:11:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sass-rails-5.0.4/lib/sass/rails.rb:11:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sass-rails-5.0.4/lib/sass-rails.rb:1:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sass-rails-5.0.4/lib/sass-rails.rb:1:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/runtime.rb:76:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/runtime.rb:72:in `each'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/runtime.rb:72:in `block in require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/runtime.rb:61:in `each'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/runtime.rb:61:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler.rb:134:in `require'
from C:/Users/Bryan/Documents/Sites/simple_cms/config/application.rb:7:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.4/lib/rails/commands/commands_tasks.rb:78:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.4/lib/rails/commands/commands_tasks.rb:78:in `block in server'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.4/lib/rails/commands/commands_tasks.rb:75:in `tap'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.4/lib/rails/commands/commands_tasks.rb:75:in `server'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.4/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.4/lib/rails/commands.rb:17:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
C:\Users\Bryan\Documents\Sites\simple_cms>
make sure your Gemfile contain:
gem 'nokogiri'
then run bundle install command, try run rails s if you still get the same error restart your machine to make sure gemset updated.
if the problem still occur edit agian your Gemfile and put:
gem 'nokogiri', :require => false
run bundle install and try run rails s.
edit
Just noticed you are Windows user and use ruby 2.2 which nokogiri isn't compiled yet for your env, sorry:
https://github.com/sparklemotion/nokogiri/issues/1256
Try to downgrade your ruby to 2.0.0.

ruby server not working

As soon as I try to start rails server I encounter following problem. Can anybody please help.
E:\sites\simple_cms>rails s
C:/Ruby193/lib/ruby/gems/1.9.1/gems/mysql2-0.2.6-x86-mingw32/lib/mysql2/mysql2.rb:2:in `require': 193: %1 is not a valid Win32 application. - C:/Ruby193/lib/ruby/gems/1.9.1/gems/mysql2-0.2.6-x86-min
gw32/lib/mysql2/1.9/mysql2.so (LoadError)
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/mysql2-0.2.6-x86- mingw3 2/lib/mysql2/mysql2.rb:2:in `<top (required)>'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/mysql2-0.2.6-x86-mingw32/lib/mysql2.rb:7:in `require'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/mysql2-0.2.6-x86-mingw32/lib/mysql2.rb:7:in `<top (required)>'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.7.6/lib/bundler/runtime.rb:76:in `require'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.7.6/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.7.6/lib/bundler/runtime.rb:72:in `each'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.7.6/lib/bundler/runtime.rb:72:in `block in require'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.7.6/lib/bundler/runtime.rb:61:in `each'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.7.6/lib/bundler/runtime.rb:61:in `require'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.7.6/lib/bundler.rb:133:in `require'
from E:/sites/simple_cms/config/application.rb:7:in `<top (required)>'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-4.0.0/lib/rails/commands.rb:76:in `require'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-4.0.0/lib/rails/commands.rb:76:in `block in <top (required)>'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-4.0.0/lib/rails/commands.rb:73:in `tap'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-4.0.0/lib/rails/commands.rb:73:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'

Cannot load nokogiri when installing rails_admin in rails 4.0.0

When trying to run rails g rails_admin:install I get the following error:
/home/vieirater/.rvm/gems/ruby-2.0.0-p247/gems/nokogiri-1.6.0/lib/nokogiri.rb:28:in `require': cannot load such file -- nokogiri/nokogiri (LoadError)
from /home/vieirater/.rvm/gems/ruby-2.0.0-p247/gems/nokogiri-1.6.0/lib/nokogiri.rb:28:in `<top (required)>'
from /home/vieirater/.rvm/gems/ruby-2.0.0-p247/gems/rack-pjax-0.7.0/lib/rack/pjax.rb:1:in `require'
from /home/vieirater/.rvm/gems/ruby-2.0.0-p247/gems/rack-pjax-0.7.0/lib/rack/pjax.rb:1:in `<top (required)>'
from /home/vieirater/.rvm/gems/ruby-2.0.0-p247/gems/rack-pjax-0.7.0/lib/rack-pjax.rb:2:in `require'
from /home/vieirater/.rvm/gems/ruby-2.0.0-p247/gems/rack-pjax-0.7.0/lib/rack-pjax.rb:2:in `<top (required)>'
from /home/vieirater/.rvm/gems/ruby-2.0.0-p247/gems/rails_admin-0.5.0/lib/rails_admin/engine.rb:7:in `require'
from /home/vieirater/.rvm/gems/ruby-2.0.0-p247/gems/rails_admin-0.5.0/lib/rails_admin/engine.rb:7:in `<top (required)>'
from /home/vieirater/.rvm/gems/ruby-2.0.0-p247/gems/rails_admin-0.5.0/lib/rails_admin.rb:1:in `require'
from /home/vieirater/.rvm/gems/ruby-2.0.0-p247/gems/rails_admin-0.5.0/lib/rails_admin.rb:1:in `<top (required)>'
from /home/vieirater/.rvm/gems/ruby-2.0.0-p247#global/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `require'
from /home/vieirater/.rvm/gems/ruby-2.0.0-p247#global/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `block (2 levels) in require'
from /home/vieirater/.rvm/gems/ruby-2.0.0-p247#global/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `each'
from /home/vieirater/.rvm/gems/ruby-2.0.0-p247#global/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `block in require'
from /home/vieirater/.rvm/gems/ruby-2.0.0-p247#global/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `each'
from /home/vieirater/.rvm/gems/ruby-2.0.0-p247#global/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `require'
from /home/vieirater/.rvm/gems/ruby-2.0.0-p247#global/gems/bundler-1.3.5/lib/bundler.rb:132:in `require'
from /home/vieirater/website/config/application.rb:7:in `<top (required)>'
from /home/vieirater/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/commands.rb:44:in `require'
from /home/vieirater/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/commands.rb:44:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
You can try to run
rvm ruby-2.0.0-p247 gem update --system
More detail in this blog post on the very same issue.

Resources